Social Media sharing block I made

psychoph

Joined: 2009-11-15
Posts: 36
Posted: Thu, 2011-12-29 05:49

My brother was looking for a way for his wife to share photos from our family gallery 3 site to facebook. I took the example code block made by floridave and stripped it down to a simple block that displays a button for facebook, google+ and twitter. The block is very basic and doesn't have all the options that you get from the social sites developer area, but it works and allows for sharing.

I am a little unclear about how to go about releasing a module to the community so I just made this thread and attached the zip file.

The code in the HTML code for each of the Social media sites is based on the following developer documentation
Facebook
Google+
Twitter

You can enable or disable each and if you go into the view directory you can modify the code for each in the file for the services name:
facebook.html.php
google.html.php
twitter.html.php

If there is interest i might work on adding more code or switching the views out for variables where you paste the actual code from each site, but it was simpler for now to hard code the usage i wanted.

AttachmentSize
social_share.zip11.43 KB
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2012-01-04 04:14

Thanks for sharing and making the codex page as well!
just a small typo in the helpers block code
$block->title = 'Social Meida Sharing';
should be:
$block->title = 'Social Media Sharing';

Cheers!
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
krishnabati

Joined: 2012-01-25
Posts: 2
Posted: Wed, 2012-01-25 04:29

Sir I need same Facebook like module option in the social share module what can i do ...where can i change the code please help me.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Thu, 2012-01-26 00:49

@krishnabati: I'm not sure what you're trying to do, but if this module doesn't do it, you might want to look at the "facebook like" module to see if that works for you:
http://codex.gallery2.org/Gallery3:Modules:facebook_like

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Thu, 2012-01-26 00:59

Hmm i will fix my typical typos.

As for facebook like i can look at adding that to the social share module. All i would be doing is cloning some chunk of code from the facbook like module tempg linked to.

After i did the work i also found the addthis module floridave made. The location of that button was where i originally wanted to put the facebook share.

I will see if i can make the change tonight.

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Mon, 2012-01-30 03:03

I have some fixes in and added the facebook like functionality mostly by cloning parts of the facebook_like module. I want to add more settings for each plugin and I need to test the upgrade from the first version as I am renaming some settings variables. It will probably take me a couple of weeks to get everything done.

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Thu, 2012-02-02 03:22

I have updated the module. I am attaching a zip here and I have put in a pull request to get the module into the contrib git repository. I will be working with git going forward.

I have added the Facebook like feature with some configuration options, far less than the Facebook like module has
I have added configuration settings for all the other buttons as well.

(edit)
Removing attachment

 
jweaver214

Joined: 2012-02-01
Posts: 3
Posted: Wed, 2012-02-01 06:37

Thank you for a great module. However, I just noticed a little bug. No matter what I put as text to be next to the share button, it says "test"

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Thu, 2012-02-02 03:22

I resolved that issue. Silly test code. Attached an updated version to the first post and bharat has included social share in the contrib git repository too now.

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Mon, 2012-02-13 18:05

Just started using this. I had been using my own code for all these but thought I'd try this out. One suggestion I have is to add the ability to specify which page types to display the block. I only want to show it on the photo and movie subtype. I was doing it this way:

 if (($page_subtype == "photo") || ($page_subtype == "movie")){
 ... blah ...
 }

Suppose I could add it to each button's code but I'd rather just not show the entire block. Wonder if there's some other module to control what sidebar blocks will display on which page types? Hmmm...

Thanks,
Mark H.

Using Gallery 3.0.2 - gallery.markheadrick.com

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2012-02-13 18:20

There is no module to specify the visibility of the block. However other modules have admin settings for visibility of blocks so this module could be extended to do so.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Mon, 2012-02-13 19:27

Well, I modified the code so it only creates the block for those pages.

