News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Share This Topic

Started by All Colours Sam, September 06, 2009, 05:09:23 AM

Previous topic - Next topic

MarkS

ok i made a small .png http://www.africancichlidtalk.co.uk/Themes/inferno_20a/images/custom/Facebook.png
and its working.
so any thing ive liked before will not show the new image ?


lastly is the coke ok or better looking like this

echo '
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
        <link rel="image_src" href="http://www.africancichlidtalk.co.uk/Themes/inferno_20a/images/custom/Facebook.png"/>
</head>
<body>';
}

function template_body_above()


pastorvictor

Quote from: PokémonS on January 05, 2013, 01:03:19 AM
Quote from: caper12 on January 04, 2013, 07:09:51 PM
Does anyone know of a way to make it use an image or logo to display on the FB page? Right now it displays some tiny little .GIF with a white square around it on the FB post

Put this code in the <head> of HTML

<link rel="image_src" href="http://LINKTOLOGO" />

Please help, I already added that to my theme's index.template.php file but it still doesn't show the logo on Facebook when sharing a topic. Does it need to go on the index.template of the theme I've set for all users, or on the one for the default template? What else could've gone wrong?

All Colours Sam

If you have multiple themes and you allow your users to chose their theme then yes, you must add it to all of your themes.

Keep in mind that the logo needs to have an specified height and width (can't remember whats the max size).

The logo will only be applied to new topics, older topics will not be modified.
You image must be a valid image and it needs to be accessible by guest.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

pastorvictor

Thank you for your reply, Suki. I've actually set a theme and I'm not allowing users to change it, so that's why I just added it to that theme's index.template file. I had to create a fb app for another mod, and I'm using the "primary icon" that Facebook asked for (75x75). When I say I'm using it, I mean that I'm even using the facebook URL for the image. Do I have to upload it to my server? If so, how would I make it accessible by guest?

All Colours Sam

The image doesn't have to be on your server, it only needs to be a valid and callable image with the height and width that facebook requires.

Sometimes Facebook doesn't correctly pick the image when sharing a topic, there is no fix for that since this mod heavily depends on facebook servers.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

pastorvictor

Okay, thank you, Suki. I guess I'll have to live without the image for now :\
One more question: how do I translate the text that says "Be the first of your friends to like this."?

All Colours Sam

Open your Sourcedir/ShareThis.php and find:


<iframe src="http://www.facebook.com/plugins/like.php?href='. $this->url .'&amp;layout=standard&amp;show_faces=false$amp;send=true&amp;width=350&amp;action=like&amp;colorscheme=light&amp;height=:80" scrolling="no" frameborder="0" style="border:none; overflow:visible; width:350px; height:80px;" allowTransparency="true"></iframe>


follow facebook doc to properly change the language: http://developers.facebook.com/docs/reference/plugins/like/ this mod uses the "iframe" iframe version.

Keep im mind that facebook very ofetn doesn't respect their very own settings... so, even if you put a language string, it might not pick it up correctly.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

pastorvictor

This is what Facebook says:

src="http://www.facebook.com/plugins/like.php?locale=fr_FR&..."

So just to be sure, would it end up looking like this?

<iframe src="http://www.facebook.com/plugins/like.php?locale=es_ES'. $this->url .(rest of the code)

All Colours Sam

Sort of. you need to separate each value with an "&" so:


<iframe src="http://www.facebook.com/plugins/like.php?locale=es_ES&amp;'. $this->url .(rest of the code)
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

pastorvictor

Uh oh....I added the code exactly like that and now the whole thing is gone :S I noticed that there's a href in the original code, like this:

like.php?href='.

But it's not in the new one:

like.php?locale=es_ES&amp;'.

Could that be the problem, maybe?

All Colours Sam

Use this one:


<iframe src="http://www.facebook.com/plugins/like.php?href='. $this->url .'&amp;layout=standard&amp;show_faces=false$amp;send=true&amp;width=350&amp;action=like&amp;colorscheme=light&amp;height=:80;locale=es_ES&amp;" scrolling="no" frameborder="0" style="border:none; overflow:visible; width:350px; height:80px;" allowTransparency="true"></iframe>


The mod used to have a way to select your language from the admin settings but a lot of people just couldn't figure it out how to do so even when all they need to do was select their language from a drop-down and also, facebook loves to skip their own documentation and continuously ignored the language and other parameter such as "show faces" and the height and width.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

pastorvictor

Thank you, Suki. I added the above and now the button and the text are back, but still in English. What else could I try?

All Colours Sam

Well, technically, there isn't anymore things to add, like I said, facebook loves to ignore their own settings, that is why there are so many angry devs.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

pastorvictor

Yes, I can see that....by the way, the buttons seem to be adding a lot of extra space at the bottom or at the top of the actual post (depending on where I put them). Is there any way to decrease this space? I already tried with just a "1" in the AP settings, but they still take up too much space.

All Colours Sam

The extra space is for the comment box that the facebook button uses. But if you do not want it, in the Sources/ShareThis.php near the end is all the css code his mod uses, you can remove the space from there.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

pastorvictor

You mean this part?

.sharethis_twitter, .sharethis_google
{
'. (!empty($modSettings['share_likebutton_enable']) ? '
   position: relative;
   top: -60px;
' : '') .'
}

All Colours Sam

let me check, is been ages since the last time I saw this mod in action but I do remember that the extra spaec was the only reasonable way to show the facebook comment box.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

pastorvictor

Ok, thank you, Suki. I'm just not very good with css.

johnpaul2k2

CAN THIS WORK WITH 2.0.4?

All Colours Sam

Quote from: johnpaul2k2 on February 16, 2013, 01:46:46 AM
CAN THIS WORK WITH 2.0.4?

Yes...   theres no need to ask (much less in capitals...)... ProTip: if you go to the mods page, select 2.0.4 and click in the "parse" button and the mod does parse, it means it can and would work on 2.0.4...
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Advertisement: