"Add to favourites" in Image Navigation bar "Add to favourites" in Image Navigation bar
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

"Add to favourites" in Image Navigation bar

Started by d.l.h, December 22, 2004, 06:26:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

d.l.h

I'd like to have the "add to favourites" link in the Navigation bar (where there are next picture, previous picturte, slideshow,...). How can this be done?

Greets
Martin

donnoman

theme.php; $template_img_navbar;  find:  (This is using classic)

               <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>


add after it:

               <td align="center" valign="middle" class="navmenu" width="48">
                       {FAVORITE}
               </td>


displayimage.php; function html_img_nav_menu; find:

   global $CONFIG, $HTTP_SERVER_VARS, $HTTP_GET_VARS, $CURRENT_PIC_DATA, $PHP_SELF;
   global $album, $cat, $pos, $pic_count, $lang_img_nav_bar, $lang_text_dir, $template_img_navbar;


change to:

   global $CONFIG, $HTTP_SERVER_VARS, $HTTP_GET_VARS, $CURRENT_PIC_DATA, $PHP_SELF, $FAVPICS;
   global $album, $cat, $pos, $pic_count, $lang_img_nav_bar, $lang_picinfo, $lang_text_dir, $template_img_navbar;


same function; find:

   } else {
       $ecard_tgt = "javascript:alert('" . addslashes($lang_img_nav_bar['ecard_disabled_msg']) . "');";
       $ecard_title = $lang_img_nav_bar['ecard_disabled'];
   }


add after it:  (you are going to want to make this pretty after you get it working)

   
   if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
       $favorite = "<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . "\">" . $lang_picinfo['addFav'] . '</a>';
   } else {
       $favorite = "<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . "\">" . $lang_picinfo['remFav'] . '</a>';
   }


same function; find:

       '{THUMB_TITLE}' => $lang_img_nav_bar['thumb_title'],


Add after it:

       '{FAVORITE}' => $favorite,