samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

how to stop Alt & Title Text / Descriptions converting everything to lower case and inserting hyphens between words #317

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Upload any picture with more than one word and at least one upper case in 
file name
2.
3.

What is the expected output? What do you see instead?
I expect to see the files as I have named them. Instead they are reformatted as 
above.

What version of the product are you using? On what operating system?
1.5.2 Windows XP

Please provide any additional information below.
Apologies if the answer is blindingly obvious.

Original issue reported on code.google.com by john.orm...@gmail.com on 23 Sep 2010 at 5:29

GoogleCodeExporter commented 8 years ago
I figured out a little bit of a workaround for this in the lib folder, find 
rewrite.php - this is the file that rewrites the titles and urls. 

You'll want to go to about line 197, the function rewrite_title($title).

after the get_query_var statements, you'll want to add a line of code for 
whatever variable is having issues. 
$pid for an image title, gallery and album for the titles of those.

$pid = ucword(str_replace('-',' ',$pid));

if you're having an issue where it also says 'Picture' before the name, like I 
had, simply remove the word 'picture' from the code slightly below there, where 
it is assigning $new_title to things.

Original comment by b...@onyourmark.com on 21 Feb 2012 at 4:59