[RC1] Extended Similar topics

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Chris-TT
Registered User
Posts: 10
Joined: Sun Aug 05, 2007 7:07 pm

Re: [RC1] Extended Similar topics

Post by Chris-TT » Sat Aug 11, 2007 2:58 pm

Chris-TT wrote:Is there a way I can make it so the Similar Topic Mod only comes up for certain Forums? For example, I don’t want the mod to display similar topic results in the off topic forum, as most of the results aren’t relevant.
It’s possible to do this with PHPBB 3x, but the mod doesn’t seem to work for 2x unless I’m being stupid!?

Porutchik
I've Been Banned!
Posts: 275
Joined: Sat Dec 31, 2005 11:11 am
Location: Russia, Orenburg (Россия, Оренбург)
Name: Sergey O
Contact:

Re: [RC1] Extended Similar topics

Post by Porutchik » Sun Aug 12, 2007 9:07 am

It works only with phpbb2.
Demo
My forum | Advanced Similar Topics
Excuse me please for my awful English. Thanks!. Please do not P.M., ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic.

Chris-TT
Registered User
Posts: 10
Joined: Sun Aug 05, 2007 7:07 pm

Re: [RC1] Extended Similar topics

Post by Chris-TT » Sun Aug 12, 2007 12:15 pm

I can get the similar topics mod to work fine with the forums. It’s when I try and make similar topics only appear for certain forums and exclude other ones such as the off topic forum it won't work.
You can do this in phpBB3x if you open viewtopics.php then find the code:

Code: Select all

AND f.forum_id = t.forum_id
after the code write:

Code: Select all

AND t.forum_id NOT IN (1,2,3,4,5)
(1,2,3,4,5 are the excluded forum IDs)
So does anyone know if there a way to make this work with PHP2x?

cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Re: [RC1] Extended Similar topics

Post by cavallino » Mon Aug 13, 2007 8:01 am

Hi Porutchik,
i'm trying to install the Topic Description Mod ADD-ON which you included in the mod package (I have the topic description mod by Swizec, latest version) but when I execute the following query

Code: Select all

ALTER TABLE phpbb_topics ADD FULLTEXT (topic_desc);
i get this error:

Code: Select all

#1072 - Key column 'topic_desc' doesn't exist in table
As a matter of fact I went to check inside phpbb_topics table and there's NOT the column topic_desc... but there are instead 2 other fields: topic_description and topic_descmod

so, what should we do?

Porutchik
I've Been Banned!
Posts: 275
Joined: Sat Dec 31, 2005 11:11 am
Location: Russia, Orenburg (Россия, Оренбург)
Name: Sergey O
Contact:

Re: [RC1] Extended Similar topics

Post by Porutchik » Mon Aug 13, 2007 10:13 am

My forum | Advanced Similar Topics
Excuse me please for my awful English. Thanks!. Please do not P.M., ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic.

cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Re: [RC1] Extended Similar topics

Post by cavallino » Mon Aug 13, 2007 2:35 pm

