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   Go Down

Author Topic: Facebook Plugin  (Read 88566 times)

0 Members and 1 Guest are viewing this topic.

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Facebook Plugin
« on: July 31, 2009, 02:15:18 am »

I have made a down and dirty plugin to add a Facebook link at the bottom of each photo.

You can see it in action at my personal and test sites
http://www.sillig.com/coppermine
http://www.rudebastard.com/coppermine

Both of my sites use a version of CMG that is bridged to Geeklog so your mileage may vary.


[Edit GauGau 2010-03-03]
This plugin has been added to the subversion repository: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.4.x/plugins/facebook

It has been updated as well to reflect the version checking routines in the plugin manager that are meant to make sure that galleries don't break because of plugins installed that aren't meant for that particular version of the gallery.

Download: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_facebook_v1.4.zip/download
[/Edit]
« Last Edit: March 03, 2010, 09:51:37 am by Joachim Müller »
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Facebook Plugin
« Reply #1 on: July 31, 2009, 02:40:56 am »

Thanx ! Usefull and small add for all Facebook addict  ;)
Work as expected, a link is visible bottom the picture.

But there is a 404 error after click on it.

Maybe you forgot this JavaScript =>
Code: [Select]
<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script>
You must to add it in your plugin.
Logged

jeepguy_1980

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 94
    • Loop Family Forum & Gallery
Re: Facebook Plugin
« Reply #2 on: July 31, 2009, 03:07:30 am »

Works great for me. No error here.

I tweaked the padding and used a facebook button, instead of text.


I see the error now. When clicking on the link from facebook it comes back to your gallery with a 404 error.
Logged

jeepguy_1980

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 94
    • Loop Family Forum & Gallery
Re: Facebook Plugin
« Reply #3 on: July 31, 2009, 03:15:49 am »

the problem is that the mod assumes the gallery is installed in the "coppermine" subdirectory.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Facebook Plugin
« Reply #4 on: July 31, 2009, 07:39:29 am »

the problem is that the mod assumes the gallery is installed in the "coppermine" subdirectory.
Use
Code: [Select]
$CONFIG['site_url']to determine the actual gallery URL (including the path) instead of hardcoding it.

I have made a down and dirty plugin to add a Facebook link at the bottom of each photo.
Doesn't work with JS turned off, so why is the HTML-link populated in the first place - it will cause a lot of broken links for all spiders and confuse visitors with JS turned off. Nice plugin, but needs improvement.
Logged

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Facebook Plugin
« Reply #5 on: July 31, 2009, 12:46:36 pm »

Use
Code: [Select]
$CONFIG['site_url']to determine the actual gallery URL (including the path) instead of hardcoding it.
Doesn't work with JS turned off, so why is the HTML-link populated in the first place - it will cause a lot of broken links for all spiders and confuse visitors with JS turned off. Nice plugin, but needs improvement.

I said it was dirty but I'll work on it.
Logged

jeepguy_1980

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 94
    • Loop Family Forum & Gallery
Re: Facebook Plugin
« Reply #6 on: July 31, 2009, 04:11:59 pm »

This is a version of the plugin I have tweaked for use on my site.  It doesn't require javascript and it autodetects the coppermine folder.

« Last Edit: January 25, 2010, 03:57:54 am by jeepguy_1980 »
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Facebook Plugin
« Reply #7 on: July 31, 2009, 09:21:19 pm »

Well done, it work nice  ;)
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Facebook Plugin
« Reply #8 on: August 06, 2009, 08:05:00 am »

This is a version of the plugin I have tweaked for use on my site.  It doesn't require javascript and it autodetects the coppermine folder.
The image button was not loading for me.

Open codebase.php and search line 48, then search for:
Code: [Select]
<img src="plugins/facebook/facebook_share_button" width=75 height=33 /> and add the ".jpg" to the file name.
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

jeepguy_1980

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 94
    • Loop Family Forum & Gallery
Re: Facebook Plugin
« Reply #9 on: August 06, 2009, 01:05:47 pm »

The image button was not loading for me.

Open codebase.php and search line 48, then search for:
Code: [Select]
<img src="plugins/facebook/facebook_share_button" width=75 height=33 /> and add the ".jpg" to the file name.

That's strange that it worked for me without the .jpg extension. But it's fixed now.
« Last Edit: January 25, 2010, 03:58:12 am by jeepguy_1980 »
Logged

demultiplexor

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Venture Scouts in Brno photo gallery
Re: Facebook Plugin
« Reply #10 on: August 21, 2009, 09:02:02 pm »

Hello, thanks for this plugin.
It is possible to locate the facebook button under the photos border? Maybe near comment box or File information?
Logged

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Facebook Plugin
« Reply #11 on: October 23, 2009, 06:10:37 pm »

Working fine for me... just out of the box: upload, install and enjoy!

Thanks for the plug in! :)
Logged
Live long and prosper!
www.tripodart.net

tinorebel

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
  • live long and prosper!
    • www.tripodart.net
Re: Facebook Plugin
« Reply #12 on: October 23, 2009, 06:41:35 pm »

mmm.... just found out that this plug-in sets the link in facebook dyrectly to the photo.
Would it be possible to link to the coppermine page containing the photo instead???
Logged
Live long and prosper!
www.tripodart.net

x3

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Facebook Plugin
« Reply #13 on: October 24, 2009, 02:25:48 am »

Is it possible to integrate this to EnlargeIt?
I want to add a facebook button in EnlargeIt.
I have noticed that he facebook plugin doesn't show up in images when EnlargeIt is used.
Thanks!
Logged

friendjain1

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Facebook Plugin
« Reply #14 on: November 14, 2009, 08:10:11 pm »

Is it possible to make such plugin for orkut??
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Facebook Plugin
« Reply #15 on: November 15, 2009, 07:01:02 pm »

Your question does not belong into this thread!
Logged

fhj

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Facebook Plugin
« Reply #16 on: November 18, 2009, 12:51:33 pm »

Thank you for a great plugin, but I have a small problem. When I share a link from my gallery, all I get is the tiny thumbnail when clicking on the link from Facebook.

Any idea why?

This is the page I share.
http://download.atvforumet.com/CP/displayimage.php?album=topn&cat=0&pos=2

This is what it links to.
http://download.atvforumet.com/CP/albums/userpics/10044/thumb_div.jpg
Logged

fhj

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Facebook Plugin
« Reply #17 on: November 18, 2009, 01:14:53 pm »

No worries. It was the BBcode plugin that made the little problem. Once removed, all is good :-)
Logged

torkio

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 94
Re: Facebook Plugin
« Reply #18 on: December 18, 2009, 01:48:47 pm »

Is it possible the link to url absoluty ?
now the link is to normal_fileimage


thank ... great work congrats
Logged

gtgillis

  • Contributor
  • Coppermine novice
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 40
Re: Facebook Plugin
« Reply #19 on: December 18, 2009, 04:06:30 pm »

Is it possible the link to url absoluty ?
now the link is to normal_fileimage

thank ... great work congrats

The reason I did it that way was because the picture preview does not show up if I link to the page URL but it does linking to the fileimage.
Logged
Pages: [1] 2 3   Go Up
 

Page created in 0.038 seconds with 20 queries.