"add to favorites" to display outside the information area "add to favorites" to display outside the information area
 

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]

Main Menu

"add to favorites" to display outside the information area

Started by newx, January 25, 2011, 07:15:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

newx

Hi there,

i have a question about the add to my favorites link which is regulary behind the "file information" which pops out.
I want to make it easier for the users to fav their fav pictures.
i put in an Facebook Like Button and i thought it would be nice, if the fav link is placed near that like button or maybe under the ratings stars.

is it possible to place the "fav link" somewhere around there? an if yes - how to?
Link to my gallery is http://www.friseur-fragen.de/frisurengalerie/

Thx (if its the wrong board please move thread)

Greetz NewX


newx

Hey ANdre - thy for quick reply.
The Add On works - but i dont want to fav a whole album - is there a way to display it above a single picture?

Thx NewX

Αndré

Quote from: newx on January 25, 2011, 07:45:01 PM
i dont want to fav a whole album
That's not what the plugin does. It only adds the current file to your favorites. If you want to display a button/link next to your facebook link, just add it before/after that code modification.

newx

Ok  i see!

But thats the problem: Which link to take?
(<a href="addfav.php?pid=2784&amp;referer=displayimage.php%3Falbum%3D79%26pid%3D2784">zu Favoriten hinzufügen</a>) ???
Im sure there must some variables in it..

And where to place?
(facebook like codebase.php)?

Sorry  ::)

Greetz X

Αndré

As I don't know how you added the facebook button, I cannot tell you where exactly you have to add the code. Please post your code modifications or a link to the thread where you found the modification/plugin you use.

newx

This plugin inserts the share/like button http://forum.coppermine-gallery.net/index.php/topic,70051
to place the code its simple html.
what i really need to know ist, wich part/code to take to get the fav link . . .

Αndré

Unfortunately you didn't posted a link to a plugin announcement thread, but to a discussion which links to another big discussion. Please attach the plugin you're using as-is (with all mods you maybe have applied from one of the threads) as zip file to your next reply.

newx

Sorry- the board confuses me sometimes o_O
I use the   cpg1.5.x_plugin_facebook_v1.6.zip as you can finde here (points to first msg in thread-where u also can finde the download link to the plugin)
http://forum.coppermine-gallery.net/index.php/topic,65740.msg326810.html#msg326810

I didnt do any mods-i just added a tweet button above the Facebook button (just copy & paste html)


Αndré

Open codebase.php, find
   $html .= <<< EOT
       <!-- Facebook share -->
       <a name="fb_share" type="button" href="http://www.facebook.com/sharer.php?u={$CONFIG['site_url']}displayimage.php?pid={$CURRENT_PIC_DATA['pid']}&t={$picture_title}">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
EOT;

and below, add
    global $REFERER, $FAVPICS, $lang_picinfo;
    $ref = $REFERER ? "&amp;referer=$REFERER" : '';
    $fav = !in_array($CURRENT_PIC_DATA['pid'], $FAVPICS) ? $lang_picinfo['addFav'] : $lang_picinfo['remFav'];
    $html .= <<< EOT
        <a href="addfav.php?pid={$CURRENT_PIC_DATA['pid']}{$ref}">{$fav}</a>
EOT;