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.sillig.com/coppermine)
http://www.rudebastard.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]
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.
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.
the problem is that the mod assumes the gallery is installed in the "coppermine" subdirectory.
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.
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.
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.
Well done, it work nice ;)
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.
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.
Hello, thanks for this plugin.
It is possible to locate the facebook button under the photos border? Maybe near comment box or File information?
Working fine for me... just out of the box: upload, install and enjoy!
Thanks for the plug in! :)
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???
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!
Is it possible to make such plugin for orkut??
Your question does not belong into this thread!
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
No worries. It was the BBcode plugin that made the little problem. Once removed, all is good :-)
Is it possible the link to url absoluty ?
now the link is to normal_fileimage
thank ... great work congrats
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.
QuoteThe 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.
Is there a quick and dirty way to change this to link to the page? I want people to be able to browse the gallery easily after clicking the link. I'll look through the code, but this would be great. Thanks!
I think I came up with a solution that works for me. As gtgillis noted, he wanted a direct link to the actual photo. WIth this hack, it will give you the link to the photo, but the user will need to actually pick the right image from the facebook sharer app.
Replace the href portion of the code (this is only part of the line) in line 48 of codebase.php. I hope I used the bbcode corectly, the preview looks ok, but it took a while to fit it on my screen:
<a href="http://www.facebook.com/sharer.php?u={$CONFIG['site_url']}{$CURRENT_PIC_DATA['url']}&{$CURRENT_PIC_DATA['title']}"
TARGET="_blank" onclick="window.open(this.href,'window','width=626,height=436,resizable') ;return false;">
With this:
<a href="http://www.facebook.com/sharer.php?u={$CONFIG['site_url']}displayimage.php?pos=-{$CURRENT_PIC_DATA['pid']}&{$CURRENT_PIC_DATA['title']}"
TARGET="_blank" onclick="window.open(this.href,'window','width=626,height=436,resizable') ;return false;">
TARGET="_blank" is bad btw. Bossing the user around if he wants a new browser window/tab or not is bad - everybody can decide that on his own.
Additionally the attribute itself is deprecated as per standards compliance. Finally, HTML tags and attributes mustn't be written in upper case. Not related to this plugin, but my 2 ct. Seeing the target attribute makes me shiver...
Is there perhaps like the facebook plugin a twitter plugin to??
Quote from: emjay_smitten on January 25, 2010, 01:19:06 AM
Is there perhaps like the facebook plugin a twitter plugin to??
If you are using Coppermine integrated with Geeklog then yes, twitter and many more shares. The CM stand alone plugin has not caught up yet though.
Hi,
I installed the plugin and it worked fine for me...but only in firefox browser!
If I try to view the gallery with internet explorer, netscape or opera it doesn't work
I can see the fbshare image button but it's not clickable and also before the button image I see this: html.fb_share_link { padding:2px 0 0 20px; height:216px; }
How can I solve this problem?
have a nice day!
@styling: Please post a link to your gallery.
Hi all,
I'd just like to let you know that I have this plugin working in 1.5.3(RC) :)
I did have to make a change, but that was to just let coppermine know that this plugin will work with this version.
Install the plugin as normal, then you need to edit plugins/facebook/configuration.php so that line 6 has a max version number suitable for 1.5.3. I changed this line so that its as below:
$plugin_cpg_version = array('min' => '1.4', 'max' => '1.5.99');
After that, just go to (or refresh) the plugins page (in coppermine) and you should be able to enable the plugin
This plugin is designed for cpg1.4.x, and this board is dedicated to cpg1.4.x plugins. Your posting shouldn't have gone into this thread nor into this sub-board. Please stay out of this thread with issues related to cpg1.5.x.
nice plugin,
but what do i have do change, if i want the button to be displayed above the picture. It should be in the row where the other buttons like slideshow, ecard, previous and next picture are displayed.
thanks for a hint
can i change background color?
working ok using LightBox NotesFor.net 3.0
Mousewheel support for filmstrip 0.4
but using Add Pic Downlink Link 1.0 don't work
Minor issue, hope someone can help with this.
Coppermine version 1.4.27
PHP 5
installed the facebook Plugin works fine except for the following:
from a particular image ie http://www.mysite.com/coppermine/displayimage.php?album=448&pos=54
the actual link posted on facebook is http://www.4x4uk.org/cpg132/albums/pea+farm/normal_DSCF3620.JPG
which returns a 404 error on the server
anyone know what I need to do to correct this
Many thanks
also it would be nice if it was possible to post the actual picture as a link rather than just the link
Nice plugin, using it on my coppermine gallery at www.haraldlabout.nl (currently disabled)(running cpg 1.4.29
One question.
Installed the displayimage mod:
<a href="http://www.facebook.com/sharer.php?u={$CONFIG['site_url']}displayimage.php?pos=-{$CURRENT_PIC_DATA['pid']}&{$CURRENT_PIC_DATA['title']}"
TARGET="_blank" onclick="window.open(this.href,'window','width=626,height=436,resizable') ;return false;">
Should it show the image and link together in Facebook.
Currently only a links shows up with text "select miniature image" below it.
No image showing up!!
Any ideas?
Harald
When the plugin is installed the facebook button shows up in the center just under the intermediate picture between two picture borders.
Would like to see the button showing up in the right hand lower corner on the intermediate page.
Tried adding several codes into the plugin.
Unfortunately I am not an experienced programmer so all my solutions failed.
Any ideas for this code.
Harald
www.haraldlabout.nl
cpg 1.4.27
Where can i find it for CPG 1.5x ?
how did u tag some people in the photos?
like on facebook
In order to get Facebook to recognize the image first, you need to add the following to the <head> section.
Look for:
if ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = "<meta name=\"keywords\" content=\"".$CURRENT_PIC_DATA['keywords']."\"/>"; }
Insert after:
// Add link-rel tag for facebook share button
if (!is_numeric($album)) $meta_fblink .= " - " . $album_name;
$thumb_url = str_replace('normal', 'thumb', $CURRENT_PIC_DATA['url']);
$meta_fblink = "\n<link rel=\"image_src\" href=\"{$CONFIG['site_url']}{$thumb_url}\" />\n";
$meta_keywords .= $meta_fblink;
Works like a dream!
I'm not sure how this is added to to the plugin... I hope someone else can!
Previous edits were done on displayimage.php
it does not work for me.he is in config-plugins,but it has no install icon.it has the error icon. please help.my copermine files and folders is uploaded on my host in a folder named gallery.
my gallery:
http://allvip.us/gallery/index.php
What version of CM are you running? What version of the plugin are you trying to install?
Quote from: allvip on June 22, 2012, 07:46:08 PM
it does not work for me.he is in config-plugins,but it has no install icon.it has the error icon. please help.my copermine files and folders is uploaded on my host in a folder named gallery.
my gallery:
http://allvip.us/gallery/index.php
Coppermine Photo Gallery 1.5.18 (stable) and I download the plugin from page 1 of this threat-cpg1.4.x_plugin_facebook_v1.4.
Where can I find a facebook plugin that works with my gallery?I find nothing on Google.
Thanks.
The correct plugin for CM 1.5 can be found here -> http://forum.coppermine-gallery.net/index.php/topic,71844.msg348115.html#msg348115 (http://forum.coppermine-gallery.net/index.php/topic,71844.msg348115.html#msg348115)
Quote from: allvip on June 22, 2012, 09:14:28 PM
Coppermine Photo Gallery 1.5.18 (stable) and I download the plugin from page 1 of this threat-cpg1.4.x_plugin_facebook_v1.4.
Where can I find a facebook plugin that works with my gallery?I find nothing on Google.
Thanks.
thanks.I will try it
it worked.thanks a lot.