coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: newx on January 25, 2011, 07:15:12 PM

Title: "add to favorites" to display outside the information area
Post by: newx on January 25, 2011, 07:15:12 PM
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
Title: Re: "add to favorites" to display outside the information area
Post by: Αndré on January 25, 2011, 07:17:57 PM
http://forum.coppermine-gallery.net/index.php/topic,57565.0.html
Title: Re: "add to favorites" to display outside the information area
Post by: newx on January 25, 2011, 07:45:01 PM
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
Title: Re: "add to favorites" to display outside the information area
Post by: Αndré on January 25, 2011, 08:23:34 PM
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.
Title: Re: "add to favorites" to display outside the information area
Post by: newx on January 25, 2011, 08:40:06 PM
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
Title: Re: "add to favorites" to display outside the information area
Post by: Αndré on January 25, 2011, 08:43:17 PM
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.
Title: Re: "add to favorites" to display outside the information area
Post by: newx on January 25, 2011, 09:03:12 PM
This plugin inserts the share/like button http://forum.coppermine-gallery.net/index.php/topic,70051 (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 . . .
Title: Re: "add to favorites" to display outside the information area
Post by: Αndré on January 26, 2011, 10:28:09 AM
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.
Title: Re: "add to favorites" to display outside the information area
Post by: newx on January 26, 2011, 03:40:27 PM
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  (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)

Title: Re: "add to favorites" to display outside the information area
Post by: Αndré on January 26, 2011, 03:59:34 PM
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;