MyBB Community Forums

Full Version: Show similar threads under first post for 1.8
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello friends.

This method show similar threads under first post for 1.8
_ Without plugin.
_ Without additional processing because this works with javascript and client side script.

1- Make sure that Similar threads table setting is enabled in ACP > Configurations > Showthread Options.

2- Edit  ( Post Bit Templates -> postbit ) template

and add this in end of lines
<div id="d_{$postcounter}" name="d_{$postcounter}" style="display:none;" > </div>

3- Edit ( Show Thread Templates -> showthread ) template

find:
{$similarthreads}
and replace it with:
<div id="d_similarthreads" name="d_similarthreads">{$similarthreads}</div>

and

find:
</body>
and add this text before </body>:
<script type="text/javascript">
if (typeof(document.getElementById('d_1')) != 'undefined' && document.getElementById('d_1') != null)
{
    document.getElementById('d_1').innerHTML = document.getElementById('d_similarthreads').innerHTML;
    document.getElementById('d_1').style.display = 'inline';
}
</script>  

* You can edit ( show Thread Templates -> showthread_similarthreads) for customizing if needed...