News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Change Caps Locked Titles into Capitalized Titles

Started by thetzfreak, November 25, 2005, 05:34:45 PM

Previous topic - Next topic

thetzfreak

Wasn't really sure on how to name this topic.

In my forum, some people feel the need to completely capitalize their topics. I've seen other forums change them automatically to capitalized. For example, if the topic name was GREAT NEW SITE it would be changed automatically when they post to Great New Site.

How do I do this?

Thanks.

rakuli

You could go through your templates and wrap all the titles in html span or div with style="text-transform:capitalise".

Alternatively, you could change the title before PHP enters it into the database.

$tite = ucwords(strtolower($title));

thetzfreak

Thanks for trying to help me out. You see, I'm not really much of a coder. I semi-understand what you mean, but I don't know how to go about and do it. Could you be a little more specific or give an example?

Thanks.



Sheepy

Created a mod for you, under the title 'Miscellious Interface Mod'.  Turns out you need to change $_POST['subject'] instead of $title.

http://mods.simplemachines.org/index.php?mod=184

rakuli

Quote from: Sheepy on November 30, 2005, 01:52:30 AM
Created a mod for you, under the title 'Miscellious Interface Mod'.  Turns out you need to change $_POST['subject'] instead of $title.

http://mods.simplemachines.org/index.php?mod=184

Sorry bout that, was using $title as an example.

Advertisement: