|
|
<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. |