Facebook sharer for cpg1.5.x - Page 2 Facebook sharer for cpg1.5.x - 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 sharer for cpg1.5.x

Started by papukaija, June 27, 2010, 02:43:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

papukaija

#20
@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.

Quote from: alexor on September 05, 2010, 12:13:33 PM
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 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

wbnp

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

Thanks again for the time and effort you put into your plugins!

papukaija

Good to know that it works.

Quote from: wbnp on September 05, 2010, 06:34:57 PM
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 or even with this plugin. In addition, thumnails are defined in different ways. Last but not least, you can create the thumbnail manually or with the custom thumb plugin.

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

ΑndrĂ©

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.

martinc

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

wbnp


papukaija

Quote from: martinc on September 07, 2010, 06:37:34 AM
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

papukaija

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?)

wbnp

papukaija,

Works perfectly on my site with videos and still images!

Great work!

Many thanks!

Rockas

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.
My opinions may change but not the fact that I am right!

papukaija

Quote from: Rockas on December 22, 2010, 07:19:03 PM
i have my coppermine bridged with Joomla, don't know if this is important.
Does it work if you disable bridging?

Quote from: Rockas on December 22, 2010, 07:19:03 PM
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.

Rockas

Quote from: papukaija on December 22, 2010, 11:55:48 PM
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.
My opinions may change but not the fact that I am right!

papukaija

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.

Quote from: Rockas on December 23, 2010, 12:29:09 AM
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.

Joe Carver

Rockas is using an out of date version of the LightBox plugin. Updating and changing the order of plugins could help.

Rockas

@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.
My opinions may change but not the fact that I am right!

Rockas

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.
My opinions may change but not the fact that I am right!

Rockas

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
My opinions may change but not the fact that I am right!

TeknoSounds

After installing this plugin, I'm getting an error when attempting to delete comments from "Review Comments"  here is the error from debug:

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

spider666

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.

Rockas

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  ;)
My opinions may change but not the fact that I am right!