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: "add to favorites" to display outside the information area  (Read 7163 times)

0 Members and 1 Guest are viewing this topic.

newx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
"add to favorites" to display outside the information area
« 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Logged

newx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: "add to favorites" to display outside the information area
« Reply #2 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: "add to favorites" to display outside the information area
« Reply #3 on: January 25, 2011, 08:23:34 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.
Logged

newx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: "add to favorites" to display outside the information area
« Reply #4 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: "add to favorites" to display outside the information area
« Reply #5 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.
Logged

newx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: "add to favorites" to display outside the information area
« Reply #6 on: January 25, 2011, 09:03:12 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: "add to favorites" to display outside the information area
« Reply #7 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.
Logged

newx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: "add to favorites" to display outside the information area
« Reply #8 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

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

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: "add to favorites" to display outside the information area
« Reply #9 on: January 26, 2011, 03:59:34 pm »

Open codebase.php, find
Code: [Select]
   $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
Code: [Select]
    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;
« Last Edit: January 26, 2011, 04:05:19 pm by Αndré »
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.