CyberiaPC.com Community Forums Main Page
RSS Feeds: Late(st) News | Zenith Picture Gallery | Most Recent Community Topics | Tips, Tricks and Other Useful Stuff

Welcome Guest ( Log In | Register )

 Forum Rules Also hosted on SourceForge and FreshMeat
Reply to this topicStart new topic
> Convert image titles automatically to uppercase
kapangaluis
post Nov 4 2007, 04:57 PM
Post #1


Full Member
Group Icon

Group: +Zenith User
Posts: 92
Joined: 6-February 06
From: Mendoza, Argentina
Member No.: 3,240

Argentina




Hi:

In my gallery one of the rules for users to upload pictures is to MUST put titles of the images in uppercase. But many do not and need to lose a lot of time to do manually.

You can make some scripts that allow convert the titles of the images that are uploaded to automatically capitalized? .

Greetings!

LUIS

This post has been edited by kapangaluis: Nov 4 2007, 04:58 PM
Go to the top of the page
 
+Quote Post
usr.c
post Nov 6 2007, 07:55 PM
Post #2


Boss, my code's compiling (xkcd)
Group Icon

Group: Admins
Posts: 10,440
Joined: 19-September 01
Member No.: 1

Nothing Selected




Hi LUIS,

Sure, try this:

In add.php, look for

CODE
$uploaded_title = htmlentities(charsEscaper($_POST['title'], $config['escape_chars']), ENT_QUOTES, "UTF-8");

and replace it with

CODE
$uploaded_title = htmlentities(charsEscaper(strtoupper($_POST['title']), $config['escape_chars']), ENT_QUOTES, "UTF-8");

Do the same for the lines above and below it if you want them to be converted to all caps.

Hope that helps.


--------------------


Things that I don't suck at: Photography (flickr, JPG Mag), Skydiving, Splitting atoms, Flying a space shuttle
"Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch
I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st May 2013 - 01:42 PM