Similar Topic Only From Current Forum? »  Show posts from    to     

Icy Phoenix


Old Support Topics - Similar Topic Only From Current Forum?



portalpez [ Wed 23 Dec, 2009 22:56 ]
Post subject: Similar Topic Only From Current Forum?
Hello,

Could anyone help me to understanding or how can i do that the block "similar topics" only shows similar topics from current forum?

Example:

If i am reading a topic in the forum "General suport" the block "Similar topics" only show topics from the forum General suport, and not from all forums....

Thanks you.


Mighty Gorgon [ Sat 26 Dec, 2009 11:59 ]
Post subject: Re: Similar Topic Only From Current Forum?
There is no switch for this feature.

Currently the only way is edit the similar topics sql.

You can try something like this:

OPEN viewtopic.php
FIND
Code: [Hide] [Select]
if ($forums_auth_sql != '')
{
$forums_auth_sql = ' AND t.forum_id IN (' . $forums_auth_sql . ') ';
}

REPLACE WITH
Code: [Hide] [Select]
$forums_auth_sql = ' AND t.forum_id = ' . $forums_id . ' ';


portalpez [ Sat 26 Dec, 2009 16:37 ]
Post subject: Re: Similar Topic Only From Current Forum?
Thanks you very much for your help MG!!!!

Only a little correction: forums_id is forum_id and whit this run well.

OPEN viewtopic.php
FIND
Code: [Hide] [Select]
if ($forums_auth_sql != '')
{
$forums_auth_sql = ' AND t.forum_id IN (' . $forums_auth_sql . ') ';
}

REPLACE WITH
Code: [Hide] [Select]
if ($forums_auth_sql != '')
{
$forums_auth_sql = ' AND t.forum_id IN (' . $forum_id . ') ';
}



Now the similar topics is more similar....

Example:
http://www.portalanunciosgratis.com...rio-vt8068.html




Powered by Icy Phoenix