News:

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

Main Menu

Auto change all first letter word of topic to capital letter

Started by donjazzy, May 13, 2012, 02:01:59 PM

Previous topic - Next topic

donjazzy

Hello,
I saw this trick in another forum software. We all no that it is not appropriate to begin a topic with a small letter but because we do not have admin control over how members write contents, this is defeated. By this, how can I possibly make all beginning words of a TOPIC automatically becomes capital letter even though a user type in lower case. That is, it should automatically become capital letter once posted.
Example:

if you truely love jesus, you must keep all his commandments
When submitted should  then automatically appear as
If You Truely Love Jesus, You Must Keep All His Commandments
sorry for my poor communication. Thanks

NanoSector

Hi donjazzy, can you attach your Sources/Display.php please?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

MrPhil

Unfortunately, it does not appear that the topic title (subject) gets its own class. If it did, you could simply add
text-transform: capitalize;
to the class CSS. The text is used in a number of places on a number of pages, and each would have to be updated to add a class.

It might be easier to write PHP code to do the capitalization during editing/saving of the topic. It could do a better job than CSS: capitalize first and last words, and all other words except noise words (the, a, an, and,...). No more e.e. cummings wannabes!

donjazzy

Quote from: MrPhil on May 13, 2012, 03:58:48 PMIt could do a better job than CSS: capitalize first and last words, and all other words except noise words (the, a, an, and,...).
Ok I totally support you on this. I thought it isn't easy to tweak and therefore never bothered to mention it. Due to the nature of my forum, I will like all words capitalize except these noise words "an, and, a, the, from, in, to, of, between". I use smf 2.0.2. Thanks 

adp

It is a bit old, but i just want to know if this is possible today. Any mod or trick

Kindred

no... this is not something that most sites would (or should) use....   so I don't think anyone has even looked at it further in 8 years
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

adp

Quote from: Kindred on January 28, 2021, 08:50:52 AM
no... this is not something that most sites would (or should) use....   so I don't think anyone has even looked at it further in 8 years

thank you for the answer

Steve

DO NOT pm me for support!


GigaWatt

Quote from: Kindred on January 28, 2021, 08:50:52 AM
no... this is not something that most sites would (or should) use....   so I don't think anyone has even looked at it further in 8 years

Actually, comes in pretty handy on movie/music sharing forums ;). Especially in the title of the topic ;).

Though, yeah, I wouldn't recommend using it, since it's probably not a good a idea to implement it globally. If it was on per board basis... maybe ;).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

adp

Quote from: GigaWatt on January 28, 2021, 11:18:33 AM
Quote from: Kindred on January 28, 2021, 08:50:52 AM
no... this is not something that most sites would (or should) use....   so I don't think anyone has even looked at it further in 8 years

Actually, comes in pretty handy on movie/music sharing forums ;). Especially in the title of the topic ;).

Though, yeah, I wouldn't recommend using it, since it's probably not a good a idea to implement it globally. If it was on per board basis... maybe ;).



True and True
Im thinking if it fit good on all categories

GigaWatt

Quote from: adp on January 28, 2021, 11:28:16 AM
Im thinking if it fit good on all categories

As I said, don't think it's a good idea to implement it globally... and there's probably a lot more work to do it on a per board basis.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Advertisement: