TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 606
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 496
  • Total: 496

Social Network Buttons

Started by cralor, April 26, 2010, 01:18:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cralor

Hi.

On www.dbgc.tk/forums , it shows the buttons twice. Why?

Thanks,
cralor

Max

hey cralor.

Check this file to see if the code it there twice,
if so remove the duplicate bit.

default/TPsubs.template.php

Find:


function article_bookmark($render=true)
{
global $scripturl, $txt, $settings, $context;

if(in_array('social',$context['TPortal']['article']['visual_options']))
$code = '
<div class="article_socialbookmark">
<a href="http://twitter.com/home/?status=' . $scripturl.'?page='. $context['TPortal']['article']['id'] . '" target="_blank"><img title="Share on Twitter!" src="' . $settings['tp_images_url'] . '/twitter.gif" alt="Share on Twitter!" /></a>
<a href="http://digg.com/submit?url=' . $scripturl.'?page='. $context['TPortal']['article']['id'] . '&title=' . $context['TPortal']['article']['subject'].'" target="_blank"><img title="Digg this story!" src="' . $settings['tp_images_url'] . '/digg.gif" alt="Digg this story!" /></a>
<a href="http://del.icio.us/post?url=' . $scripturl.'?page=' . $context['TPortal']['article']['id'] . '&title=' . $context['TPortal']['article']['subject'] . '" target="_blank"><img src="' . $settings['tp_images_url'] . '/delicious.gif" alt="Del.icio.us" title="Del.icio.us" /></a>
<a href="http://www.facebook.com/sharer.php?u=' . $scripturl . '?page=' . $context['TPortal']['article']['id'] . '" target="_blank"><img src="' . $settings['tp_images_url'] . '/facebook.gif" alt="Share on Facebook!" title="Share on Facebook!" /></a>
<a href="http://www.technorati.com/faves?add=' . $scripturl . '?page=' . $context['TPortal']['article']['id'] . '" target="_blank"><img src="' . $settings['tp_images_url'] . '/technorati.gif" alt="Technorati" title="Technorati" /></a>
<a href="http://www.reddit.com/submit?url=' . $scripturl . '?page=' . $context['TPortal']['article']['id'] . '" target="_blank"><img src="' . $settings['tp_images_url'] . '/reddit.gif" alt="Reddit" title="Reddit" /></a>
<a href="http://www.stumbleupon.com/submit?url=' . $scripturl . '?page=' . $context['TPortal']['article']['id'] . '" target="_blank"><img src="' . $settings['tp_images_url'] . '/stumble_upon_icon.gif" alt="StumbleUpon" title="Stumbleupon" /></a>
</div>';
else
$code='';

if($render) { echo $code; } else { return $code; }
}

cralor


william777

Hi cralor, yes there are two instances of of your Social Network buttons:


<div class="article_bodytext"></div></div>

<div class="article_socialbookmark">
<a href="http://twitter.com/home/?status=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img title="Share on Twitter!" src="http://dbgc.tk/forums/Themes/default/images/tinyportal/twitter.gif" alt="Share on Twitter!" /></a>
<a href="http://digg.com/submit?url=http://dbgc.tk/forums/index.php?page=3&title=Welcome!" target="_blank"><img title="Digg this story!" src="http://dbgc.tk/forums/Themes/default/images/tinyportal/digg.gif" alt="Digg this story!" /></a>
<a href="http://del.icio.us/post?url=http://dbgc.tk/forums/index.php?page=3&title=Welcome!" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/delicious.gif" alt="Del.icio.us" title="Del.icio.us" /></a>
<a href="http://www.facebook.com/sharer.php?u=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/facebook.gif" alt="Share on Facebook!" title="Share on Facebook!" /></a>
<a href="http://www.technorati.com/faves?add=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/technorati.gif" alt="Technorati" title="Technorati" /></a>
<a href="http://www.reddit.com/submit?url=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/reddit.gif" alt="Reddit" title="Reddit" /></a>

<a href="http://www.stumbleupon.com/submit?url=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/stumble_upon_icon.gif" alt="StumbleUpon" title="Stumbleupon" /></a>
</div>


<div class="article_socialbookmark">
<a href="http://twitter.com/home/?status=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img title="Share on Twitter!" src="http://dbgc.tk/forums/Themes/default/images/tinyportal/twitter.gif" alt="Share on Twitter!" /></a>
<a href="http://digg.com/submit?url=http://dbgc.tk/forums/index.php?page=3&title=Welcome!" target="_blank"><img title="Digg this story!" src="http://dbgc.tk/forums/Themes/default/images/tinyportal/digg.gif" alt="Digg this story!" /></a>
<a href="http://del.icio.us/post?url=http://dbgc.tk/forums/index.php?page=3&title=Welcome!" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/delicious.gif" alt="Del.icio.us" title="Del.icio.us" /></a>
<a href="http://www.facebook.com/sharer.php?u=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/facebook.gif" alt="Share on Facebook!" title="Share on Facebook!" /></a>
<a href="http://www.technorati.com/faves?add=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/technorati.gif" alt="Technorati" title="Technorati" /></a>
<a href="http://www.reddit.com/submit?url=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/reddit.gif" alt="Reddit" title="Reddit" /></a>

<a href="http://www.stumbleupon.com/submit?url=http://dbgc.tk/forums/index.php?page=3" target="_blank"><img src="http://dbgc.tk/forums/Themes/default/images/tinyportal/stumble_upon_icon.gif" alt="StumbleUpon" title="Stumbleupon" /></a>
</div>



</div>

Max

Strange, if you disable "Show Social Bookmarks buttons" in your article (down near the bottom there's a tick box)

Does it still show up twice?

cralor

Quote from: Maxâ„¢ on April 26, 2010, 02:29:44 AM
Strange, if you disable "Show Social Bookmarks buttons" in your article (down near the bottom there's a tick box)

Does it still show up twice?

If I disable the buttons, both sets go away. :(

william777: Yeah. I know they are twice :) But it's only referenced once in the PHP code where it is defined.

Max

#6
This maybe your problem, I've not tested all of the article layouts myself, from looking threw some code it seems it added twice to one of the layouts.

default/TPortalAdmin.template.php find this line:

<span class="lowerframe" style="margin-bottom: 5px;"><span></span></span>';

above that located in a div tag, there should only be one {article_bookmark}

<div class="article_padding">{article_text}</div>
{article_bookmark}
{article_boardnews}
{article_moreauthor}
{article_bookmark}
{article_morelinks}
{article_globaltags}
{article_comments}
</div>


If you remove one does it make any difference like so:

<div class="article_padding">{article_text}</div>
{article_boardnews}
{article_moreauthor}
{article_morelinks}
{article_globaltags}
{article_comments}
{article_bookmark}
</div>


cralor

Removed one of them, but it still shows two :(

cralor


ZarPrime

cralor,

I have tried to duplicate this on my test forum without success.  Have you switched to the default SMF theme (curve) to see if it works that way with it?  Can you detail the steps you took to install TP 1.0 beta 5-1 and what version of TP you had installed before that?  Also, do you have any other SMF Mods installed or just TinyPortal?

Since this seems to be a test site for you, I would suggest unzipping the current install of TP to a temp folder on your hard drive and using FTP to upload/overwrite all of the correct files to your site again.  That means the files located in the common folder and the SMF2RC2 folder to their proper locations.

Finally, if this doesn't fix it, please post the exact code you are using here, the kind of article, and your settings for both the article and the category so that I can try to duplicate the problem.

ZarPrime

This website is proudly hosted on Crocweb Cloud Website Hosting.