Customizing SMF > Modifications and Packages

Share This Topic

<< < (325/354) > >>

Suki:
OK new version 4.2:

-Added a way to show the buttons outside messages and topics.
-Added an option to add custom buttons.
-Added a "via" setting to specify the username in twitter button.
-Added the board check the the AddThis Script.

Now you can use the buttons outside the messages, is as simple as this placing this code wherever you want the buttons to appear:

$share = new ShareThis($url);
$share->CreateButtons();


$where $url is the custom url you want to share, after that just put this:

$share->CustomDisplay();

Wherever you want the buttons to appear.


Also, now you can add custom buttons without the need to edit the files, using the same example:


$share = new ShareThis($url);
$share->CreateButtons($custombutton);

$custombutton can be either a single array or a multidimensional array, the array must have the following:

name - the name to identify your button
code - the script for your code, in the "url" parameter you will use "%s"  later the mod will replace that with the correct url
enable - set as 1 to show it or 0 to hide it.
 
as a single array:

            $array = array(
                  'name' => 'test',
                  'code' => '<a href="%s">test name</a>',
                  'enable' => 1

            );

as a multidimensional array:

            $array = array(
               0 => array(
                  'name' => 'test',
                  'code' => '<a href="%s">test name</a>',
                  'enable' => 1
               )
            );

that is the most basic button, it will show a simple link.


I'll post a more detailed guide on my site later today.

Brown Recluse:
I installed this app.  the share buttons work just fine but the like button does not.  when I click the like button I am prompted tol log into FB and I enter my info and hit log in.  The popup window disappears and nothing happens.
  I am running 2.0.2  with the curve theme.
Thank you

phasethreeforum.com is my site

Suki:
To properly use the Like button, you need to be already logged in to facebook, just go to facebook, log in, click to remember you, now the next time you like something you don't need to log in again.

Brown Recluse:
I tried that but it did not work. I don't think the problem is the app.  I added the following to the index.php  page just to test it out.
<html>
    <head>
      <title>My Great Web page</title>
    </head>
    <body>
       <iframe src="hxxp:www.facebook.com/plugins/like.php?href=YOUR_URL [nonactive]"
        scrolling="no" frameborder="0"
        style="border:none; width:450px; height:80px"></iframe>
    </body>
 </html>

The like button appeared at the top of the page and the same thing happens... I log in and the like does not appear on my FB page.  I m not sure what the problem is.

Suki:
Well, Facebook, removed the like on webpage from it's own page a while ago, I dunno why they did it, I guess it was to prevent abuse.

Basically, if you like an external page using the like button, this "like" isn't gonna appear on your facebook wall like it used to (unless you left a comment), at least I am unable to find where exactly can you see your "likes" on your own facebook wall, it appears that the only "likes" that appear are the ones from inside facebook only.

Or perhaps is because I'm using the iframe version instead of the SDK version.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version