In /social_share/helpers/social_share_block.php:

  static function get($block_id, $theme) {
   // MarkRH: added if statement to control block display
   if (($theme->page_subtype == "photo") || ($theme->page_subtype == "movie")){
   	$block = new Block();
   	$block->css_id = "g-social-share";
   	$block->title = 'Share With Friends';
   	$block->content = '';
   	if(module::get_var("social_share", "facebook_share_enabled")){
   		$block->content .= new View("facebook_share.html");
   	}
   	if(module::get_var("social_share", "facebook_like_enabled")){
   		$block->content .= new View("facebook_like.html");
   	}
   	if(module::get_var("social_share", "google_enabled")){
   		$block->content .= new View("google.html");
   	}
   	if(module::get_var("social_share", "twitter_enabled")){
   		$block->content .= new View("twitter.html");
   	}
   }
    return $block;
  }
}

Then, in /social_share/helpers/social_share_theme.php:

class social_share_theme_Core {
  static function head($theme) {
    if ($theme->item()) {
      // MarkRH: added if statement to control output of meta information
      if (($theme->page_subtype == "photo") || ($theme->page_subtype == "movie")){
   		$item = $theme->item();
   		$url = $item->thumb_url(true);
   		$appId = module::get_var("social_share", "facebook_like_appId");
   		$adminId = module::get_var("social_share", "facebook_like_adminId");
   		$site_name = module::get_var("social_share", "facebook_like_site_name");
   		$selfURL = url::abs_current(true);
   	  return "\t<meta property=\"og:image\" content=\"$url\"/>
   			<meta property=\"og:title\" content=\"$item->title\"/>
   			<meta property=\"og:type\" content=\"article\"/>
   			<meta property=\"og:url\" content=\"$selfURL\"/>
   			<meta property=\"og:site_name\" content=\"$site_name\"/>
   			<meta property=\"fb:app_id\" content=\"$appId\"/>
   			<meta property=\"fb:admins\" content=\"$adminId\"/>";
   	}
   }
  }
}

Might be a better way but it seems to work.

Thanks,
Mark H.

Using Gallery 3.0.2 - gallery.markheadrick.com

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Tue, 2012-02-14 21:46

This is more a CSS, Facebook, and IE issue I think but, in IE8, the Facebook Like popup dialog, gets chopped off to where you barely see the buttons. In Firefox (10.0.1) this doesn't happen. I've tried moving the placement of the popup to the left with CSS but then in IE8 it just chops it off on the left side. Basically, it doesn't let any of the box go outside the Sidebar area (using the default theme essentially).

With Firefox, I can always see the whole Popup window (to the left or right of the Sidebar edge). I've noticed that the Google+ popup window doesn't seem to have this problem in IE8 but so far haven't seen any CSS that would let it do so. It's hard to examine as the window disappears any time the mouse moves away from it I'm sure there's some CSS override trick somewhere I can use or some modification to the Sidebar's CSS that will let it work but so far haven't found it. Frustrating! LOL

Thanks,
Mark H.

Using Gallery 3.0.2 - gallery.markheadrick.com

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Wed, 2012-02-15 00:29

I haven't installed this module (I use the Facebook Like module), so I haven't tested what I am about to say. But if it is using the XBFML version of the Facebook code, then you can have problems with the like or share popup windows getting clipped. I have this problem in the Greydragon theme rather than the default theme. It occurs because the popup is located inside a DIV where the CSS overflow property is set to hidden. So the portions of the popups that fall outside the DIV are not shown.

I've solved this in GD with a complex set of custom.css settings. I haven't found a simple solution. I thought I tested this problem in the default Wind theme for V5 of the FB Like module, and IIRC it wasn't a problem, so if you are using the Wind theme then the cause may be something else.

U-G

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Wed, 2012-02-15 07:53

Between yesterday and today, Facebook changed the CSS related to the Like popup which changed its position relative to the Like button itself. But, anyway, I got it working and it turned out to be a simple fix. All I did in the end was add:

#g-sidebar {
   overflow: visible; 
}

Even though the overflow was never set to hidden, apparently IE8 assumed that anything that went outside the #g-sidebar div should be hidden. Now I'm a happy camper! :)

Thanks,
Mark H.

Using Gallery 3.0.2 - gallery.markheadrick.com

 
mikemayer67
mikemayer67's picture

Joined: 2012-01-10
Posts: 42
Posted: Fri, 2012-02-17 21:00

Would you mind terribly much if I added a pinterest button as well?
Of if you don't want others meddling with your code, would you mind adding one?
I really like this module... and am glad I found it before attempting to duplicate your effort.

 
mikemayer67
mikemayer67's picture

