News:

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

Main Menu

Addthis button in first post

Started by franklinrony, June 02, 2009, 12:40:11 AM

Previous topic - Next topic

franklinrony

Link to Mod

Description
   
With this mod you can add the AddThis button on the first post by offering some extra features such as:

-Select Language  via AddThis API
-you can place your company name / website
-possibility to disable the mod
-you can choose the service to show(twitter, facebook, delicious..)
-you can use the username you have on AddThis, so you can see statistics on the use of the button from the site of addthis.com

Screenshots

Admin Panel

Addthis Button in post


Stats from social bookmarks use(Addthis.com site)


Brought to you by: ----sharedownload.org--tutorials and downloads the download

-------------------------------------Español-----------------------------------------

Con este mod podras agregar el boton de addthis en el primero post, ofreciendo algunas caracteristicas extras como:

-Seleccion de idioma via Api de addthis
-puedes colocar el nombre de tu empresa/sitio
-posibilidad de desactivar el mod
-puedes elegir los servicios a mostrar
-puedes usar el username que tengas en addthis,de esa forma podras consultar las estadisticas del uso del boton desde el sitio de addthis.com

Screenshots








estadisticas (desde el sitio de addthis)




Live demo


Traido a ti gracias a: sharedownload.org
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

Verso

Will this mod be available for SMF 2.0 RC1-1

franklinrony

in a futere i plan update to smf 2.0 :)
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

karls

Hi,

I cannot see any buttons in the first posts... I have version 1.1.9 May I know why?

Karl

Afro


NewZer

Me too I cannot see it .,What is wrong to it.,?



_________________
hxxp:www.slingshotseo.com [nonactive]

franklinrony

check in the addthis config panel and mark "check for activate addthis in first post"
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

karls

That's done.

Other plugins I installed to forum also could not work. Probably for same reason as the other one - I have a custom template so I have to use the manual instructions to install the thing.

Karl

franklinrony

yes, you must edit display.template from your custom theme

