coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: shovi on February 27, 2008, 12:35:00 AM

Title: [Solved]: replace "file x/y" in nav_menu with image title
Post by: shovi on February 27, 2008, 12:35:00 AM
I searched the boards for this, and can't find anything.

in displayimage.php, how do I change nav_menu to put the file name instead of "File #/#"?  I see exactly where all of this code is generated...the "file" part is "$pic_pos" in theme_html_img_nav_menu()...but don't know what or where to replace that with to get the file name.

thanks in advance for your help.
Title: Re: replace "file x/y" in nav_menu with image title
Post by: Nibbler on February 27, 2008, 11:35:24 AM
Copy theme_html_img_nav_menu() from the sample theme into your theme.php and modify your copy.

change

$pic_pos = sprintf($lang_img_nav_bar['pic_pos'], $human_pos, $pic_count);

to

$pic_pos = $CURRENT_PIC_DATA['filename'];
Title: Re: replace "file x/y" in nav_menu with image title
Post by: shovi on February 27, 2008, 01:20:03 PM
bingo...thanks.
Title: Re: [Solved]: replace "file x/y" in nav_menu with image title
Post by: larrpan on February 29, 2008, 06:59:37 PM
So what if i don't want to replace "File" with image title but rather change File to say "Item" .. what am i to change in the codes?  thanks
Title: Re: [Solved]: replace "file x/y" in nav_menu with image title
Post by: shovi on February 29, 2008, 07:06:02 PM
Quote from: larrpan on February 29, 2008, 06:59:37 PM
So what if i don't want to replace "File" with image title but rather change File to say "Item" .. what am i to change in the codes?  thanks

that's in your language file, under $lang_img_nav_bar 'pic_pos' => 'FILE %s/%s'

change "FILE" to "ITEM".
Title: Re: [Solved]: replace "file x/y" in nav_menu with image title
Post by: larrpan on February 29, 2008, 07:22:46 PM
 ;DYES! U ROCK MAN! CHEERS