ohhhh what a pity! :(

anyway.... the 2 mods should be similar as I was able to do all the code changes reported in the mod addon text.....

there will be no chance that someday you will have a look at that mod and see if it will be easy to adapt it as u did for morpheus2matrix? Maybe its just the table name that changes?

Porutchik
I've Been Banned!
Posts: 275
Joined: Sat Dec 31, 2005 11:11 am
Location: Russia, Orenburg (Россия, Оренбург)
Name: Sergey O
Contact:

Re: [RC1] Extended Similar topics

Post by Porutchik » Mon Aug 13, 2007 3:40 pm

ADD-ON for the Topic Description MOD by Swizec is added.
You can find at contrib/add_on_topic_description_Swizec.txt
See first post for download link.

PLEASE NOTE: This ADD-ON isn't fully tested, and there can bee wrong things in it!
My forum | Advanced Similar Topics
Excuse me please for my awful English. Thanks!. Please do not P.M., ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic.

cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Re: [RC1] Extended Similar topics

Post by cavallino » Mon Aug 13, 2007 3:41 pm

wow............... have no words here.
Thanks a lot, you're great! :mrgreen:
I will test it

lolololo
Registered User
Posts: 2
Joined: Mon Oct 29, 2007 8:15 pm

Re: [RC1] Extended Similar topics

Post by lolololo » Mon Oct 29, 2007 8:20 pm

Hi
Is there a way I can make it so the Similar Topic Mod does not show links to POST_ANNOUNCE, POST_GLOBAL_ANNOUNCE and POST_STICKY. Because this is not so revelent

TH

Porutchik
I've Been Banned!
Posts: 275
Joined: Sat Dec 31, 2005 11:11 am
Location: Russia, Orenburg (Россия, Оренбург)
Name: Sergey O
Contact:

Re: [RC1] Extended Similar topics

Post by Porutchik » Tue Oct 30, 2007 4:01 am

lolololo,
!! This isn't fully tested

Code: Select all

# 
#-----[ OPEN ]------------------------------------------ 
# 
viewtopic.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
			AND t.topic_status <> " . TOPIC_MOVED . '

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
			AND t.topic_type <> ' . POST_ANNOUNCE . ' 
			AND t.topic_type <> ' . POST_STICKY . ' 
If you have the Global announcement Mod by Niels

Code: Select all

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
			AND t.topic_type <> ' . POST_GLOBAL_ANNOUNCE . ' 
My forum | Advanced Similar Topics
Excuse me please for my awful English. Thanks!. Please do not P.M., ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic.

lolololo
Registered User
Posts: 2
Joined: Mon Oct 29, 2007 8:15 pm

Re: [RC1] Extended Similar topics

Post by lolololo » Tue Oct 30, 2007 10:45 pm

Works great Porutchik !

Thanks man

DAT116
Registered User
Posts: 12
Joined: Tue Jun 12, 2007 2:06 pm

Re:

Post by DAT116 » Sat Dec 15, 2007 4:14 pm

Porutchik wrote:Try to make so.

Code: Select all

#
#---- [ OPEN ] --------------
#
viewtopic.php

#
#---- [ FIND ] --------------
#
	if ( $v['auth_view'] && $v['auth_read'] )

#
#---- [ REPLACE WITH ] --------------
#
	if ( $v['auth_read'] )

Good Morning all,

I have successfully added this to my forum, but as previously mentioned the hidden and private forum topics appear in the the Similar topics box at the bottom. I cracked open viewtopic.php in hopes of adding the code quoted above, but I am not finding that particular string of code. What I am finding is this:

Code: Select all

//
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_topic_data);

if( !$is_auth['auth_view'] || !$is_auth['auth_read'] ) 
{
I would love to be able to use this mod, but obviously I cannot allow topics from hidden and private forums to be publicly visible...is there a fix for this or am I over looking something?
Any help would be appreciated!
Thanks,
DAT116

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC1] Extended Similar topics

Post by RMcGirr83 » Sat Dec 15, 2007 4:21 pm

You have to install the mod...then do the find and it will be there.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

DAT116
Registered User
Posts: 12
Joined: Tue Jun 12, 2007 2:06 pm

Re: [RC1] Extended Similar topics

Post by DAT116 » Sat Dec 15, 2007 6:16 pm

no, I have already installed the mod, but once I realized it was showing hidden and private forum topics I removed the viewtopic_body.tpl to prevent anyone seeing them until a fix is found for it. I done a search and came across this thread and I tried what the author suggested, but I cannot locate that section of code in viewtopic.php.
Perhaps I did not make myself clear before...

thanks for the suggestion tho.

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC1] Extended Similar topics

Post by RMcGirr83 » Sat Dec 15, 2007 7:03 pm

Perhaps I didn't make myself clear....the change that needs to be done, is to be done after the mod is installed.

From the mod install file
#
#-----[ FIND ]------------------------------------------
#
$template->pparse('body');

#
#-----[ BEFORE, ADD ]------------------------------------------
#
// [begin] Similar topics mod

if ( $board_config['similar_ignore_forums_ids'] )
{
$ignore_forums_ids = array_map('intval', explode("\n", trim($board_config['similar_ignore_forums_ids'])));
}
else
{
$ignore_forums_ids = array();
}

// Get forum auth information to insure privacy of hidden topics
$forums_auth_sql = '';
foreach ($forums_auth as $k=>$v)
{
if ( count($ignore_forums_ids) && in_array($k, $ignore_forums_ids) )
{
continue;
}
if ( $v['auth_view'] && $v['auth_read'] )
{
$forums_auth_sql .= (( $forums_auth_sql == '' ) ? '': ', ') . $k;
}
}
Capiche?
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

Post Reply

Return to “[2.0.x] MODs in Development”