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 2 [3] 4 5   Go Down

Author Topic: Facebook sharer for cpg1.5.x  (Read 76339 times)

0 Members and 1 Guest are viewing this topic.

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #40 on: January 19, 2011, 11:01:37 am »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Facebook sharer for cpg1.5.x
« Reply #41 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.
Logged

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #42 on: January 19, 2011, 11:30:23 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.
Logged
My opinions may change but not the fact that I am right!

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #43 on: January 19, 2011, 11:43:19 am »

Ok... I had the code on this PC so here's the changes.
I just edited the "codebase.php" file and replaced:
Code: [Select]
<!-- 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:
Code: [Select]
<!-- 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.
Logged
My opinions may change but not the fact that I am right!

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #44 on: January 19, 2011, 01:20:36 pm »

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

Code: [Select]
<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:
Code: [Select]
<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
Logged
My opinions may change but not the fact that I am right!

spider666

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Facebook sharer for cpg1.5.x
« Reply #45 on: January 19, 2011, 01:21:58 pm »

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

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Facebook sharer for cpg1.5.x
« Reply #46 on: January 19, 2011, 02:18:48 pm »

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

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: Facebook sharer for cpg1.5.x
« Reply #47 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 :)

spider666

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Facebook sharer for cpg1.5.x
« Reply #48 on: January 20, 2011, 08:43:49 am »

@spider666: Please read this and board rules.

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

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: Facebook sharer for cpg1.5.x
« Reply #49 on: January 20, 2011, 08:50:11 am »

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

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Facebook sharer for cpg1.5.x
« Reply #50 on: January 20, 2011, 11:01:15 am »

Yes, my Lightbox plug is the last :-)

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

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Facebook sharer for cpg1.5.x
« Reply #51 on: January 20, 2011, 11:20:43 am »

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
Logged

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #52 on: January 20, 2011, 11:42:36 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 :-)
Logged
My opinions may change but not the fact that I am right!

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Facebook sharer for cpg1.5.x
« Reply #53 on: January 20, 2011, 03:45:10 pm »

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
Code: [Select]
if ($superCage->get->keyExists('pid') == TRUE) { //is displayimage.php loaded? in codebase.php, at line 43, by
Code: [Select]
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.

Unfortunately, I can not link my gallery atm :-(
You aren't then eligible for my support.
« Last Edit: January 20, 2011, 03:50:18 pm by papukaija »
Logged

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: Facebook sharer for cpg1.5.x
« Reply #54 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...

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Facebook sharer for cpg1.5.x
« Reply #55 on: January 21, 2011, 01:06:02 pm »

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

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: Facebook sharer for cpg1.5.x
« Reply #56 on: January 21, 2011, 02:01:51 pm »

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

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Facebook sharer for cpg1.5.x
« Reply #57 on: January 21, 2011, 09:39:45 pm »

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

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.

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

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: Facebook sharer for cpg1.5.x
« Reply #58 on: January 26, 2011, 07:12:50 am »

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.

newx

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Facebook sharer for cpg1.5.x
« Reply #59 on: January 26, 2011, 09:44:52 am »

Logged
Pages: 1 2 [3] 4 5   Go Up
 

Page created in 0.029 seconds with 20 queries.