Hi.
On www.dbgc.tk/forums , it shows the buttons twice. Why?
Thanks,
cralor
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; }
}
Only in their once :-\
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>
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?
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.
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>
Removed one of them, but it still shows two :(
Any other thoughts?
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
Thanks for the reply!
Let's start off with my installation and package mod specs.
TinyPortal 5-1
SMF 2.0 RC3
Fresh install, no previous installation
Packages: (besides TP)
Aeva Media
SMF Arcade
This DOES show up on the Default theme as well.
Thanks!
cralor,
This is very confusing to me. It's obvious that the social buttons are getting called twice for some reason but why this is happening is beyond me since I can't duplicate it. Perhaps one of the other TP Team Members has an idea about it.
ZarPrime
Can you post what your frontpage settings are? What are the settings you have on both your article and the category the article is in?
Ok I thought I looked everywhere :) Some reason was listed 2 times in the frontpage settings.
Thanks guys!!!
cralor,
I'm confused. What is listed 2 times in the frontpage settings? Can you show us a screenshot?
ZarPrime
Sorry.
{article_bookmark} tag was listed twice in the FrontPage settings layout code (Custom).
Ah, I see. Wow, I wouldn't have thought to even look there. Nice catch. O0
I just checked it in my TP 1.0 beta 5.2 install, and it's not listed in the custom code textarea there twice. Out of curiosity, did you edit the custom code to fit your site, and that was why it was in there twice?
Now that you have brought this up, I'm thinking that it might not be a bad idea for bloc to add a reset button for the custom code (layout type #7) in case someone edits it and needs to get back to a default custom code.
In any case, I will go ahead and mark this topic solved.
ZarPrime
I don't believe I did :) But it was the fix anyway!
Thanks again,
cralor