Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Adding ALBUM_TITLE to Image Navigation Bar  (Read 2308 times)

0 Members and 1 Guest are viewing this topic.

discotraveler

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Adding ALBUM_TITLE to Image Navigation Bar
« 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:

Code: [Select]
// 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
« Last Edit: December 19, 2004, 06:42:18 am by GauGau »
Logged

discotraveler

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Adding ALBUM_TITLE to Image Navigation Bar
« Reply #1 on: December 18, 2004, 06:56:32 pm »

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:
Code: [Select]
   global $album, $cat, $pos, $pic_count, $lang_img_nav_bar, $lang_text_dir, $template_img_navbar;
Add  $album_name, so it looks like this:
Code: [Select]
global $album, $album_name, $cat, $pos, $pic_count, $lang_img_nav_bar, $lang_text_dir, $template_img_navbar;
Then just below that find:
Code: [Select]
   $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:
Code: [Select]
   $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.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.