Joined: 2012-01-10
Posts: 42
Posted: Thu, 2012-02-23 04:01

@MarkH

Any particular place where you added this css tidbit as there doesn't seem to be any .css files in the social_share module?

danke

 
mikemayer67
mikemayer67's picture

Joined: 2012-01-10
Posts: 42
Posted: Thu, 2012-02-23 04:02

@undagiga

Any chance you could share your "complex set of custom.css settings?
My son's GD site is having the same problem....

My site with CleanCanvas does not.

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Thu, 2012-02-23 14:00

Which module is this for - the one in this thread or Facebook Like? I guess what works for FB Like should work for this module, but I can't be sure.

Can you post or PM a url for your son's site, as the CSS may need to be adapted. It is a bit site-specific.

But I should warn you that there is a catch. You need to have a fixed pixel width for your gallery, e.g. like 1000px, so that it fits on a smaller screen and is 1000px wide and centred on a wider screen. This width should be enough for 3 columns of thus and the sidebar. IIRC I don't think it's possible to use my approach if your gallery uses the full (variable) width of the screen.

 
mikemayer67
mikemayer67's picture

Joined: 2012-01-10
Posts: 42
Posted: Fri, 2012-02-24 03:15

Sorry, I probably should have been more concise. I am referring to the social share module (the facebook_like seems to be ok).

My son's site is http://gallery.photographique.com.
And yes, he is currently using variable width, so he may be out of luck in using by GreyDragon and the "facebook like" option of social share.

Let me know if you see a fix... otherwise, he will just need to give up on one of the two.

Thanks

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Fri, 2012-02-24 12:00

I think there's something wrong with the URL you posted, or the site is down.

I'm surprised that he had no problems with GD & FBL, as V5 of FBL should have had the same clipping problems in GD as social share (based on what I've read about SS).

 
mikemayer67
mikemayer67's picture

Joined: 2012-01-10
Posts: 42
Posted: Fri, 2012-02-24 15:46

DOH.... the URL should have been http://gallery.pcmphotographique.com.

There is not problem using FBL in GD because he is placing the button under the images, not in the sidebar.
I checked. If the button is in the sidebar, then the same problem shows up.

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Fri, 2012-02-24 23:23

I should have clarified earlier comment. If Social Share is in the sidebar then clipping should be easy to solve. Except that if the gallery uses 100% of the screen width then you may find that the expanded dialog is off the edge of the screen. This may need some sort of overall margin.

If you place one of these modules on thumbs pages at the bottom then the problems get much harder to solve. I'll take a look.

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Sat, 2012-02-25 06:17

First of all, regarding the Facebook Like on your son's site:
1 - I'm getting an AppId error. Perhaps he should check this. The message says 'The app ID "123456789012345" specified within the "fb:app_id" meta tag was invalid.' This AppId is just a demo one. He needs to create and enter his own. See the link on the module admin page.
2. The Facebook Like module on the home page doesn't result on any clipping when you click on the Like button, only because there's just one row of thumbs and the longer sidebar creates enough room for the Facebook Like popup to expand. If you go to another page with more rows of thumbs, such as http://gallery.pcmphotographique.com/index.php/Walt-Disney-World, and click on Facebook Like, you'll see the clipping. I can help him solve this with custom css, but only if he is prepared to limit the gallery width to say 1000px. Given that he already has just three columns, the only real difference is that the page will be more compressed horizontally, and centred on the page. If you want to pursue this, then switch to the Facebook Like Module support thread, so that we don't hijack this one any more.

As for Social Share, I couldn't generate any clipping. See the attached screen grab. I have to admit that I am surprised by this. This might vary depending on OS and browser. If you're seeing clipping, then try this line in a custom.css file:
#g-column-right {overflow: visible;}
Which is similar to the solution posted by MarkRH above for the default theme.

U-G

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Sun, 2012-02-26 19:07

I will take a look at all the suggested changes including pinterest over the course of the week. I have been reading the comments. I have been too addicted to skyrim to take time to program anything.

