Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3 4 5   Go Down

Author Topic: Facebook sharer for cpg1.5.x  (Read 45537 times)

0 Members and 1 Guest are viewing this topic.

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Facebook sharer for cpg1.5.x
« Reply #20 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.

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
« Last Edit: September 05, 2010, 12:54:57 pm by papukaija »
Logged

wbnp

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 37
Re: Facebook sharer for cpg1.5.x
« Reply #21 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

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

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Facebook sharer for cpg1.5.x
« Reply #22 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 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Facebook sharer for cpg1.5.x
« Reply #23 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.
Logged

martinc

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Facebook sharer for cpg1.5.x
« Reply #24 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
Logged

wbnp

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 37
Re: Facebook sharer for cpg1.5.x
« Reply #25 on: September 07, 2010, 10:47:55 pm »

That's odd - the link mine uses is http://www.facebook.com/sharer bla.bla.bla
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Facebook sharer for cpg1.5.x
« Reply #26 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
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Facebook sharer for cpg1.5.x
« Reply #27 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?)
Logged

wbnp

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 37
Re: Facebook sharer for cpg1.5.x
« Reply #28 on: September 08, 2010, 08:23:45 pm »

papukaija,

Works perfectly on my site with videos and still images!

Great work!

Many thanks!
Logged

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #29 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.
Logged
My opinions may change but not the fact that I am right!

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Facebook sharer for cpg1.5.x
« Reply #30 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.
Logged

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #31 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.
Logged
My opinions may change but not the fact that I am right!

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Facebook sharer for cpg1.5.x
« Reply #32 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.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1498
  • aka 'i-imagine'
    • Home Page
Re: Facebook sharer for cpg1.5.x
« Reply #33 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.

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #34 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.
Logged
My opinions may change but not the fact that I am right!

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #35 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.
Logged
My opinions may change but not the fact that I am right!

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #36 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
Logged
My opinions may change but not the fact that I am right!

TeknoSounds

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
    • TeknoSounds
Re: Facebook sharer for cpg1.5.x
« Reply #37 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

spider666

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Facebook sharer for cpg1.5.x
« Reply #38 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.
Logged

Rockas

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 54
  • **Spaceman**
    • Windows and Souls
Re: Facebook sharer for cpg1.5.x
« Reply #39 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  ;)
Logged
My opinions may change but not the fact that I am right!
Pages: 1 [2] 3 4 5   Go Up
 

Page created in 0.025 seconds with 21 queries.