Support Forum

Thanks displayed twice

ST Stephen
Stephen
Member

I am seeing the “thanks” box displayed twice within each post. I’m not sure if it started happening before or after the latest updates as the forum only started to be used yesterday.

Any ideas that I can check?

21 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

What do you mean by ‘box’? Do you mean the part where it reports on who has thanked you for a post?
Can we have a link to a page with this on so we can see it?

ST Stephen
Stephen
Member

Yes. The forum is behind membership software but I have a screenshot if that helps: http://i.imgur.com/kNeqgCC.jpg

YS Yellow Swordfish
Yellow Swordfish
Member

Is this a standard Simple:Press supplied theme or has ot been customised? And which theme is it you are using please?

ST Stephen
Stephen
Member

I am using the “default” theme, copied and re-named so that a small number of customisations are not overwritten, such as removing the stats box at the bottom.

YS Yellow Swordfish
Yellow Swordfish
Member

So we really ought to start out by taking a look at the theme template to make sure there hasn’t been any problem introduced there. So…

…can you take a look at the spTopicView.php template in the custom theme and check that the function:

sp_thanks_thanks_for_post();

is only called once? If you search for the actual call (as opposed to a ‘function_exists’ check then it should only appear once.

ST Stephen
Stephen
Member

I have:

 

# Add Share This and/or Answers Topic to bottom of post content
# ———————————————————————-
if (function_exists(‘sp_ShareThisTopicIndexTag’) || function_exists(‘sp_AnswersTopicAnswer’) || function_exists(‘sp_thanks_thanks_for_post’)){
sp_ColumnStart(‘tagClass=spPluginSection spCenter&width=100%&height=40px’);
if (function_exists(‘sp_ShareThisTopicIndexTag’)) sp_ShareThisTopicIndexTag(‘tagClass=ShareThisTopicIndex spLeft’);
if (function_exists(‘sp_AnswersTopicAnswer’)) {
if ($spThisPost->post_index == 1) sp_AnswersTopicSeeAnswer(‘tagClass=spAnswersTopicSeeAnswer spButton spRight’, __sp(‘See Answer’), __sp(‘Go to the post marked as the answer’));
sp_AnswersTopicAnswer(‘tagClass=spRight’, __sp(‘Answers Post’), __sp(‘This post answers the topic’));
sp_AnswersTopicPostIndexAnswer(‘tagClass=spButton spRight’, __sp(‘Mark as Answer’), __sp(‘Mark this post as topic answer’), __sp(‘Unmark as Answer’), __sp(‘Unmark this post as topic answer’));
}
sp_ColumnEnd();
if (function_exists(‘sp_thanks_thanks_for_post’)) {
sp_InsertBreak();
sp_thanks_thanks_for_post();
}
sp_InsertBreak();
}
# End Share This and/or Answers Topic addition
# ———————————————————————-

YS Yellow Swordfish
Yellow Swordfish
Member

Next stage, I think, is that we really do need to see this topic. Are you able to set us up with an account so we can take a look? If so then please PM credentials to both myself and to ‘Mr Papa’. Please include in the PM a link to your site, a link to this thread and brief reminder of the problem. And one of us will take a look for you.

YS Yellow Swordfish
Yellow Swordfish
Member

Most curious. I think it’s something in the template – I can certainly see some what looks like malformed HTML but I can’t yet put my finger on it.

Could you do me a favour? Could you very briefly switch to the standard, supplied ‘default’ theme, clear your browser cache and then run  page or two again to see if the problem persists? If it persists it will at least save me going on a wild goose chase.

YS Yellow Swordfish
Yellow Swordfish
Member

Ah. Good news. Let me take a close look at your theme. I will see if I can find anything…

YS Yellow Swordfish
Yellow Swordfish
Member

back to post #6 I am afraid

You DO have two calls to that function in your spTopicView.php template. Look above the part you copied and pasted in this thread and you will see it. That’s why you have two displays!