Does gallery offer any tracking system for plugins like bugzilla? If not i should probably start tracking these requests in github.

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Tue, 2012-03-06 08:18
mikemayer67 wrote:
@MarkH

Any particular place where you added this css tidbit as there doesn't seem to be any .css files in the social_share module?

danke

Guess I should have specified that. I just added it to the end of the theme's screen.css file that is in the CSS folder of the theme as that is the last CSS file to be loaded.

Hope that helps,
Mark H.

Using Gallery 3.0.2 - gallery.markheadrick.com

 
Ted.Szukalski

Joined: 2006-06-22
Posts: 10
Posted: Thu, 2012-04-26 11:17

If you are using Social Share module you may have noticed in generates JavaScript errors and fails to show Goggle+ widget. This is due to a typo in the modules/social_share/views/google.html.php

Line 14 is: x2po.async = true;
Line 14 should be: po.async = true;

I hope this helps someone.

Ted

 
Josef Samuel

Joined: 2012-07-03
Posts: 1
Posted: Tue, 2012-07-03 15:32

Thanks Ted, that was very helpful!

 
rhino876

Joined: 2003-07-01
Posts: 7
Posted: Sat, 2012-07-28 23:11

I just installed this module and noticed a weird quirk and wondered if anyone else had seen it.

In Chrome and IE, the FB Share button isn't providing the proper link (I'm getting a "null" at the end of the link instead of the last part of the link i.e. rhinoblues.com/family/index.php/dad/stp05/null instead of rhinoblues.com/family/index.php/dad/stp05

It works correctly in Firefox.

I also don't have the FB Like button activated because once I did that, the Share button disappeared.

 
Saur0n
Saur0n's picture

Joined: 2012-08-26
Posts: 1
Posted: Sun, 2012-08-26 16:05

Hi,

I'm afraid that, not so long time ago, "like" button stopped working - if it's visible at all, it points to "test". Is this only my problem - or general? Does fb has changed something?

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Sun, 2012-08-26 16:52

@rhino876: I haven't looked at the code, but, as an idea, you could use php to strip "/null" from the end of any URLs. Not necessarily the best solution, but assuming you haven't worked this out in the last month, this will at least make the module functional.

@Saur0n: Not ignoring you, but I'm without a test server right now. (Plus, I've been super busy lately.) I don't want to install this and play on the production server for obvious reasons.

 
DantePasquale

Joined: 2007-11-05
Posts: 28
Posted: Thu, 2012-08-30 19:37

Nice Plugin, but I also noticed that same issue as @Saur0n -- only points to http://www.test.com -- If you need somewhere to test, maybe I can give you limited access to my server? Let me know if I can help, but I'm tied up with a database server (OEL 5u8) for the weekend.

http://www.DantesInfernoPhotography.com/gallery3
http://www.DantesInfernoPhotography.com/blog
http://www.DantesInfernoPhotography.com

 
shuvit
shuvit's picture

Joined: 2012-08-27
Posts: 1
Posted: Thu, 2012-08-30 19:52

Hi, I've the same problem with Facebook as Saur0n. Button doesn't work anymore.

 
tempg

Joined: 2005-12-17
Posts: 1857
Posted: Fri, 2012-08-31 12:12

I'm assuming that the test.com popped up after a new install and/or an upgrade of the module. Is that accurate?

It sounds like maybe you're supposed to edit one of the files (or some setting in the admin interface) to have your information instead of the test.com. Should be easy to find if you search the code for "test.com"

 
MarkRH

Joined: 2007-05-25
Posts: 241
Posted: Sat, 2012-09-01 04:27

Sometime back I had to go in and change the code due to changes Facebook made. Here's my /modules/social_share/views/facebook_like.html.php now:

(Think I had Facebook generate the code for a Like button and then I modified the code to match.)

<?php defined("SYSPATH") or die("No direct script access.");
$appId = module::get_var("social_share", "facebook_like_appId");
$selfURL = url::abs_current(true);
$codeType = module::get_var("social_share", "facebook_like_code_type");
$layout = module::get_var("social_share", "facebook_like_layout", "standard"); 
$action = module::get_var("social_share", "facebook_like_action", "like"); 
if (module::get_var("social_share", "facebook_like_show_faces")) {
	$show_faces = "true";
	$hite = 65;
} else {
	$show_faces = "false";
	$hite = 38;
}
if (module::get_var("social_share", "facebook_like_send")) {
	$send = "true";
} else {
	$send = "false";
}
?>

