Facebook sharer for cpg1.5.x - Page 3 Facebook sharer for cpg1.5.x - Page 3
 

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

Facebook sharer for cpg1.5.x

Started by papukaija, June 27, 2010, 02:43:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rockas

My opinions may change but not the fact that I am right!

Αndré

Rockas, please post your solution for the benefit of other users (either attach the updated plugin or a guide what has to be changed). Thanks.

Rockas

Quote from: Αndré on January 19, 2011, 11:19:42 AM
Rockas, please post your solution for the benefit of other users (either attach the updated plugin or a guide what has to be changed). Thanks.

Ok André... as soon as I get home I'll post the changes. Thank you for the info.
My opinions may change but not the fact that I am right!

Rockas

Ok... I had the code on this PC so here's the changes.
I just edited the "codebase.php" file and replaced:
<!-- 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>


With:

<!-- 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}" target="_new">Partilhar</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></td>
    <td height="25" align="left" valign="middle"><iframe src="http://www.facebook.com/plugins/like.php?href={$CONFIG['site_url']}displayimage.php?pid={$CURRENT_PIC_DATA['pid']}&t={$picture_title};layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=dark&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px;" allowTransparency="true"></iframe></td>
  </tr>
</table>    


Not sure if this is the best way to do this but it seems to work fine.
I guess you can either install the plugin and then edit the codebase.php file or you can edit the file in the zip and then just install it as usuall.
Anyway... I've attached the plugin installation updated and the codebase.php file also updated... I'm not sure if I can do this, if I can't, sorry, please feel free to remove them.

Hope it works for everybody as good as it works for me.
My opinions may change but not the fact that I am right!

Rockas

hummm... i forgot to mention.
on the line:


<td height="25" align="left" valign="middle"><iframe src="http://www.facebook.com/plugins/like.php?href={$CONFIG['site_url']}displayimage.php?pid={$CURRENT_PIC_DATA['pid']}&t={$picture_title};layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=dark&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:25px;" allowTransparency="true">


you can costumize some parameters... one that may be usefull is the "colorscheme"... some, due do "light" themes on coppemine, may need/want to chage the value to "light"... ence "colorscheme=dark" can be "colorscheme=light".

Anyway,,, you can use this form
http://developers.facebook.com/docs/reference/plugins/like
to help you custumize the other parameters... just don't touch this part of the code:
<iframe src="http://www.facebook.com/plugins/like.php?href={$CONFIG['site_url']}displayimage.php?pid={$CURRENT_PIC_DATA['pid']}&t={$picture_title}

Hope to have some feedback from you guys to know if all works fine.

thank you
My opinions may change but not the fact that I am right!

spider666

Quote from: spider666 on January 19, 2011, 10:32:26 AM
Hello, thanks for the good job.

I have 2 issues. First I don't see the picture in the facebook preview page
Second, it seems there is some problems with the plugin "LightBox NotesFor.net", I can not use both togeter, only the last installed run. I have also try to move them in the list but nothing better.

Just few infos. In fact, only the last in the list run. Any idee from where come the problem ?

papukaija

Quote from: Rockas on January 19, 2011, 11:00:44 AM
I managed to add to your code the ability to add the facebook "like" button... don't know if you are interested.
Would require a new plugin to allow users to set the customisations with a gui and not by editing the plugin's code.

@spider666: Please read this and board rules.

@TeknoSounds: The error message is shown because the code in my plugin check by the code below if displayimage.php is shown, I'll change it to a better one.

TeknoSounds

Thanks Rockas!  Tho a couple issues with your code. Firstly you changed "Share" to your language...second, the table structure you put in horribly broke my template.  Made a few changes to it and its working ok now :)

spider666

Quote from: papukaija on January 19, 2011, 02:18:48 PM
@spider666: Please read this and board rules.

Thanks but I can't find any answer to my problem, sorry. Maybe I am blind ;-)

TeknoSounds

