Loading ...

I would like to know how to Capitalize the Meta Tags

Board index / General Chat

Lounge & announcements forum.

Postby musicuploadz on Oct 10, 2011 4 pm


In musicvideo.php how to capitalize the Artist name for the meta tags?????
musicuploadz
Verified Customer
Verified Customer
 
Posts: 143
Joined: Feb 09, 2011 4 am
Reputation points: 10

Postby Xarex on Oct 11, 2011 1 am


Code: Select all
<?php
$str = strtoupper($str);
echo $str;
?>


Work with it :)
"He who sacrifices freedom for security deserves neither." - Ben Franklin
http://www.youtrippy.com
Xarex
Verified Customer
Verified Customer
 
Posts: 319
Joined: Jun 13, 2011 10 pm
Reputation points: 246

Postby musicuploadz on Oct 11, 2011 5 am


hmmm thx but not sure where that goes



i found the code but dont know where to code the capitalize



$meta_title = sprintf($lang['detail_title'], $video['video_title'], $video['artist']);
musicuploadz
Verified Customer
Verified Customer
 
Posts: 143
Joined: Feb 09, 2011 4 am
Reputation points: 10

Postby musicuploadz on Oct 12, 2011 3 pm


anyone know this?????
musicuploadz
Verified Customer
Verified Customer
 
Posts: 143
Joined: Feb 09, 2011 4 am
Reputation points: 10

Postby Xarex on Oct 12, 2011 3 pm


Try this:

Code: Select all

$meta_title = strtoupper($lang['detail_title'], $video['video_title'], $video['artist']);


For proper case:

Code: Select all
$meta_title = ucwords(strtolower($lang['detail_title'], $video['video_title'], $video['artist']));


sprintf has to do with the conversion format.
strtoupper would make it all uppercase.
"He who sacrifices freedom for security deserves neither." - Ben Franklin
http://www.youtrippy.com
Xarex
Verified Customer
Verified Customer
 
Posts: 319
Joined: Jun 13, 2011 10 pm
Reputation points: 246

Postby musicuploadz on Oct 12, 2011 5 pm


What about making it capitalize for each first word????


thx
musicuploadz
Verified Customer
Verified Customer
 
Posts: 143
Joined: Feb 09, 2011 4 am
Reputation points: 10

Postby musicuploadz on Oct 12, 2011 5 pm


That didnt work. It left error and it didnt case anything.




Anything else you think would work???? thx so much
musicuploadz
Verified Customer
Verified Customer
 
Posts: 143
Joined: Feb 09, 2011 4 am
Reputation points: 10

Postby Trace on Oct 12, 2011 5 pm


What is the error? Maybe you did something small wrong.
User avatar
Trace
Verified Customer
Verified Customer
 
Posts: 2543
Joined: Aug 16, 2010 3 pm
Location: The Netherlands
Reputation points: 1329

Postby musicuploadz on Oct 12, 2011 6 pm


Hey,


I replace sprintf with that other word ucwords it didnt work


still the artist is lower cased
musicuploadz
Verified Customer
Verified Customer
 
Posts: 143
Joined: Feb 09, 2011 4 am
Reputation points: 10

Postby Trace on Oct 12, 2011 7 pm


try
Code: Select all
$meta_title = sprintf($lang['detail_title'], $video['video_title'],ucwords( $video['artist']));
User avatar
Trace
Verified Customer
Verified Customer
 
Posts: 2543
Joined: Aug 16, 2010 3 pm
Location: The Netherlands
Reputation points: 1329

Postby musicuploadz on Oct 12, 2011 10 pm


Your the man it worked but one more thing!


$meta_title = sprintf($lang['detail_title'], $video['video_title'],ucwords( $video['artist']));


What about the video title how do i add ucwords there?????
musicuploadz
Verified Customer
Verified Customer
 
Posts: 143
Joined: Feb 09, 2011 4 am
Reputation points: 10

Postby Xarex on Oct 12, 2011 10 pm


Ah, just needed to put it around each.

ucwords( $video['video_title'] )
"He who sacrifices freedom for security deserves neither." - Ben Franklin
http://www.youtrippy.com
Xarex
Verified Customer
Verified Customer
 
Posts: 319
Joined: Jun 13, 2011 10 pm
Reputation points: 246


Who is online

Users browsing this forum: No registered users and 37 guests

cron