<div class="g-social_share-facebook_like">	
<?php if ($codeType == 'iframe'){ ?>
<iframe src="//www.facebook.com/plugins/like.php?href=<?= $selfURL; ?>
&amp;send=<?= $send ?>
&amp;layout=<?= $layout ?>
&amp;width=180
&amp;show_faces=<?= $show_faces ?>
&amp;action=<?= $action ?>
&amp;colorscheme=light
&amp;font
&amp;height=<?= $hite ?>
&amp;appId=<?= $appId ?>"
 scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:180px; height:<?= $hite ?>px;" allowTransparency="true"></iframe>
<?php } else { ?>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=<?= $appId ?>";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<?php if($codeType == 'xfbml'){?>
<fb:like href="<?= $selfURL; ?>" send="<?= $send ?>" width="180" show_faces="<?= $show_faces ?>" layout="<?= $layout?>"></fb:like>
<?php } else { ?>
<div class="fb-like" data-href="<?= $selfURL; ?>" data-send="<?= $send ?>" data-layout="<?= $layout?>" data-width="180" data-show-faces="<?= $show_faces ?>" ></div>
<?php } 
}
?>
</div>
<?php
/**
 * Only show the like button, css and JS if the item is vewable by the guest user 
 * as facebook is a guest user to get the thumb of the item.  If this is a dynamic 
 * album then use the root album to check to see if the guest has permissions.
 */
$guest = user::lookup("1");
$item = "";
if ($theme->item()) {
  $item = $theme->item();
} else {
  $item = ORM::factory("item", 1);
}
if (access::user_can($guest, "view", $item)) {
  $show_like_code = true;
}
?>

You might need to adjust the width and $hite values for your particular theme. The above code does still seem to work for me. Hope it helps.

- Mark H.

Using Gallery 3.0.4 - gallery.markheadrick.com

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Sat, 2012-09-01 21:33

Taking a look at all the issues today. I will try to get an update for this over the weekend. [i]I wish there was some sort of issue tracker i could use for this module, but i could not find anything on git hub for the fork i made.

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Sun, 2012-09-02 04:00

I added issues it to github. If there are other issues that people find as I am fixing things please report them at https://github.com/psychoph/gallery3-contrib/issues.

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Sun, 2012-09-02 04:02

Looking at the text.com issue it is when xfbml is being used and i didn't take out an extra line so there was a double fb:like being printed. I will see about pushing out an update.

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Sun, 2012-09-02 04:01

I have updated the zip file with the latest and greatest. I have done the following:
* Fixed facebook like to work better, it was having issues with actions and not creating any buttons
* Fixed facebook share I think it was working with chrome i did find a statement on some site i can't find now that mentioned to get it to work with older browsers you had to acc code the opening html tag, which i can't do in the block. Everything on facebook says share is deprecated now and to use the like button instead.
* I added pinterest and it works. For some reason on chrome the count was not displaying horizontally i don't know where the element is getting the display:none; from in the css.
* Added support for setting the block to oly display on image and movie sub pages. This is now on by default, which is a change in behavior.
* fixed the x2po issue.

I am going to try to get git hub updated my fork has the correct code however i have to remember how to push back to gallery contrib.

Hope this fixes things for people and I am sorry about the long delay in updates.

 
DantePasquale

Joined: 2007-11-05
Posts: 28
Posted: Wed, 2012-09-05 20:20

Thx! Where do I download the new zip file? I just made the changes directly to the code.

http://www.cocoanet.us/gallery3
http://www.dantesinfernophotography.com/gallery3
http://www.dantesinfernphotography.com

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Wed, 2012-09-05 23:35

You can download the file from the first post. I just keep updating the one zip file with the most recent version so that people don't have to page through the forums if this thread gets huge. I also upload everything to github and put in a request for it to be added to the gallery-contrib

http://codex.gallery2.org/Gallery3:Modules:social_share also has the current information updated.

any issues please post at https://github.com/psychoph/gallery3-contrib/issues

 
soundlover