I think hes referring to the fact to make sure your lightbox plugin is using the latest up-to-date version
And you need to read the board rules as its specifically states to receive help you need to, at the least, post a link to your gallery.

spider666

Yes, my Lightbox plug is the last :-)

Unfortunately, I can not link my gallery atm :-(

uk_martin

I didn't know about the way that this thread had developed from the "share" button to the "like" button when I started my thread - http://forum.coppermine-gallery.net/index.php/topic,70051.0.html

You will see on that thread that I have a problem described there. Any chance that my thread can take over the "Facebook Like Button" subject, so that this one can return to the Share Button that it started out as? In any case, a solution to my problem would be appreciated on whichever thread it comes on....

Thanks

Martin

Rockas

Quote from: TeknoSounds on January 20, 2011, 07:47:47 AM
Thanks Rockas!  Tho a couple issues with your code. Firstly you changed "Share" to your language...second, the table structure you put in horribly broke my template.  Made a few changes to it and its working ok now :)

Thank you for the headsup, Tekno.
As soon as I can I'll update the files.
Can you share how you dealed with the "table" issue so i can test with my theme?
I don't remember exactly why i used it, so maybe i can solve it in a more theme friendly way :-)
My opinions may change but not the fact that I am right!

papukaija

#53
Quote from: uk_martin on January 20, 2011, 11:20:43 AM
Any chance that my thread can take over the "Facebook Like Button" subject, so that this one can return to the Share Button that it started out as?
Yes, we don't want to make moderators to lock this topic.

@TeknoSounds: Please try and report if replacing if ($superCage->get->keyExists('pid') == TRUE) { //is displayimage.php loaded? in codebase.php, at line 43, by
if (defined('DISPLAYIMAGE_PHP')) { //is displayimage.php loaded? fixes the error message issue?

@TeknoSounds and Rockas: Please continue your FB like button discussion at the topic referred by uk_martin.

Quote from: spider666 on January 20, 2011, 11:01:15 AM
Unfortunately, I can not link my gallery atm :-(
You aren't then eligible for my support.

TeknoSounds

Will do.  Testing that line now.  Thanks papukaija :D

Would there be any possible plans the like button could be included in a future update? I'd hate to have to have two mods when it seems like they should be more combined...


uk_martin

Quote from: TeknoSounds on January 21, 2011, 07:20:13 AM
Will do.  Testing that line now.  Thanks papukaija :D

Would there be any possible plans the like button could be included in a future update? I'd hate to have to have two mods when it seems like they should be more combined...


The thing is, I've got the "AddThis" button, and others have other social bookmarking buttons. Packaging various buttons together may work best if you went through a configuration process where you could pick and choose which from a selection you want.

THEN you have the matter of where do you place them? In the header, the footer? Under the images? Again, options need to be available.

TeknoSounds

True.  I was just thinking about an all inclusive "Facebook" plugin...  shares, likes, logins...  might try to do that myself. 

papukaija! Good news! The fix worked like a dream.  Was able to successfully delete comments via the Review Comments section.  Thanks!

papukaija

A new version of this plugin has been added to the initial post.
Changes in version 1.6:
- Fixed the detection of displayimage.php's being loaded

Quote from: TeknoSounds on January 21, 2011, 07:20:13 AM
Would there be any possible plans the like button could be included in a future update?
I'll look it at but don't except anything before spring.

Quote from: uk_martin on January 21, 2011, 01:06:02 PM
The thing is, I've got the "AddThis" button, and others have other social bookmarking buttons. Packaging various buttons together may work best if you went through a configuration process where you could pick and choose which from a selection you want.

THEN you have the matter of where do you place them? In the header, the footer? Under the images? Again, options need to be available.
There's the unsupported Social bookmarks plugin which does everything you mentioned expect that it doesn't support AddThis.

TeknoSounds

papukaija>
Got a new error for you, check this thread here:
http://forum.coppermine-gallery.net/index.php/topic,70203.0.html

Basically when editing an album and trying to save, it gets another critical DB error.  Going to look at the file now.