forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: compwhizmm on June 28, 2005, 12:07:47 am

Title: Title Help
Post by: compwhizmm on June 28, 2005, 12:07:47 am
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!
Title: Re: Title Help
Post by: Nibbler on June 28, 2005, 01:31:59 pm
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 :

Code: [Select]
$rowset[$key]['caption_text'] = $caption;
And before/above it, add:

Code: [Select]
$caption .= '<span class="thumb_title">'.$rowset[$key]['filename'].'</span>';
and then scroll up to:

Code: [Select]
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name';
and modify that to

Code: [Select]
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name,filename';
Title: Re: Title Help
Post by: compwhizmm on June 29, 2005, 07:36:19 pm
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
Title: Re: Title Help
Post by: Nibbler on June 29, 2005, 07:46:03 pm
Make sure you didn't remove part of the <?php at the top of the file.
Title: Re: Title Help
Post by: compwhizmm on June 30, 2005, 12:36:04 am
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
Title: Re: Title Help
Post by: Nibbler on June 30, 2005, 12:42:02 pm
attach your functions.inc.php file to a new post on this thread. Rename or zip it up first.
Title: Re: Title Help
Post by: compwhizmm on July 01, 2005, 02:26:07 am
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
Title: Re: Title Help
Post by: Nibbler on July 01, 2005, 03:36:54 pm
Press reply, then 'Additional options'.
Title: Re: Title Help
Post by: onlysli on July 23, 2005, 08:57:38 pm
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
Title: Re: Title Help
Post by: Joachim Müller on July 24, 2005, 09:29:25 am
We have a "One question per thread" policy you agreed to respect when signing up!