Facebook Plugin Facebook Plugin
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Facebook Plugin

Started by gtgillis, July 31, 2009, 02:15:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gtgillis

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]

Pascal YAP

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

jeepguy_1980

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.

jeepguy_1980

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

Joachim Müller

Quote from: jeepguy_1980 on July 31, 2009, 03:15:49 AM
the problem is that the mod assumes the gallery is installed in the "coppermine" subdirectory.
Use$CONFIG['site_url']to determine the actual gallery URL (including the path) instead of hardcoding it.

Quote from: gtgillis 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.
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.

gtgillis

Quote from: Joachim Müller on July 31, 2009, 07:39:29 AM
Use$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.

jeepguy_1980

#6
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.


Pascal YAP

Well done, it work nice  ;)

Fabricio Ferrero

Quote from: jeepguy_1980 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.
The image button was not loading for me.

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

Catching up! :)

jeepguy_1980

#9
Quote from: Fabricio Ferrero on August 06, 2009, 08:05:00 AM
The image button was not loading for me.

Open codebase.php and search line 48, then search for: <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.

demultiplexor

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

tinorebel

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

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

tinorebel

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???
Live long and prosper!
www.tripodart.net

x3

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!

friendjain1

Is it possible to make such plugin for orkut??

Joachim Müller

Your question does not belong into this thread!

fhj

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

fhj

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

torkio

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


thank ... great work congrats

gtgillis

Quote from: torkio 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

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.