forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: discotraveler on December 18, 2004, 06:18:38 pm
-
Hello,
I recently downloaded and installed this program, and am very satisfyed with it. I have begun to mod the themes and so on.
My question is, in the "image navigation bar" portion of the theme.php i would like to add the ALBUM_TITLE where the {PIC_POS} currently is. I have copyed the code if it helps:
// HTML template for the image navigation bar
$template_img_navbar = <<<EOT
<tr>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{ECARD_TGT}" title="{ECARD_TITLE}"><img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="{ECARD_TITLE}"></a>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{SLIDESHOW_TGT}" title="{SLIDESHOW_TITLE}"><img src="images/slideshow.gif" width="16" height="16" border="0" align="absmiddle" alt="{SLIDESHOW_TITLE}" /></a>
</td>
<td align="center" valign="middle" witdh="100%">
ALBUM_TITLE HERE
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="images/prev.gif" width="16" height="16" border="0" align="absmiddle" alt="{PREV_TITLE}" /></a>
</td>
<td align="center" valign="middle" class="navmenu" width="48">
<a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="images/next.gif" width="16" height="16" border="0" align="absmiddle" alt="{NEXT_TITLE}" /></a>
</td>
</tr>
EOT;
I have tried ALBUM_TITLE, $ALBUM_TITLE, and {ALBUM_TITLE}. None of them seem to work. I belive it is not making the database connection for it to insert the date, but I could be wrong. If anyone can help it would be much apprectiated.
Thank you very much! ;D
-
Hi,
Well, I should have kept at it a little longer. After reading the following topic (http://forum.coppermine-gallery.net/index.php?topic=11569.0) and believing some of my previous suspicions, I went and took a look at the displayimage.php file and there was my answer. I will post how I got it to work so if anyone is interested here is how you do it:
In the displayimage.php file find:
global $album, $cat, $pos, $pic_count, $lang_img_nav_bar, $lang_text_dir, $template_img_navbar;
Add $album_name, so it looks like this:
global $album, $album_name, $cat, $pos, $pic_count, $lang_img_nav_bar, $lang_text_dir, $template_img_navbar;
Then just below that find:
$params = array('{THUMB_TGT}' => $thumb_tgt,
'{THUMB_TITLE}' => $lang_img_nav_bar['thumb_title'],
'{PIC_INFO_TITLE}' => $lang_img_nav_bar['pic_info_title'],
'{SLIDESHOW_TGT}' => $slideshow_tgt,
'{SLIDESHOW_TITLE}' => $lang_img_nav_bar['slideshow_title'],
'{PIC_POS}' => $pic_pos,
'{ECARD_TGT}' => $ecard_tgt,
'{ECARD_TITLE}' => $ecard_title,
'{PREV_TGT}' => $prev_tgt,
'{PREV_TITLE}' => $prev_title,
'{NEXT_TGT}' => $next_tgt,
'{NEXT_TITLE}' => $next_title,
'{PREV_IMAGE}' => ($lang_text_dir=='LTR') ? 'prev' : 'next',
'{NEXT_IMAGE}' => ($lang_text_dir=='LTR') ? 'next' : 'prev',
);
Add this '{ALBUM_NAME}' => $album_name, , so it looks like this:
$params = array('{THUMB_TGT}' => $thumb_tgt,
'{ALBUM_NAME}' => $album_name,
'{THUMB_TITLE}' => $lang_img_nav_bar['thumb_title'],
'{PIC_INFO_TITLE}' => $lang_img_nav_bar['pic_info_title'],
'{SLIDESHOW_TGT}' => $slideshow_tgt,
'{SLIDESHOW_TITLE}' => $lang_img_nav_bar['slideshow_title'],
'{PIC_POS}' => $pic_pos,
'{ECARD_TGT}' => $ecard_tgt,
'{ECARD_TITLE}' => $ecard_title,
'{PREV_TGT}' => $prev_tgt,
'{PREV_TITLE}' => $prev_title,
'{NEXT_TGT}' => $next_tgt,
'{NEXT_TITLE}' => $next_title,
'{PREV_IMAGE}' => ($lang_text_dir=='LTR') ? 'prev' : 'next',
'{NEXT_IMAGE}' => ($lang_text_dir=='LTR') ? 'next' : 'prev',
);
Then in the themes.php file under the $template_img_navbar section add: {ALBUM_NAME} where you want the album name to be displayed.
Please Note, this solution worked for my situation, as I wanted the album title in the Image Navbar. If you do not want it there you may have to move the placement of some of the code.