Joined: 2012-09-08
Posts: 10
Posted: Sat, 2012-09-08 15:27

Why is it that when I click Share (facebook) the link ends with null instead with the photo name. So when someone on facebook clicks on it, then it tells him page does not exist and maybe he needs to login.

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Sat, 2012-09-08 16:18

I will have to look at this. The share button isn't really supported by facebook anymore. I would recommend the like button instead.

 
soundlover

Joined: 2012-09-08
Posts: 10
Posted: Sat, 2012-09-08 17:54

Thanks for the reply. Twitter and others work perfectly. Like works too but I am having another problem with it. The window that pops up when you click like is not all visible because its on the far right. Don't know how to fix it. http://www.lilithimages.com/gallery
Is there a way I can make it smaller?

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Sat, 2012-09-08 19:54

It looks like every which way i add the share button it comes up with null for the last part of the url. I can not find a single example that works and Facebook has taken down their documentation on it. I am going to remove the share button and migrate people to using the like button instead.

Base on @undagiga comment above it looks like custom.css needs a new value in it
[code]#g-column-right {overflow: visible;} [code]

I am unclear where custom.css is if it is the theme for the site or if it is something i can add to the module.

 
soundlover

Joined: 2012-09-08
Posts: 10
Posted: Sat, 2012-09-08 21:36

I have added it to custom.css which I had created earlier, but its still not all visible. Need to make that window smaller. Is it possible?

 
psychoph

Joined: 2009-11-15
Posts: 36
Posted: Sat, 2012-09-08 22:55

Not from what i can see in facebooks documentation. Facebook recommends the same change to the override if the like button is placed near the edge of the browser. It maybe that with your theme it needs to be a different css selector to actually affect the popup. Which theme are you using? I can test with that one on my test site and see if i can get the css to fix the issue.

 
soundlover

Joined: 2012-09-08
Posts: 10
Posted: Sun, 2012-09-09 00:22

I am using Grey Dragon Theme.

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Sun, 2012-09-09 03:21

It can be tricky to get later versions of FB modules to work in Greydragon. Not impossible, but tricky. The issue is the overflow:hidden one. For the FB like module, one option is to make sure that the XFBML version is *unchechecked* in the module admin options, as the XFBML version expands when you click a button and that's when the overflow hidden problem happens. I haven't tried the other version for a while, but IIRC it didn't have this problem. Not sure if the module that you're using has this option.

I looked at lilithimages and couldn't see any sign of FB like or any other social sharing module. I can provide more detailed comments if I can see it in action on your site.

U-G

 
soundlover

Joined: 2012-09-08
Posts: 10
Posted: Sun, 2012-09-09 16:59

Its on http://www.lilithimages.com/gallery/index.php/Cool/purple right bottom.
I tried iframe but does not work.
I only want Like to work as for Share I got another module which works perfectly. Its at bottom under photo with many other social networks.

 
undagiga

Joined: 2010-11-26
Posts: 693
Posted: Mon, 2012-09-10 01:40

I see your problem. It's very hard to reformat code that comes from FB, as it is delivered on-the-fly and it's rather detailed and complex. And believe me I've tried. It might be possible to find some custom CSS to do what you want, but it would mean spending a lot of time with no guarantee of success, especially if (as I suspect) the format for this is set inside some javascript. Actually, I tried, and I found that I might be able to narrow the width, but when I did that there wasn't enough height to see the submit buttons, and I couldn't find a way to increase it. FB tries to size this dynamically. I also tried shifting the whole thing to the left, but then I got clipping on the left.

I think the simplest way is to narrow the width of your gallery, and set the overflow property for the sidebar to visible. Try this code in your custom.css:

body { margin-right: auto; margin-left: auto; width: 1000px; }
#g-column-right {overflow: visible;}

You can set the width parameter to either a pixel value or a percentage, e.g. 75%. You will need to experiment.

I had some trouble using the like button on your site, not related to this I think. The pop-up dialog vanished rather quickly and in place of a like button there was a confirm button. Clicking the confirm button gave another confirm dialog and then I had successfully like the page, I think. I haven't seen this before. Perhaps it's intended behaviour in this module.