Facebook Plugin - Page 2 Facebook Plugin - Page 2
 

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 Plugin

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Toddsc

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!

Toddsc

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;">

Joachim Müller

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

emjay_smitten

Is there perhaps like the facebook plugin a twitter plugin to??

gtgillis

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.

styling

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!

papukaija

@styling: Please post a link to your gallery.

fullysynthetic

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

Joachim Müller

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.

michelon

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

olaechea

can i change background color?

olaechea

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

ne4x4

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

ne4x4

also it would be nice if it was possible to post the actual picture as a link rather than just the link

hlabout

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

hlabout

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


Oenne

Where can i find it for CPG 1.5x ?

idotal

how did u tag some people in the photos?
like on facebook

PatCPG

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!

PatCPG

Previous edits were done on displayimage.php