forum.coppermine-gallery.net

Support => cpg1.5 plugins => cpg1.5.x Support => cpg1.5 plugin contributions => Topic started by: papukaija on June 27, 2010, 02:43:04 pm

Title: Facebook sharer for cpg1.5.x
Post by: papukaija on June 27, 2010, 02:43:04 pm
I have ported gtgillis (http://forum.coppermine-gallery.net/index.php?action=profile;u=60714)'s Facebook cpg 1.4.x plugin (http://forum.coppermine-gallery.net/index.php/topic,60893.0.html) to cpg1.5.x.

This plugin adds a "Share on Facebook" button under the displayed image when javascript is enabled. If javascript isn't enabled, then a simple text link is shown. This plugin doesn't upload anything to your Facebook profile, it just creates a link with a button to Facebook's url sharer. However, there should be an option (or at least there was) in Facebook to choose a thumbnail and to write a description/comment for the shared content.

Please be advised that Facebook needs access to the thumbnail of the media being shared. I haven't checked if Facebook hotlinks the thumbnail or downloads that to its server. Using a hotlink protection in your site may prevent Facebook from accessing the thumbnail.

Credits:
This plugin is originally written by gtgillis (http://forum.coppermine-gallery.net/index.php?action=profile;u=60714) and adapted by jeepguy_1980 (http://forum.coppermine-gallery.net/index.php?action=profile;u=60615).
Title: Re: Facebook sharer for cpg1.5.x
Post by: Jinnie on July 02, 2010, 07:17:18 pm
Just a general question. Is it possible for this plugin to show the image being shared as a thumbnail when it's posted on the user's Facebook wall?
Title: Re: Facebook sharer for cpg1.5.x
Post by: Joachim Müller on July 03, 2010, 08:28:38 am
@Jinnie: that's not what this plugin does

@papukaija: maybe you could come up with a detailed description of what this plugin does within this very thread.
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on July 04, 2010, 02:07:33 pm
@Joachim: I've updated this thread's initial post.

@Jinnie: Your question should now be answered in this thread's initial post. If not, post a link to your gallery as requested by board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616).
Title: Re: Facebook sharer for cpg1.5.x
Post by: Joro711 on July 17, 2010, 05:05:09 pm
Hi.Possible this plugin show thumbnail on Facebook page?Thanks.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Joachim Müller on July 19, 2010, 07:29:51 am
That's not what this plugin does. It does something completely different. You have failed to do as suggested per board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) anyway, so why should someone look into your issues? Stay out of this thread!
Title: Re: Facebook sharer for cpg1.5.x
Post by: vlkoun on July 28, 2010, 05:41:35 pm
Yes I KNOW that this plugin doesn't add a thumbnail to a facebook link.
But is there anyone who can add this function?
Thanks
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on July 28, 2010, 05:59:20 pm
However, there should be an option (or at least there was) in Facebook to choose a thumbnail and to write a description/comment for the shared content.

vlkoun: That's all I can tell you. I won't add thubmnail support to this plugin. In addition, you haven't posted a link to your gallery (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616).
Title: Re: Facebook sharer for cpg1.5.x
Post by: catanuba23 on August 08, 2010, 09:02:10 pm
Hello all, I am having a problem with the 1.5.x version of the FB Sharer that was covered in 1.4.x. I am getting the 404 error, page cannot be displayed. I read the 1.4.x post but couldn't figure out what was going on with the 1.5.x version. My gallery is in the coppermine directory.

Here is the link: http://freegameshots.com/gallery_cpm/

I believe if there is a way to get the album id in the link, it would work fine.

Thank you in advance...
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on August 09, 2010, 10:15:28 am
@catanuba23: Please allow the view of your gallery without logging in. In addition, you need to update your gallery as cpg 1.5.8 is the latest release.
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on August 23, 2010, 11:07:30 pm
A new version of this plugin has been added to the initial post.

Changes in version 1.3:
- Added a new sharing button if javascript is enabled, otherwise a simple text link is shown
- Removed the included images; they aren't needed anymore
Title: Re: Facebook sharer for cpg1.5.x
Post by: wbnp on August 28, 2010, 07:52:48 pm
Hi papukaija,

Another nice plugin!

For some reason thumbnails never seem to show up.  As you state in your original post an option to display a thumbnail does show but it never actually displays an image.

Do you know if they work for anyone?

I've made a suggestion to Joe Carver's plugin "Add Description Meta to Gallery" to add Facebook's image Meta Tag to the header and it does work fine if that data is included in the header - at least with my attempt at testing.

Anyway thanks for this plugin!

My site:
http://www.whyboysneedparents.com/ (http://www.whyboysneedparents.com/)
(VERY early stage of construction - if you need to, click on Home and you can get to normal Coppermine pages.
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on August 28, 2010, 10:14:38 pm
Are you sure that your server allows hotlinking of your images?

Do you know if they work for anyone?
You're the first one to report this issue but the v. 1.3 of this plugin is quite new. I'll test if I can reproduce this issue at my website.

I've made a suggestion to Joe Carver's plugin "Add Description Meta to Gallery" to add Facebook's image Meta Tag to the header and it does work fine if that data is included in the header - at least with my attempt at testing.
I can also look at this as Joe may want to keep his plugin a meta description and a rel"canonical" plugin.
Title: Re: Facebook sharer for cpg1.5.x
Post by: taucher_0815 on August 28, 2010, 10:53:51 pm
I also have the same issue. When posting to FB no thumbs are shown...
This happens to my "fan-page" (http://www.facebook.com/pages/SK-Fotoinfo/132057673475762) as well as to my (not public visible) personal page.
Title: Re: Facebook sharer for cpg1.5.x
Post by: taucher_0815 on August 28, 2010, 10:58:05 pm
@wbnp: What have you done to get this working?
I saw your line of code in the other thread. Where have you put that in?
Title: Re: Facebook sharer for cpg1.5.x
Post by: wbnp on August 28, 2010, 11:57:57 pm
Are you sure that your server allows hotlinking of your images?

Yes, I'm pretty sure it does.  I just added the code I showed on Joe's page and it seemed to work perfectly.

Quote from: papukaija
You're the first one to report this issue but the v. 1.3 of this plugin is quite new. I'll test if I can reproduce this issue at my website.

Unless people read the thread carefully at places it almost seemed like you didn't to thumbnails on purpose.  At least that was my impression when I just skimmed the thread of course I found out differently when I went back over the thread.  But I'm pretty bad at jumping to conclusions LOL!

Quote from: papukaija
I can also look at this as Joe may want to keep his plugin a meta description and a rel"canonical" plugin.

I don't remember does your plugin add the description to the Facebook posting?  Joe's does add the description and it works with your code (if yours doesn't add the description)and with his routine it might be easier to add the thumbnail link meta data.

Whatever you guys decide is best is fine with me!!!!!

Keep all the meta stuff in one plugin or keep all the Facebook stuff in one plugin or whatever makes sense for you guys that are actually doing the work!

One additional thought to consider is having the "-" Album Name and the "-" at the end.  To me it seems to be clutter and most people using Facebook don't really need to know the album name.  If people do want the album it might make more sense if it was at the end in parentheses ie filename (Album).

Rushing out the door, hopefully this made sense, I check back and clear it up tomorrow if necessary.

Thanks for looking at this, I really appreciate the work you guys do!
Title: Re: Facebook sharer for cpg1.5.x
Post by: wbnp on August 30, 2010, 10:43:43 am
@wbnp: What have you done to get this working?
I saw your line of code in the other thread. Where have you put that in?

Hi tacher,

The code goes in the header section of the page, however at the moment it only works on a test page where I added the code manually.
Title: Re: Facebook sharer for cpg1.5.x
Post by: wbnp on September 01, 2010, 05:19:06 pm
Hi papukaija,

Sounds like Joe agrees with you that your plugin is where the thumbnail link should be added.  Hopefully you'll be able to do this!   :)

Thanks!
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on September 01, 2010, 10:30:29 pm
I noticed that and I have started the work to provide a bugfix. Unfortunately I have a small issue (http://forum.coppermine-gallery.net/index.php/topic,66886.0.html) with it.
Title: Re: Facebook sharer for cpg1.5.x
Post by: alexor on September 05, 2010, 12:13:33 pm
Hi!
Maybe you can put here, how can i change the display text putting in in FB?
I don't need file name in it- only the album name, that's all....
2008 Fireworks in Panama - DSC 3143 - Alex Orlov

DSC 3143 is unusefull info at all.
I tryed to find it in your php code- but i'm not very familiar to it, so i'm asking your help.
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on September 05, 2010, 12:48:07 pm
@alexor:There are few things that affect the gallery's title, eg the gallery's name in settings or the way cpg generates the title for the image (iptc, filename, etc). More information is available in the docs (http://documentation.coppermine-gallery.net/).

I tryed to find it in your php code- but i'm not very familiar to it, so i'm asking your help.
My plugin doesn't affect the displayed title. This topic (http://forum.coppermine-gallery.net/index.php/topic,66827.0.html) might be useful for you, if not search the forum or  start a new topic to your issue and please don't forget to post the link to your gallery which seems to be http://www.alexor.net/

@everyone: A new version of this plugin has been added to the initial post.

Changes in version 1.4
- Bugfix for FB not finding the thumbnail from the shared picture
- Removed the custom $picture_title's script to switch to the default one as FB's sharer.php accepts spaces in URLs
Title: Re: Facebook sharer for cpg1.5.x
Post by: wbnp on September 05, 2010, 06:34:57 pm
Hi papukaija,

Works great!  Thanks very much for adding the ability to display thumbnails on Facebook's pages.

I do have one small issue, and it very well could be on my end, but the Facebook icon does not seem to show up on pages that have a video.  Any idea what could cause this?

An example:
http://www.whyboysneedparents.com/Coppermine/displayimage.php?album=12&pid=124#top_display_media (http://www.whyboysneedparents.com/Coppermine/displayimage.php?album=12&pid=124#top_display_media)

Thanks again for the time and effort you put into your plugins!
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on September 06, 2010, 03:59:17 pm
Good to know that it works.

I do have one small issue, and it very well could be on my end, but the Facebook icon does not seem to show up on pages that have a video.  Any idea what could cause this?
No, the issue isn't on your end. There are so many things that affect this issue: First of all, CPG doesn't create thumbnails for videos (expect the generic one). Secondly, videos can be directly uploaded to CPG or embeded with the video plugin (http://forum.coppermine-gallery.net/index.php/topic,60195.0.html) or even with this plugin (http://forum.coppermine-gallery.net/index.php/topic,62704.0.html). In addition, thumnails are defined in different ways (http://documentation.coppermine-gallery.net/en/files.htm#cust_thmb_order). Last but not least, you can create the thumbnail manually (http://documentation.coppermine-gallery.net/en/files.htm#cust_thmb) or with the custom thumb plugin (http://forum.coppermine-gallery.net/index.php/topic,60272.0.html).

This issue could be solved by creating an array of common video extensions and then use str_replace function to replace the video's extension by the thumbnail's real extension. I'm just not sure how to deal with the different file extensions that a thumbnail is allowed to have (http://documentation.coppermine-gallery.net/en/files.htm#cust_thmb_order); maybe borrow some code from CPG's get_pic_url function or just play with php's file_exists function. I'll see if I can code this.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Αndré on September 06, 2010, 08:57:36 pm
Valid thumbnail extensions for non-images are jpg, png and gif (all lower case). I recently worked with exactly that code and improved something afaik.
Title: Re: Facebook sharer for cpg1.5.x
Post by: martinc on September 07, 2010, 06:37:34 am
Hello,
I have added the faceboook share plugin to my gallery cpg1.5.
It does send the link to facebook, but it sends the link as https://
Is there a way to change it to send the link as http://?

Thanks
Title: Re: Facebook sharer for cpg1.5.x
Post by: wbnp on September 07, 2010, 10:47:55 pm
That's odd - the link mine uses is http://www.facebook.com/sharer bla.bla.bla
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on September 08, 2010, 12:16:52 pm
It does send the link to facebook, but it sends the link as https://
Is there a way to change it to send the link as http://?
Not related to this plugin, more info at http://documentation.coppermine-gallery.net/ and especially at http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on September 08, 2010, 08:03:01 pm
A new version of this plugin has been added to the initial post.

Changes in version 1.5
- The relative part for thumbnail's url is now generated with get_pic_url() -> custom, extension-specific,etc thumbnails should work now
- Removed the restriction of image being the only allowed shareable filetype (FB doesn't resctrict this, so why should this plugin do it?)
Title: Re: Facebook sharer for cpg1.5.x
Post by: wbnp on September 08, 2010, 08:23:45 pm
papukaija,

Works perfectly on my site with videos and still images!

Great work!

Many thanks!
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas on December 22, 2010, 07:19:03 pm
Something really weird is happening to me.

I click to share and at first the title of the photo appears but while it looks for the thumbnail the title disappears and i get a "{title}" as title of the photo.... If i clik "share" quickly while the correct name is still visible... is publishes correctly but without thumb.

i have my coppermine bridged with Joomla, don't know if this is important.

Sorry if i can't put a link to the gallery now... i am testing locally but if you really need to see this, tell me and I'll publish everything online and setup an admin account to you.

Thank you for your time.
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on December 22, 2010, 11:55:48 pm
i have my coppermine bridged with Joomla, don't know if this is important.
Does it work if you disable bridging?

Sorry if i can't put a link to the gallery now... i am testing locally but if you really need to see this, tell me and I'll publish everything online and setup an admin account to you.
Please post a link - it's part of board rules and it also helps the supporter to see the issue in action. Never ever post publicly admin account details. There's no need to post any account details at this moment as the share link is visible for the gallery's guest visitors.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas on December 23, 2010, 12:29:09 am
Does it work if you disable bridging?
Please post a link - it's part of board rules and it also helps the supporter to see the issue in action. Never ever post publicly admin account details. There's no need to post any account details at this moment as the share link is visible for the gallery's guest visitors.

Thank you fot your reply papukajja.

Here's the link... http://lwexposures.com/site/gallery/
Hope it works :-)

I "unbridged" it and the problem continues but it got even more weird because it looks like sometimes it works and sometimes it doesn't.
Can it be related to the javascripts collected from facebook system? Maybe the problem is on facebook?

Thank you for your time.
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on December 23, 2010, 01:46:35 pm
Are you sure that you're using v1.5 of my plugin? Have you disabled hotlinking in your site? I can't replicate the changing title issue (the title that becomes "{title}"), however, I figured out the reason for the missing thumbnail: for some reason, <link rel="image_src"... tag is missing from the header part of your gallery's html output.

Start by making sure that you're using an unmodified v1.5 of my plugin and then reload the page with F5 to avoid cache issues. If you still can't see a thumbnail or the tag, then an other plugin in your site is conflicting with this plugin. In that case, please post a list of installed plugins in your site.

Can it be related to the javascripts collected from facebook system? Maybe the problem is on facebook?
I don't think so, FB just needs to see the above mentioned tag to dowload/hotlink the thumbnail from your server.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Joe Carver on December 23, 2010, 01:51:35 pm
Rockas is using an out of date version of the LightBox plugin. Updating and changing the order of plugins could help.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas on December 23, 2010, 03:14:20 pm
@papukaija

I am using version 1.5.
Noticed something more that is puzzling me... if i open the big image using the lightbox plugin... the title appears correctly but without thumb.

@Joe Carver
I am using "LightBox NotesFor.net (lightbox_notes_for_net): v2.5" that I got from coppermine download area... is there a new version?

Anyway... i will try do uninstall lightbox and check if that changes anything.
I'll report back in some minutes.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas on December 23, 2010, 03:24:19 pm
No luck :-(

i saw that there is a new version of lightbox plugin... even if i even tried with it uninstalled... i will re-install using the latest version to see if somehow it interferes with the facebook sharer.

Any particular reasons why after poping up the big photo with lightbox the title was passed correctly?
ah! Using the default coppermine pop-up window doens't correct the title issue as it happens with the lightbox

Forgive my english, i hope i am being clear.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas on December 23, 2010, 03:38:41 pm
Another update... with the latest lightbox installed... it looks to work fine!
But now... in the intermediate image page... i get the full photo aaarrrrggghhh! lol

I will test other versions of lightbox
Title: Re: Facebook sharer for cpg1.5.x
Post by: TeknoSounds on January 19, 2011, 05:34:28 am
After installing this plugin, I'm getting an error when attempting to delete comments from "Review Comments"  here is the error from debug:

Code: [Select]
While executing query 'SELECT filepath, filename, url_prefix FROM cpg132_pictures WHERE pid = ' in plugins/facebook/codebase.php on line 46

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

File: /var/www/html/teknosounds.com/tspics/include/functions.inc.php - Line: 270
Title: Re: Facebook sharer for cpg1.5.x
Post by: spider666 on January 19, 2011, 10:32:26 am
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.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas on January 19, 2011, 11:00:44 am
One side note to the author...
I managed to add to your code the ability to add the facebook "like" button... don't know if you are interested.
It is working fine on my gallery  ;)
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas on January 19, 2011, 11:01:37 am
Sorry... forgot the link... here's an example: http://lwexposures.com/site/gallery/displayimage.php?album=23&pid=133#top_display_media
Title: Re: Facebook sharer for cpg1.5.x
Post by: Αndré 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.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas 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.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas 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.
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas 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
Title: Re: Facebook sharer for cpg1.5.x
Post by: spider666 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 ?
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija 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 (http://forum.coppermine-gallery.net/index.php/topic,65740.msg341107.html#msg341107) and board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.0.html).

@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.
Title: Re: Facebook sharer for cpg1.5.x
Post by: TeknoSounds 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 :)
Title: Re: Facebook sharer for cpg1.5.x
Post by: spider666 on January 20, 2011, 08:43:49 am
@spider666: Please read this (http://forum.coppermine-gallery.net/index.php/topic,65740.msg341107.html#msg341107) and board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.0.html).

Thanks but I can't find any answer to my problem, sorry. Maybe I am blind ;-)
Title: Re: Facebook sharer for cpg1.5.x
Post by: TeknoSounds 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.
Title: Re: Facebook sharer for cpg1.5.x
Post by: spider666 on January 20, 2011, 11:01:15 am
Yes, my Lightbox plug is the last :-)

Unfortunately, I can not link my gallery atm :-(
Title: Re: Facebook sharer for cpg1.5.x
Post by: uk_martin 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
Title: Re: Facebook sharer for cpg1.5.x
Post by: Rockas 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 :-)
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija 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.
Title: Re: Facebook sharer for cpg1.5.x
Post by: TeknoSounds 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...

Title: Re: Facebook sharer for cpg1.5.x
Post by: uk_martin 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.
Title: Re: Facebook sharer for cpg1.5.x
Post by: TeknoSounds 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!
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija 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 (http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/social_bookmarks/) which does everything you mentioned expect that it doesn't support AddThis.
Title: Re: Facebook sharer for cpg1.5.x
Post by: TeknoSounds 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.
Title: Re: Facebook sharer for cpg1.5.x
Post by: newx on January 26, 2011, 09:44:52 am
Hi, still doesnt work for me :(
http://www.friseur-fragen.de/frisurengalerie/displayimage.php?album=65&pid=2550#top_display_media

greetz NewX
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on January 26, 2011, 04:38:51 pm
If you are using the latest version of this plugin (v.1.6), then it means that DISPLAYIMAGE_PHP is also defined somewhere else than in displayimage.php.
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on January 31, 2011, 07:11:03 pm
A new version of this plugin has been added to the initial post.

Changes in version 1.7:
- Fixed compatibility issue with other plugins
- Fixed the detection of displayimage.php's being loaded (fix in 1.6. didn't work as excepted)
Title: Re: Facebook sharer for cpg1.5.x
Post by: Mikaelft on February 13, 2011, 08:00:09 pm
Is there a way to change the button to another language?
Title: Re: Facebook sharer for cpg1.5.x
Post by: TeknoSounds on February 14, 2011, 03:24:28 am
The text of the button is in the file (codebase).  Change the text to whatever you wish, it works like a normal <a link text.
Title: Re: Facebook sharer for cpg1.5.x
Post by: maanu on March 22, 2011, 11:41:05 am
hi together ...

i have a problem ...

http://www.usv2.li/gallerie/

Plugin: Facebook sharer (facebook): v1.7

if i click the Facebook share button: the thumbnail does not show and there comes following post at facebook:
Login - Your gallery name here
http://www.usv2.li/gallerie/displayimage...

i have named the gallerie in the admin session
must i change the displayimage.. but i have no clue what i have to change ... :-(

thanks a lot for your help !

Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on March 22, 2011, 09:38:37 pm
I can't reproduce your issue. The gallery name and the thumbnail are both shown correctly in FB. What browser are you using? Try to empty your browser's cache too. There's nothing to change for displayimage.php; the gallery name in your gallery's settings is the only thing to change.
Title: Re: Facebook sharer for cpg1.5.x
Post by: maanu on March 23, 2011, 12:34:33 am
mmh... i have broken my brain about that problem !

now it works ! maybe it was a temporary file problem on IE and Mozzilla !

sorry for waste your time!  i works now perfekt!  .... so now i try the "thumbs up" bottom ! :-)

greetz from Liechtenstein!
Maanu
Title: Re: Facebook sharer for cpg1.5.x
Post by: prokop on March 23, 2011, 03:59:59 am
Hi  papukaija

Excellent work, thank you very much for the dev work on the sharer.
My question is: is there any way I can use your plug to share albums instead of individual pics ?

my gally using your plug: http://www.prokop.dk/gallery/index.php
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on March 23, 2011, 12:18:49 pm
Unfortunately that's not (yet?) possible. I'll look if it can be added to the plugin.
Title: Re: Facebook sharer for cpg1.5.x
Post by: jmcreis on December 03, 2011, 02:34:47 pm
Hi  papukaija

I use your plugin (version 1.7) in my site (http://www.fotopointpt.com)

However I have some problems.

Let´s see:

It displays in Facebook a thumbnail, a kind of title and a link to the site.

In what I call "title" we can see the same that we read at the top of the browser, like this:

"Last additions - Photo name - Site name" (if your share from main page)
or
"Album name - Photo name - Site name" (if you share from displayimage page)

But if you go to the displayimage page coming from the user profile we see in our browser:

Last additions - User name - Name of the Photo - Site name

OMG Just what I wanted !!!!

But I got a error when sharing !!! Just like "Error - Site name" :)
Title: Re: Facebook sharer for cpg1.5.x
Post by: Russ_ on December 08, 2011, 01:07:25 am
This installed fine. Thank you.

Is Google Bookmarks different from Google+ ? (Never used either)

http://www.chainsawphotos.co.nz/gallery/index.php
Title: Re: Facebook sharer for cpg1.5.x
Post by: Russ_ on December 08, 2011, 01:16:43 am
oops, delete above and this one, wrong thread, sorry.
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on December 09, 2011, 04:53:28 pm
But if you go to the displayimage page coming from the user profile we see in our browser:

Last additions - User name - Name of the Photo - Site name

OMG Just what I wanted !!!!

But I got a error when sharing !!! Just like "Error - Site name" :)
That error message occurs only if javascript is enabled which means that the bug is in FB's code. The share button isn't supported anymore by FB so they won't fix the bug.

If you need that feature on last additions by a user pages, then I suggest you to remove the javascript from line 33 of codebase.php.

You should upgrade your gallery asap!
Title: Re: Facebook sharer for cpg1.5.x
Post by: jmcreis on December 09, 2011, 07:04:41 pm
Hi papukaija
Thanks very much for your help
I removed the javascript and it works quite well.
Now, from the main page I got "User name - Name of the Photo - Site name"
But I lost the FB image. I have only the word "Share" below the pic. How can I put the image there again? Please.

Btw Thanks also for your advise on the upgrade of the gallery. It is just done.
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on December 18, 2011, 11:15:52 pm
Sorry for the delay but I've been very busy during this week. The FB image is actually part of a file with multiple FB logos, the correct one is shown with css. You can try to hotlink to the css and image files by replacing line 33 of codebase.php with

Code: [Select]
<a type="button" href="http://www.facebook.com/sharer.php?u={$CONFIG['site_url']}displayimage.php?pid={$CURRENT_PIC_DATA['pid']}&t={$picture_title}" class="FBConnectButton">Share</a>
and line 52 with
Code: [Select]
$header = '<link rel="stylesheet" type="text/css" href="http://static.ak.fbcdn.net/connect.php/css/share-button-css" /><link rel="image_src" href="'.$CONFIG['ecards_more_pic_target'].get_pic_url($row, 'thumb').'" />';
I haven't tried the above code so it may not work, look horrible or just work. The css file lists all the sizes available of the logo and then just adapt the css class for the link.

You can also try to use one of the alternative Facebook images in the original plugin package written for cpg1.4.x (there's a link to that in the first message of this topic).
Title: Re: Facebook sharer for cpg1.5.x
Post by: ninoo on January 29, 2012, 12:09:57 am
hello
I followed your advice but when I share photos and text content are wrong
Practically shared the link works but the miniature and the text no
How can I fix this?
thanks

Title: Re: Facebook sharer for cpg1.5.x
Post by: ninoo on January 29, 2012, 12:00:06 pm
OK solved.
The problem that the photos could not be seen by registered users.
I made this change:
1) Configuration
2) Allow access to users not logged in (visitors or unknown)
3) Yes: Thumbnails and intermediate images

hello
Title: Re: Facebook sharer for cpg1.5.x
Post by: altenae on July 18, 2012, 06:20:52 pm
It seems the FACEBOOK SHARE icon is gone !!!
Only the text "Share" is visible.

I have this issue on all websites where I use this plugin.

Any thoughts ??

Edward
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on July 18, 2012, 06:43:03 pm
Please post a link to your gallery (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) as required by board rules. Thanks.
Title: Re: Facebook sharer for cpg1.5.x
Post by: altenae on July 18, 2012, 06:48:31 pm
Sorry I forgot

www.wildlife-photos.net
www.planepix.nl
www.aviationpix.nl

Title: Re: Facebook sharer for cpg1.5.x
Post by: altenae on July 19, 2012, 01:09:48 pm
Wel it stopped working, so I have tried another socialshare plugin.

Edward
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on July 19, 2012, 05:46:07 pm
You should start by checking that the actual icon is still on your server and try clearing your bowser's cache. You could also try to use another browser. Make sure javascript is enabled and that any ad blocking software isn't hiding the icon. Are you using the latest version of my plugin? You should update your galleries asap to get the latest security fixes.
Title: Re: Facebook sharer for cpg1.5.x
Post by: altenae on December 29, 2012, 06:57:06 pm
Hi,

When this plugin is enabled there is an issue on an Ipad.

Click on the thumbnail and when the larger image appears you first see the page loaded to be shrinked, a white popup and the the normal size comes up.

Please see : www.planepix.nl

Any idea why this is ?

Greetings,

Edward
Title: Re: Facebook sharer for cpg1.5.x
Post by: papukaija on December 30, 2012, 05:30:18 pm
I don't have an iPad so unfortunately I won't be able to give any specific support for you. However, your gallery seems to be using some kind of flash effect when loading the intermediary images. Could you try if disabling that solves the issue? You should also update your galleries asap to get the latest security fixes.