Joomla tags

a real free joomla tag system

  • Increase font size
  • Default font size
  • Decrease font size
 Joomla Tags Support Forum :: TBFSocial
Welcome Guest   
 Subject :Error in buttons.js and original twitter buttons!.. 2010-10-14 06:47:31 
KunenaSpanish
Apprentice
Joined: 2010-10-14 12:31:24
Posts: 1
Location: Venezuela
 
<p>Hi all,</p>
<p><span>On my site, KunenaSpanish.com note that a bug in a function call <strong>buttons.js</strong> file to digg, because I gave myself the task of finding information on the integration page digg buttons and I found a code doctor helped solve the problem!</span></p>
<p><span>The code is well suited to the plugin file, it shows the button and the counting of the digg post, I leave the code to all those who wish to use (developers please read this)</span></p>
<p><span>Also note that like me there are many users who would prefer to use the original button and official twitter over another, the API itself tuilizando twitter to your buttons, I managed to insert the code into the plugin and it works perfectly and send the content to twitter . com, I leave here I made the change.</span></p>
<p><span>I hope this serves other users. Sorry for my bad English, I'm speaking Spanish.</span></p>
<p><span><span><strong>Edit the source code for DIGG</strong>:</span></span></p>
<p><span><span><span>Find the line #121 to #125 ::</span></span></span></p>
<p><span><span><span>function digg($url){<br />                $document        = & JFactory::getDocument();<br />                $document->addScript('http://widgets.digg.com/buttons.js');<br />                return '<div style="vertical-align:text-top;float: left; margin-right: 0.75em;"><a class="DiggThisButton DiggCompact" href="<a href="http://digg.com/submit?url='.$url.'"></a></div>'">http://digg.com/submit?url='.$url.'"></a></div>'</a>;<br />        }</span></span></span></p>
<p><span><span><span>Change for ::</span></span></span></p>
<p><span><span><span>        function digg($url){<br />                $document        = & JFactory::getDocument();<br />                $document->addScriptDeclaration("(function() {<br />                var s = document.createElement('SCRIPT'),<br />                s1 = document.getElementsByTagName('SCRIPT')[0];<br />                s.type = 'text/javascript';<br />                s.async = true;<br />                s.src = 'http://widgets.digg.com/buttons.js';<br />                s1.parentNode.insertBefore(s, s1);})();<br />                ");<br />                return '<div style="vertical-align:text-top;float: left; margin-right: 0.75em;"><a class="DiggThisButton DiggCompact" href="<a href="http://digg.com/submit?url='.$url.'"></a></div>'">http://digg.com/submit?url='.$url.'"></a></div>'</a>;<br />        }</span></span></span></p>
<p><span><span><span><span><span><strong>Edit the source code for TWITTER</strong>:</span></span></span></span></span></p>
<p><span><span><span><span><span><span><span><span>Find the line #78 to #88 ::</span></span></span></span></span></span></span></span></p>
<p><span><span><span><span><span><span><span><span>        function retweet($url,$title){<br />                $twitterUser=$this->param('TwitterUsername');<br />                $nick='';<br />                if($twitterUser){<br />                        $nick=', "nick":"'.$twitterUser.'"';<br />                }<br />                $retweet='<div class="topsy_widget_data" style="float: left; margin-right: 0.75em;"><script type="text/javascript">topsyWidgetPreload({ "url":"'.$url.'","title":"'.$title.'","theme": "blue"'.$nick.' });</script></div>';<br />                $document        = & JFactory::getDocument();<br />                $document->addScript('http://cdn.topsy.com/topsy.js?init=topsyWidgetCreator');<br />                return $retweet;<br />        }</span></span></span></span></span></span></span></span></p>
<p><span><span><span><span><span><span><span><span>Change for ::</span></span></span></span></span></span></span></span></p>
<p><span><span><span><span><span><span><span><span>        function retweet($url,$title){<br />                $twitterUser=$this->param('TwitterUsername');<br />                $nick='';<br />                if($twitterUser){<br />                        $nick=', "nick":"'.$twitterUser.'"';<br />                }<br />                $retweet='<div style="float: left; margin-right: 0.75em;"><a href="<a href="http://twitter.com/share">http://twitter.com/share</a>" class="twitter-share-button" data-url="'.$url.'" data-text="'.$title.'" data-count="none" data-lang="es">'.$nick.'</a></div>';<br />                $document        = & JFactory::getDocument();<br />                $document->addScript('http://platform.twitter.com/widgets.js');<br />                return $retweet;<br />        }</span></span></span></span></span></span></span></span></p>
<p><span>Greetings to everyone.</span></p>
IP Logged
Need Help? Request it here in the forums, not in private!
The best place to get around? Joomla Extensions.
 Subject :Re:Error in buttons.js and original twitter buttons!.. 2010-10-26 02:58:06 
selfx
Apprentice
Joined: 2010-10-26 07:38:24
Posts: 3
Location
<p>I have edited my twitter with a bit more customization.  Please Read below, i hope this can help someone also.  Note: Please change the BOLD values to your own.</p>
<p> </p>
<p>TWITTER SECTION.</p>
<p>Find:</p>
<p><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;">$retweet='<div class="topsy_widget_data" style="float: left; margin-right: 0.75em;"><script type="text/javascript">topsyWidgetPreload({ "url":"'.$url.'","title":"'.$title.'","theme": "blue"'.$nick.' });</script></div>';<br /> $document        = & JFactory::getDocument();<br /> $document->addScript('http://cdn.topsy.com/topsy.js?init=topsyWidgetCreator');<br /> return $retweet;</span></p>
<p> </p>
<p><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;">and replace with:</span></p>
<p> </p>
<p><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18px;">
<p>$retweet='<div style="float: left; margin-right: 0.75em;"><a href="http://twitter.com/share" class="twitter-share-button" expr:data-url="data:post.url" data-url="'.$url.'" data-text="'.$title.'" data-count="<strong>horizontal</strong>" data-via="<strong>username</strong>" data-lang="<strong>en</strong>">'.$nick.'</a></div>';<br /><span style="white-space: pre;"> </span>$document        = & JFactory::getDocument();<br /><span style="white-space: pre;"> </span>$document->addScript('http://platform.twitter.com/widgets.js');<br /><span style="white-space: pre;"> </span>return $retweet;</p>
<p> </p>
<p>replace <strong>username</strong> with your twitter username<br />data-count can be either <strong>horizontal, vertical, or none</strong>.<br />choose your language, like <strong>en</strong> for english or <strong>es</strong> for spanish<br />the <strong>expr:data-url</strong> is to make sure that the tweet count continues to show the accurate number of tweets.</p>
<p> </p>
<p>hope this helps others!!</p>
</span></p>
IP Logged
Page # 


Powered by ccBoard


Newsletter

Please subscribe to our newsletter to stay up-to-date with the latest news and release notifications delivered to your inbox.
Tags for Joomla



Joomla Plugin:ReadMoreExt