I am aware this is an old post but as I have find other similar posts linking to this post, I hope it is OK to reply here.
I was having the same problem and I think I have had some success. However, please treat it as a test only and consider everything before using it online.
1. Open theme.php and find the function called theme_html_picture(). The start of it looks something like:
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $USER;
After the changes it should be like this. Note that I added $FAVPICS to the list:
function theme_html_picture()
{
global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $FAVPICS, $USER;
2. Find the variable called $params;
3. Before that variable insert this:
$ref = $REFERER ? "&ref=$REFERER" : '';
if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
$myFave[$lang_picinfo['addFavPhrase']] = "<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . $ref . "\" >" . $lang_picinfo['addFav'] . '</a>';
} else {
$myFave[$lang_picinfo['addFavPhrase']] = "<a href=\"addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . $ref . "\" >" . $lang_picinfo['remFav'] . '</a>';
}
4. Edit the $params
Old code:
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
'{PICINFO}' => $CURRENT_PIC_DATA['info'],
);
New code:
$params = array('{CELL_HEIGHT}' => '100',
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
'{PICINFO}' => $CURRENT_PIC_DATA['info'],
'{FAVES}' => $myFave[$lang_picinfo['addFavPhrase']],
);
5. Scroll up and find "// HTML template for intermediate image display"
6. Depending on what you want, insert the {FAVES} where you like. My code looks like this:
$template_display_media = <<<EOT
<tr>
<td align="center" valign="top" class="display_media" nowrap="nowrap">
<table cellspacing="2" cellpadding="0" class="imageborder">
<tr>
<td align="center">
{FAVES}<br>{IMAGE}<br>
{PICINFO}<br>{ADMIN_MENU}<br>
</td>
</tr>
</table>
Now the Add/Remove favs will be at the top of the image. If you want it right below the image, obviously, add the {FAVES} after the {IMAGE}
Now I am left with a single problem. I would like to have my Add/Remove favourites near the "Return to the thumbnails" icon. I know that this involves touching the themes.ini.php but still... maybe somebody could help me with that. Thanks