MyBB Community Forums

Full Version: Show Similar Threads in Posts ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How to show Similar threads in first post only. By default it is shown on the end of all posts.
I tried it in showthread template as
<if $postcounter==1 then>
	<div id="posts">
		{$posts}
	</div>

	{$similarthreads}
</if>
But didn't work
Are you using the template conditionals plugin from zingaburga? If not, then that is why it's not working
Yes I'm using template conditional plugin.
AND the code should be similar to below :
    <div id="posts">
        {$posts}
    <if $postcounter==1 then>
    {$similarthreads}
    </if> 
   </div>
(2012-01-01, 04:59 PM)ranjani Wrote: [ -> ]AND the code should be similar to below :
    <div id="posts">
        {$posts}
    <if $postcounter==1 then>
    {$similarthreads}
    </if> 
   </div>

still not working Sad
I just use a plugin...

http://mods.mybb.com/view/related-threads

works fine, and looks good.
Try this;
<div id="posts">
        {$posts}
    <if ($postcounter - 1) % $mybb->settings['postsperpage'] == "0" then>
    {$similarthreads}
    </if> 
   </div>
(2012-01-02, 07:36 AM)Yaldaram Wrote: [ -> ]Try this;
<div id="posts">
        {$posts}
    <if ($postcounter - 1) % $mybb->settings['postsperpage'] == "0" then>
    {$similarthreads}
    </if> 
   </div>

Not working Sad
I guess $postcounter is not working here
Are you using it in showthread template ?
Make sure that Similar threads table setting is enabled in ACP > Configurations > Showthread Options.
Yes I'm using it in showthread template, and settings are enabled. I am able to show similar threads by this but it is showing similar threads at the end of all posts:

<div id="posts">
        {$posts}
    <if $postcounter !=1 then>
    {$similarthreads}
    </if> 
   </div> 

but if I use


<div id="posts">
        {$posts}
    <if $postcounter ==1 then>
    {$similarthreads}
    </if> 
   </div> 
Then it shows similar threads on the threads having only one post
Pages: 1 2