Module: Facebook like module
floridave
Joined: 2003-12-22
Posts: 27300 |
Posted: Sun, 2010-10-24 19:59 |
Facebook like/recommend module. Dave |
|
floridave
Joined: 2003-12-22
Posts: 27300 |
Posted: Sun, 2010-10-24 19:59 |
Facebook like/recommend module. Dave |
|
Posts: 253
Hi Dave,
Nice modules you made there. it works pretty well and I have been trying all the settings
I have only a few suggestions :
1) Would it be possible to add the button in the list of icons (view full size, slideshow, etc) ?
2) The button appears about ten seconds after the photo has been uploaded so I guess the users won't wait until then to use it. Is there a way to make it appear quicker ? I put the Facebook like module on the top of the list of the "Module Order" module but it does not change anything.
3) Again and again, no thumbnail appear in the posts on Facebook, I know it's a FB problem, but it is still annoying.
-----------------
Gallery stats
* Version: 3.0 (Santa Fe)
* Albums: 12
* Photos: 168
remove Platform information
* Host name:
* Operating system: Linux 2.6.18-194.11.3.el5
* Apache: Apache/2.2.3 (Red Hat)
* PHP: 5.2.6
* MySQL: 5.0.77
* Server load: Unavailable
* Graphics toolkit: gd
Posts: 27300
I tried but most of the buttons are square and as far as I know the button that facebook uses is not customizable. It is a <iframe> and quite wide.
I could investigate but if you have an idea why let me know.
Is it related to this module? I don't understand.
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 253
I mean that the thumbnail of the picture does not appear in the posts, I don't know if you can do smth about it, same problem with the "share module" or even Facebook applications such as RSS graffiti and Gallery Status Updater
.
-----------------
Gallery URL = http://www.coquille.org/gallery/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql
Posts: 132
Nice module, Dave
Why not another button "Share:fb"
Regards
www.ajorge.net
Posts: 27300
Thanks!
There is a share this and share bookmark module(s)
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
I Dave,
Nice module.
But I have a concern with language. My home is French by default
Firefox, on any language, it remains in French
With IE8, it is in German!
And impossible to translate natively Gallery3!
Bug or not ??
Thanks
Posts: 27300
http://developers.facebook.com/docs/reference/plugins/like says it is a simple switch. So I guess U can fix that.
I will have to add some code and detect the version. This opens a big can of worms as you can detectt the browser locale, the G3 default locale, the user default locale and the user selected locale.
What one to use?
I am not willing to make a admin option for this but you are welcome to code some if you wish.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
Thanks ... I have make test. Is IE8 + windows!!
If i set the regional setting at French (france) OK. But I'm French (swiss)
On FireFox it use fr oder fr_FR but not IE !!! it want fr_CH and I hop not exist at Facebook, so comming de_CH !!!
Posts: 27300
Updated to read the users cookie locale value.
Use attached file above.
Bumped to version 2
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
Thanks Dave!!
With the 2.0 is OK now!
Posts: 33
Button works, but does not integrate nicely:
http://gallery.olausson.de (Missing border around the module)
And when I enable the normal style the text is half way out of the box (to the right)
I am not sure if it is the buttons fault or the fault of the template, but I would guess the button does not take the template styling into account.
Thanks for the nice work you have done.
Cheers
Bjoern
--
http://olausson.de
http://gallery.olausson.de
Posts: 27300
If you can sort out the css of the theme you are using to make this module more to your likeing I am willing to include those changes.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
This is not a block and thus does not have the g-block wrapper.
You are more than welcome to make changes to the modules code to your liking to fit your theme.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 33
Mhh, okay, but why is the text cut?
I searched all the css styles but could not find a option to enlarge the textbox
See here:
--> http://gallery.olausson.de
Any hints?
[EDIT]
Found it!
[/EDIT]
Cheers
Bjoern
--
http://olausson.de
http://gallery.olausson.de
Posts: 27300
It would be nice if you posted a solution for the benefit of the community.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 33
Sure. I was so obvious that I just forgot to post it.
Here's how I did it:
in views/facebook_like.html.php increase the value for height:
By the way, why not add control options to the admin site for all changeable options facebook provides?
http://developers.facebook.com/docs/reference/plugins/like
This would also help to control the height and width for individual themes.
Cheers
Bjoern
--
http://olausson.de
http://gallery.olausson.de
Posts: 27300
Just height and width?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 33
Well, you could make it feature complete by adding all the attributes listed on http://developers.facebook.com/docs/reference/plugins/like to the admin page.
If you do so, keep the restrictions in mind like
You might consider to use the XFBML version.
Cheers
Bjoern
--
http://olausson.de
http://gallery.olausson.de
Posts: 41
AddThis has a new option that combines FB Like, a Tweet button and the usual Share button for all other services. I copied that code and pasted it in place of the code in share_bookmark_block.html.php, but the FB Like count/balloon didn't show. Also, I need to widen the sidebar a bit to get it all on one line and couldn't figure it out in the css.
Posts: 41
I ended up doing the following to your share_bookmark_block.html.php file to get the long Share button and their FB Like and Tweet buttons:
<script type="text/javascript">
var addthis_config = {
username: "YOUR ADDTHIS USERNAME"
}
</script>
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&username=xa-4ceb41967d22f68c"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a>
<br /><br />
<a class="addthis_button_facebook_like"></a>
<a class="addthis_button_tweet"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>
The <br /><br /> is to place the FB and Tweet buttons on their own line, otherwise it looks unprofessional with Tweet alone below FB and Share. (I could've used one of their smaller Share buttons to get everything on one line, but I like their longer Share button.)
http://www.blackboxnynj.com/gallery/
R
Posts: 1857
@petri: What's the url of the site you're adding this to? I went to the site in your signature, but it's not Gallery3.
Posts: 253
Yeah sorry, I have not made the big step yet, still testing Gallery 3
http://www.coquille.org/gallery3/
-----------------
Gallery URL = http://www.coquille.org/gallery/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql
Posts: 1857
I get images when I share your pages to Facebook; I actually get way more images to choose from than are on the page. (I think they're coming from the sidebar.) Doesn't work for you?
Posts: 253
Yes, indeed, to my surprise, the "share" module works fine in terms of images publishing on Gallery3 (not Gallery2 though) and that is a great news !!!
But I was talking about the "Facebook Like" module, the topics of this post. This one does not publish the image, just a text, such as :
for this page :
http://www.coquille.org/gallery3/index.php/Portfolio/Design/Color/bougie
But maybe it is normal, Facebook like does not publish photos...
By the way... about text... could it be possible to take away the double :: on the title of the page ?
-----------------
Gallery 2 URL = http://www.coquille.org/gallery/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.6 apache2handler
Webserver = Apache/2.0.52 (CentOS)
Database = mysql
Gallery 3 URL = http://www.coquille.org/gallery3
Version: 3.0 (Santa Fe)
Système d'exploitation : Linux 2.6.18-194.11.3.el5
Apache: Apache/2.2.3 (Red Hat)
PHP: 5.2.6
MySQL: 5.0.77
Posts: 27300
Best to start a new thread as to not confuse the topic at hand.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 6
Is there a link to the newest version of this module? Or isn't it really ready yet?
Posts: 1857
@petri: It's normal; that's the way like works. As for the ::, it's controlled in your theme and I agree with floridave that you should start a new topic thread if you need help with that.
@Jeeves_: Yes, the module works; the link is at the top of the page http://codex.gallery2.org/Gallery3:Modules:facebook_like
@floridave: Thanks for the module!!
Posts: 27300
tempg,
Thanks and thanks for your help in the forums as well. Feel free to takeover this module if you see and or want improvements.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 394
Dave, is there a "Share" button like this one?
Posts: 27300
http://gallery.menalto.com/node/99043
care to contribute to the community by creating a codex page for it after you get it installed?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 394
Of course I will. Any instructions? I have never done it.
I had a look at that thread, but that doesn't look like a module. It's a script that hasn't been "modulized."
Posts: 27300
The second post is the module.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
As for directions: login go to a page you want to create with the url copy/paste/edit to your hart content.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 15
Hi Dave,
I have a problem with your module, when I click on like button on my facebook page I can see the right title and the right link of my liked picture, but the thumbnail showed is from another picture in my gallery.
Do you know which could be the problem?
Thank you
Greetings
Riccardo
Posts: 27300
Works for me. Perhaps you are liking an album?
post a url or the source of the page in question after
<div class="g-facebook_like">
to the end of the</div>
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 15
I tried with this photo for example
http://www.lateatgallery.org/index.php/Fuerteventura/Black_windmill
and in facebook I find the thumbnail of this photo
http://www.lateatgallery.org/index.php/Fuerteventura/T_shirt_of_the_day
But same problem with all picture in any album
Posts: 11
I tried this on multiple different photos. At one point, it posted a photo from a completely different album but had the text for the photo that I had liked.
Gallery 3.0.1
Posts: 1857
The share button works; it's pulling an image from the navigator module because Facebook can't distinguish which image you want highlighted.
@floridave: It may help Facebook know what thumb to use if the module can add
<meta property="og:image" content="LINK-TO-ITEM/ALBUM-THUMBNAIL"/>
to the header of each page. I don't really understand how modules do their business, so I don't know how to test that out.Posts: 27300
I see the issue that lateatnight has but don't know how FB gets the image from the code. The code in the <i frame> that is generated looks fine to me and has the proper url.
tempg;
If you add that to the page.html.php of the theme... to test it out then if it works, then I can add this to the module.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
Pintac,
URL or are you using some additional modules like lateatnight?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 15
If it can help you, I'm using these modules:
* Facebook like
* Fancy boxes
* Google analytics
* Kbd Navigation
* Thumb navigator
* Stop owner counts
I installed Share & Bookmark after discover the thumbnail problem of facebook like
Posts: 11
Modules that I added are
Adsense
ContactOwner
FaceBook Like (deactivated)
reCaptcha
It likes to pickup the advertisement banner in my footer as the image on FB.
Site can be found here.
http://www.philippinegallery.com
I'll reactivate the FB Like button.
Is it possible in a future release to have the option to place Like button below the pictures?
Posts: 27300
see if the attached works better. I added a
<meta property="og:image" content="LINK-TO-ITEM/ALBUM-THUMBNAIL"/>
as suggested by tempg. If you are in an album it will use the hightlight thumb.Let me know so I can remove the other attachment.Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
Seems to be working so far. Tried it on a few different photos.
But when you click like, shouldn't you receive a popup box asking you for the share permission level on facebook?
Posts: 15
I tried it in a lot of pictures and it seems to work well. Thank you Dave
Posts: 2
Unrelated question: is there a way of hiding the Like button for pictures in private albums? I havn't tried what happens when I click on such a button but I guess Facebook will create a link to a login box.
Best,
Roland.
Posts: 27300
I don't know. If a user is logged it already it should just add it. If you are not logged in I think there is a popup or some redirect for the user to login. Not sure if the user has some popup blocker what hapends.
Atrus,
I guess I should fix that. FB needs to have access to the image to get it. What do you think of still having the 'like' button but only give facebook a generic thumb? Or is it better just to not show the like button at all?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 1857
@floridave: Apologies for not getting back; overlooked it.
@pintac: The new line works for you, but it's just coincidental because of the way your page is laid out. You're supposed to replace your facebook like module with the one posted by @floridave above: http://gallery.menalto.com/node/98752#comment-370082
Posts: 11
I did replace it with those files and yes it works. The part about permissions was a separate thing. It posts to the profile but not to the news feed like everything else unless you click on share.
Posts: 2
@ Floridave, I would prefer not showing the button at all, so that facebook never knows about private albums.
Roland.