find
Quote// Show the topic information - icon, subject, etc.
   echo '
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">
      <tr class="catbg3">
            <td valign="middle" width="2%" style="padding-left: 6px;">
                  <img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
            </td>
            <td width="13%"> ', $txt[29], '</td>
            <td valign="middle" width="85%" style="padding-left: 6px;" id="top_subject">
                  ', $txt[118], ': ', $context['subject'], ' &nbsp;(', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
            </td>
      </tr>';

and replace with

Quote// Show the topic information - icon, subject, etc.
   echo '
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">
      <tr class="catbg3">
            <td valign="middle" width="2%" style="padding-left: 6px;">
                  <img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
            </td>
            <td width="13%"> ', $txt[29], '</td>
            <td valign="middle" width="85%" style="padding-left: 6px;" id="top_subject">
                  ', $txt[118], ': ', $context['subject'], ' &nbsp;(', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
            </td>';
            //addthis button
            if ($modSettings['addthis_active']=="1")
            {
            echo'
            <td align="right" valign="middle" style="padding-right: 6px;">
      <!-- AddThis Button BEGIN -->
            <script type="text/javascript"><!-- // --><![CDATA[
            var addthis_pub="'.$modSettings['addthis_pub'].'";
            var addthis_brand = "'.$modSettings['addthis_brand'].'";
            var addthis_language = "'.$modSettings['addthis_language'].'";
            var addthis_options = \''.$modSettings['addthis_options'].'\';

            // ]]></script>
            <a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, \'\', \'//\',%20\'[TITLE]\')"%20onmouseout="addthis_close()"%20onclick="return%20addthis_sendto()"><img%20src="[url="http://s7.addthis.com/static/btn/lg-share-en.gif"]http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a>
            <script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>
      <!-- AddThis Button END -->
        </td>
      </tr>';}
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

Verso

I have installed this manually..........

I added the following to my display.template.php file at the very bottom

Quote<!-- AddThis Button BEGIN --><script type="text/javascript">var addthis_pub = 'nscnet';</script><a href="http://www.addthis.com/bookmark.php" onmouseover="return addthis_open(this, '', location.href, document.title)" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" border="0" alt="" /></a><script type="text/javascript" src="http://s7.addthis.com/js/152/addthis_widget.js"></script><!-- AddThis Button END -->


As you can see from the picture the SHARE button is in the top right of the forum.

How can I move this so it appears on the GREY bar that has the topic name and how many times it has been read????


Also it has made the font a lot larger than it used to be...........


I'm nearly there just need a little tweaking

franklinrony

give me your display template.php to see the code
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

Verso


Verso

Just wondererd if you've got round yo looking at my file yet?


franklinrony

this a workaround,your use smf 2,  :P

search
Quote<span id="top_subject">', $txt['topic'], ': ', $context['subject'], ' &nbsp;(', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')</span>

afterr add
Quote<span class="addthis">
      <!-- AddThis Button BEGIN -->
            <script type="text/javascript"><!-- // --><![CDATA[
            var addthis_pub="'.$modSettings['addthis_pub'].'";
            var addthis_brand = "'.$modSettings['addthis_brand'].'";
            var addthis_language = "'.$modSettings['addthis_language'].'";
            var addthis_options = \''.$modSettings['addthis_options'].'\';

            // ]]></script>
            <a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, \'\', \'//\',%20\'[TITLE]\')"%20onmouseout="addthis_close()"%20onclick="return%20addthis_sendto()"><img%20src="[url="http://s7.addthis.com/static/btn/lg-share-en.gif"]http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a>
            <script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script>
      <!-- AddThis Button END --></span>

open your style.css at the end add
Quotespan.addthis {
position: absolute;
right: 1;
}
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

Verso

Many thanks.......

Works a treat

atdforum

Excellent working mod - thanks for the effort!

Two comments:

1. It appears that you insert the manual instructions in the admin panel for the Apply Mod page.  This is too wide for my forum and breaks the layout so I couldn't see the install button and had to do the manual install.

2. The addthis.php insert statement in your codebox of the manual instructions for 1.1.8 is cut-off at the bottom.  No worries, I downloaded and unzipped the mod and used the full insert statement from the addthis.php file.

And one dumb question... since I did the manual install, do you know of a way to have this mod appear in the Browse Packages or Installed Packages pages?  I tried simply uploading the zip file to the Packages dir but it appears as not installed.

Thanks!

franklinrony

maybe edit installed.list, add this line
Addthis widget in first post|^|addthisbutton1_0.zip|^|frony:Addthisbutton|^|1.0

and upload the file in packages folder
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

backend

Looks like a good post, but I have a problem with the install.

I am trying to install it on my deafult template, and it does tell me it was installed successfully, but upon testing, I am getting a bunch of error messages on top of the forum, and everything looks big.

I am using version SMF 1.1.9.

Please advise what I can do.

Some mods I have include:

1. SMFShop 2.3  [ List Files ] [ Delete ] 
2. YouTube BBC Tag (XHTML Compliant) 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
3. SMFShop 3.0   [ Uninstall ] [ List Files ] [ Delete ] 
4. ssi_grabMessage 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
5. View Only Boards 1.1  [ Apply Mod ] [ List Files ] [ Delete ] 
6. SMF 1.0.11 / 1.1.3 Update 1.1   [ List Files ] [ Delete ] 
7. Bookmarks 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
8. Bookmarks 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
9. SMF 1.0.12 / 1.1.4 / 2.0 b1.1 Update 1.0   [ List Files ] [ Delete ] 
10. Coppermine Userpics 1.0  [ Apply Mod ] [ List Files ] [ Delete ] 
11. Buy Me A Beer 1.4   [ Uninstall ] [ List Files ] [ Delete ] 
12. cbi, 1.0 1.0  [ Apply Mod ] [ List Files ] [ Delete ] 
13. SMF Arcade 2.0.12   [ List Files ] [ Delete ] 
14. SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update 1.0   [ List Files ] [ Delete ] 
15. SMF 1.0.14 / 1.1.6 Update 1.0   [ List Files ] [ Delete ] 
16. SMF 1.0.15 / 1.1.7 Update 1.0   [ List Files ] [ Delete ] 
17. Anti-Spam Verification Questions 1.02  [ Apply Mod ] [ List Files ] [ Delete ] 
18. SMF 1.0.16 / 1.1.8 Update 1.0   [ List Files ] [ Delete ] 
19. Facebook Video BBC 1.0  [ Apply Mod ] [ List Files ] [ Delete ] 
20. Active Users Privacy 0.1  [ Apply Mod ] [ List Files ] [ Delete ] 
21. Aeva ~ Auto-Embed Video & Audio 6.1.72  [ Apply Mod ] [ List Files ] [ Delete ] 
22. SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update 1.0   [ Uninstall ] [ List Files ] [ Delete ] 
23. Addthis widget in first post 1.0 

backend

The error i am getting is:

// Addthis button $txt['addthis_admin']='Addthis panel'; $txt['addthis_active']='Check for activate AddThis button in first post'; $txt['addthis_pub']='Addthis user'; $txt['addthis_brand']='Name of site'; $txt['addthis_language']='Addthis interface language'; $txt['addthis_options']='Add you social links';

franklinrony

open your Modifications.english.php and search at  the end if you have this code

?>
// Addthis button
$txt['addthis_admin']='Addthis panel';
$txt['addthis_active']='Check for activate AddThis button in first post';
$txt['addthis_pub']='Addthis user';
$txt['addthis_brand']='Name of site';
$txt['addthis_language']='Addthis interface language';
$txt['addthis_options']='Add you social links';


change to this

// Addthis button
$txt['addthis_admin']='Addthis panel';
$txt['addthis_active']='Check for activate AddThis button in first post';
$txt['addthis_pub']='Addthis user';
$txt['addthis_brand']='Name of site';
$txt['addthis_language']='Addthis interface language';
$txt['addthis_options']='Add you social links';
?>

this a forum problem, i`m test the mod and work fine :)
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

Advertisement: