News:

Wondering if this will always be free?  See why free is better.

Main Menu

Share This Topic

Started by Suki, September 06, 2009, 05:09:23 AM

Previous topic - Next topic

Suki

Another alternative is to resize the button itself, go to your Sources/ShareThis.php file, 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>


Theres the number 350 two times there, change both to a smaller number, keep in mind that with a smaller number, the button might not be displayed properly.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Apllicmz

Yes good work
dont forget to add portuguese files




Dutchi00

Can someone tell me how I can change the way the Facebook button is displayed? The colors of the text and button don't match my theme. :(

Other then that, good mod!

Suki

Quote from: Suki on October 05, 2012, 07:38:21 AM
Go to your Sources/ShareThis.php file, 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>


This, this is the part where the code for facebook is, you just need to change a few parameters, take a look at their documentation.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

kattara

Hey Suki, I just noticed on my forum that the G+ button disappeared.  How do I get it back? (ie. http://www.themobilehangout.com/index.php/topic,202.0.html)


Suki

I can see the google button just fine, make sure you don't have any script blokers like ghostery.

Since the buttons relies on third party servers, sometimes they have problems and cannot deliver the buttons properly.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

kattara

Quote from: Suki on December 06, 2012, 02:40:00 PM
I can see the google button just fine, make sure you don't have any script blokers like ghostery.

Since the buttons relies on third party servers, sometimes they have problems and cannot deliver the buttons properly.

Ohhh... I see the problem now.  The button shows up on IE, but not on Firefox...

Suki

Yeah, I don't see it on my regular browser because I have ghostery installed but on my other casual browsers I can see the button just fine.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

kattara

Quote from: Suki on December 06, 2012, 02:57:06 PM
Yeah, I don't see it on my regular browser because I have ghostery installed but on my other casual browsers I can see the button just fine.

Ok.  Thanks for checking it out!

emrahseral

Hi everyone, hi Suki, how goes it?

I use 2.0.2 and a custom theme.

As can be seen in the attachment, I've an alignment problem with this mod where the top buttons move left (please note the bottom buttons are not affected by this). This problem manifests itself in every board and topics within every board.

Would anyone, particularly Suki, be able to help me correct this?,

Thanks in advance.

emrahseral


Suki

All the css that his mod sues can be found in Sources/ShareThis.php  is just a matter of changing the css for the AddThis button.

Without a link to a topic where the error occur I cannot do much.

Also, support for all my modifications will only be provided at my site.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

spiros

Great mod, thanks. One small issue, how can I disable it for Dragoon's mobile theme? http://smf-media.com/smf4mobile/

I can see this piece of code in display.php which makes sure it does not show on the wireless theme, how can we make it not show in the mobile too?

/* Share This topic mod start */
if (!empty($modSettings['share_buttons_enable']) && !WIRELESS)
{

Suki

I never seen that mod but if it uses something similar to the WIRELESS constant then you can add that on the same place you mention, just like the constant, can be a constant too or a simple var, theres gotta be something that mod uses to let other people know about it.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

spiros

#1714
I think it uses mobile, how do I add that?
By the way, it is a theme, but it has a mod to automatically use that theme if accessing the site from mobile device.

To redirect to the theme it uses this:

forum/index.php?thememode=mobile;redirect=

Suki

I don't know anything about that mod and I can't download it either, better ask the mod/theme author if there is a constant, a var or any other way to know if the current user is using the theme.

Once you have that you can add it jut like the wireless constant in Display.php
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

spiros

#1716
I am a total ignoramus when it comes to programming, and I just tried

/* Share This topic mod start */
if (!empty($modSettings['share_buttons_enable']) && !mobile)
{


which does the trick. Apparently it is not rocket science to me, to you it should be a piece of cake.

My question is how to make this apply for both WIRELESS and the mobile theme, that is, how can I use a logical operator OR in php in this string. Would it be

    /* Share This topic mod start */
if (!empty($modSettings['share_buttons_enable']) && !mobile || !WIRELESS)
{


No, I just tried and did not work.

Suki

So the mod does have a constant.

Using && and || operators in PHP does have its quote of difficulty, it is mostly related to math.


If you want to apply the check to both then sue the following:

      /* Share This topic mod start */
   if (!empty($modSettings['share_buttons_enable']) && !mobile && !WIRELESS)
   {

which reads:

If the mod is enable and we aren't in wireless and we aren't in mobile  then...

meaning it has to comply with all 3 checks, in your example the check only needed to pass 2 of them.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

spiros

Thanks, checking again, I realized that adding mobile stopped your mod from showing in the mobile theme, but it stopped it from showing in the main theme too  :(

spiros

Solution found:

if (!empty($modSettings['share_buttons_enable']) && !WIRELESS && empty($context['smf4mobile_version']))

Advertisement: