Hi, I have a photo collection for a classreunion. I am getting ready to use the batch add feature to upload about 100 pictures. I have used the batch add before and I would like my pictures filename to show up on the thumbnail page(thumbnails.php) and on the picture page(displayimage.php). I would just manually type in the title name but that might take a while. I noticed the filename shows up in the title bar at the top of my browser but I would like it be in a more noticable place. Any Suggestions? Thanks!!
-btw I have tried three different photo scripts, and this is by far the easiest, most stable, and feature-filled of them all!
It already is on displayimage.php, under 'File information'.
To add it as a caption under regular thumbnail listings, edit include/functions.inc.php.
Find the very first occurence of :
$rowset[$key]['caption_text'] = $caption;
And before/above it, add:
$caption .= '<span class="thumb_title">'.$rowset[$key]['filename'].'</span>';
and then scroll up to:
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name';
and modify that to
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name,filename';
I did that and I got the following error
Notice: Use of undefined constant php - assumed 'php' in /home/bchsclas/public_html/photo/include/functions.inc.php on line 1
Fatal error: Call to undefined function: cpg_db_connect() in /home/bchsclas/public_html/photo/include/init.inc.php on line 242
Make sure you didn't remove part of the <?php at the top of the file.
ok, The <?php part is there. I retried looking at the thmubnails page and now I got a different error
Parse error: parse error, unexpected T_IF in /home/bchsclas/public_html/photo/include/functions.inc.php on line 2
Any Suggestions??
Thanks
attach your functions.inc.php file to a new post on this thread. Rename or zip it up first.
Ok, Could not figure out how to attach a file but did give a link to show what the functions code looks like
http://www.bchsclassof85.5gigs.com/photo/include/functions.htm
or copy/paste this into your browser
http://www.bchsclassof85.5gigs.com/photo/include/functions.htm
Press reply, then 'Additional options'.
i just modified the functions.inc.php and now i can see the filename under the thumbs, but who can i put filename above the thumbs ? please help..
and.. another thing.. the filename is someting like this "file_name_23.jpg" how can i make show "file name" without the "_" and the ".jpg" .. i could make a little script to change exclude the "_" and ".jpg" from file name, but i don't know where to use it in functions.inc.php
please any ideea? thanks
We have a "One question per thread" policy you agreed to respect when signing up!