[RC] Precise Similar Topics II

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!
Suggested Hosts
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5270
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

[RC] Precise Similar Topics II

Post by MattF »

Title: Precise Similar Topics II

Description: This MOD will display a list of similar/related topics at the bottom of your threads, based on finding the most relevant Topic Titles.

This is based on the Precise Similar Topics MOD by Xabi, which uses a precise and light SQL query to find similar topics. I have taken Xabi's MOD concept, cleaned it up a bit more, gave it a nice looking results layout and packaged it in a proper phpBB MOD format. I have also created an ACP Admin settings page where you can adjust some of its settings to suit your forum's needs.

MOD Download: Precise Similar Topics 1.1.2
MOD Repository: http://github.com/VSEphpbb/precise-similar-topics-II

Credits: To the best of my knowledge, this MOD was originally written by tas2580 (aka Tobi at phpbb-seo.de) as 'Similar Topics'. It was then modified by Xabi into 'Precise Similar Topics' offering a lighter and more precise query. There are also some tweaks inspired by stokerpiller's changes to Xabi's code as well.

Features:
  • Uses a precise and light query to search Topic Titles in your forum and return a list of the most similar/relevant matches at the bottom of your threads
  • Similar topics will be sorted in order of decreasing relevance.
  • You can adjust how many Similar Topics to display
  • You can adjust the age of topics to search (ie: search for topics from the past year only)
  • You can enable or disable the display of similar topics for each forum
  • You can block individual forums from being searched for similar topics
  • You can define which forums can share similar topics with other forums
  • You can allow similar topic results to use the cache
  • Permissions settings for users & groups allow you to set who can view similar topics
  • Multi-lingual support for ignore-words
  • Forum read-access permissions are respected
  • Attractive Prosilver and Subsilver2 layouts
  • Very easy to install (only 3 tiny file edits)!
  • AutoMOD and UMIL compatible
Notice:
  • Requires MySQL 4.0.1 or later.
  • Similar topic searches are not case sensitive
  • Short words (less than 4 letters) are ignored
  • Stopwords are ignored (the, and, some, etc.) full list of stopwords
  • If a word is present in more than 50% of all topic titles, it is too common and is treated as a stopword and is ignored.
Demo Board: Test Board

Screenshots:
Prosilver:
Image

Subsilver2:
Image

ACP Admin Page:
Image

ACP Permissions:
Image
Last edited by MattF on Wed Jun 23, 2010 6:30 pm, edited 25 times in total.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
Jorup16
Registered User
Posts: 425
Joined: Sun Dec 14, 2008 5:13 am
Location: Zacapa, Guatemala
Name: Jorge
Contact:

Re: [RC1] Precise Similar Topics II

Post by Jorup16 »

What this mod looks good, I'll prove I can, thanks for developing it.
Spanish Translations for Ext phpBB :D - Traducciones al español para Ext phpBB :)
>>>>> https://github.com/Jorup16 <<<<<
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

Re: [RC1] Precise Similar Topics II

Post by Neuropass »

Great job here... Thanks to the original authors too.. :)
User avatar
RMcGirr83
Former Team Member
Posts: 21613
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: [RC1] Precise Similar Topics II

Post by RMcGirr83 »

"ignore forums" could get rather long, no? And does it ignore those that are not true forums?
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5270
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [RC1] Precise Similar Topics II

Post by MattF »

RMcGirr83 wrote:"ignore forums" could get rather long, no? And does it ignore those that are not true forums?
Yes it only shows forums, not categories or links.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5270
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [RC1] Precise Similar Topics II

Post by MattF »

RMcGirr83 wrote:"ignore forums" could get rather long, no?
Well I suppose I could set a max-height for that table and have it scroll any overflow if somebody does have a million forums to prevent the submit/reset buttons from disappearing too far down the page :lol:

Download package updated
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
Ashley.S.
Registered User
Posts: 469
Joined: Mon Aug 04, 2008 6:01 pm
Location: Falmouth, Cornwall, UK
Name: Ashley .S.
Contact:

Re: [RC1] Precise Similar Topics II

Post by Ashley.S. »

VSE wrote:
RMcGirr83 wrote:"ignore forums" could get rather long, no?
Well I suppose I could set a max-height for that table and have it scroll any overflow if somebody does have a million forums to prevent the submit/reset buttons from disappearing too far down the page :lol:

Download package updated
Just a suggestion: But would'nt it be better to have the ignore/include forum in similar topics option listed when you create/edit your forums?

That could save a long list of forums showing on the module as I know nickvergessen did something similar for his NV Recent Topics mod for if you want forums showing in the recent topics list or not.

Otherwise, you could always make it a text box and have users specify what forums they don't want included by adding the forum id to the list or something.

I however am not a coder, so don't even know if its doable, but I thought I might throw in the suggestions to see what you think as it could be another way to solve a long list of ignore forums or scroll box.
Regards,
-Ashley.S. [ PurephpBB Founder ]
User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Contact:

Re: [RC1] Precise Similar Topics II

Post by DoYouSpeakWak »

I like this mod. Works fine as i can test.

But with many diffrent types of forums, lets say cars and cooking, in both forums there is a topic named "This is how you do it" (or similar), When the users enters the cooking forum there is a link to a topic in the cars forum names something similar. This may direct a few into the wrong forum.

IMO there should switch for it somewere, Maybe in acp. "Show only similar topcs from this forum" could be another yes or no question in the acp module.
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.
User avatar
ac_roma
Registered User
Posts: 318
Joined: Thu Mar 08, 2007 2:48 pm
Location: egypt,alexandria
Contact:

Re: [RC1] Precise Similar Topics II

Post by ac_roma »

nice mod

i will test :D
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5270
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [RC1] Precise Similar Topics II

Post by MattF »

Ashley.S. wrote:Just a suggestion: But would'nt it be better to have the ignore/include forum in similar topics option listed when you create/edit your forums?

That could save a long list of forums showing on the module as I know nickvergessen did something similar for his NV Recent Topics mod for if you want forums showing in the recent topics list or not.
Not really, because if you have a lot of forums, could you imagine the pain it would be to go through each of them, one at a time to make this setting. Not to mention, it would also spread out this MODs settings between various ACP pages instead of centralizing them all in one tidy location :?

Honestly, this is not an issue. If you have a lot of forums, it is not going to be any more of an issue than in any other ACP page that lists all your forums, like when setting permissions for forums, where they all appear in a scrolling text box.. Now I have made it so if you do have lots of forums, it scrolls here too... ;)

I mocked up an example here for demo:
Image
Ashley.S. wrote: Otherwise, you could always make it a text box and have users specify what forums they don't want included by adding the forum id to the list or something.
I don't like that option, because that leaves the door open to where people could enter info wrong, which could cause problems... It also forces them to go and figure out the Forum IDs for each forum. With checkboxes, its more fool proof and user-friendly 8-)
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5270
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [RC1] Precise Similar Topics II

Post by MattF »

DoYouSpeakWak wrote:I like this mod. Works fine as i can test.

But with many diffrent types of forums, lets say cars and cooking, in both forums there is a topic named "This is how you do it" (or similar), When the users enters the cooking forum there is a link to a topic in the cars forum names something similar. This may direct a few into the wrong forum.

IMO there should switch for it somewere, Maybe in acp. "Show only similar topcs from this forum" could be another yes or no question in the acp module.
Hmm, you mean an option like, "SEARCH SELF ONLY"? So that a Forum will only show similar topics from itself?
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Contact:

Re: [RC1] Precise Similar Topics II

Post by DoYouSpeakWak »

VSE wrote:
DoYouSpeakWak wrote:I like this mod. Works fine as i can test.

But with many diffrent types of forums, lets say cars and cooking, in both forums there is a topic named "This is how you do it" (or similar), When the users enters the cooking forum there is a link to a topic in the cars forum names something similar. This may direct a few into the wrong forum.

IMO there should switch for it somewere, Maybe in acp. "Show only similar topcs from this forum" could be another yes or no question in the acp module.
Hmm, you mean an option like, "SEARCH SELF ONLY"? So that a Forum will only show similar topics from itself?
Yes sir :)
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.
User avatar
Ashley.S.
Registered User
Posts: 469
Joined: Mon Aug 04, 2008 6:01 pm
Location: Falmouth, Cornwall, UK
Name: Ashley .S.
Contact:

Re: [RC1] Precise Similar Topics II

Post by Ashley.S. »

VSE wrote:
Ashley.S. wrote:Just a suggestion: But would'nt it be better to have the ignore/include forum in similar topics option listed when you create/edit your forums?

That could save a long list of forums showing on the module as I know nickvergessen did something similar for his NV Recent Topics mod for if you want forums showing in the recent topics list or not.
Not really, because if you have a lot of forums, could you imagine the pain it would be to go through each of them, one at a time to make this setting. Not to mention, it would also spread out this MODs settings between various ACP pages instead of centralizing them all in one tidy location :?

Honestly, this is not an issue. If you have a lot of forums, it is not going to be any more of an issue than in any other ACP page that lists all your forums, like when setting permissions for forums, where they all appear in a scrolling text box.. Now I have made it so if you do have lots of forums, it scrolls here too... ;)

I mocked up an example here for demo:
Image
Ashley.S. wrote: Otherwise, you could always make it a text box and have users specify what forums they don't want included by adding the forum id to the list or something.
I don't like that option, because that leaves the door open to where people could enter info wrong, which could cause problems... It also forces them to go and figure out the Forum IDs for each forum. With checkboxes, its more fool proof and user-friendly 8-)
ok then, fair enough VSE...I will try this out sometime soon because I do have a few forums that I don't want similar topics to be searched in.
Regards,
-Ashley.S. [ PurephpBB Founder ]
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5270
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [RC1] Precise Similar Topics II

Post by MattF »

DoYouSpeakWak wrote:But with many diffrent types of forums, lets say cars and cooking, in both forums there is a topic named "This is how you do it" (or similar), When the users enters the cooking forum there is a link to a topic in the cars forum names something similar. This may direct a few into the wrong forum.

IMO there should switch for it somewere, Maybe in acp. "Show only similar topcs from this forum" could be another yes or no question in the acp module.
It turns out this is not an issue :)

I added some more info to the first post about how Similar Topic searches are made.
Key points:
  • Similar topic searches are not case sensitive
  • Short words (less than 4 letters) are ignored
  • Stopwords are ignored (the, and, some, etc.) full list of stopwords
  • If a word is present in more than 50% of all topic titles, it is too common and is treated as a stopword and is ignored.
As you can see, threads like "This is how you do it" would not factor in to Similar Topics as these words are all stopwords. So "This is how you fix a truck" and "This is how you cook fish" would not show up as similar topics to each other... The keywords in those topics are truck, cook, fish :ugeek:

EDIT: Download package updated in 1st post. No new edits or installer file to run, just copy the included files over the old ones. Just contains some minor language, code and ACP style tweaks :)
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Contact:

Re: [RC1] Precise Similar Topics II

Post by DoYouSpeakWak »

VSE wrote:
DoYouSpeakWak wrote:But with many diffrent types of forums, lets say cars and cooking, in both forums there is a topic named "This is how you do it" (or similar), When the users enters the cooking forum there is a link to a topic in the cars forum names something similar. This may direct a few into the wrong forum.

IMO there should switch for it somewere, Maybe in acp. "Show only similar topcs from this forum" could be another yes or no question in the acp module.
It turns out this is not an issue :)

I added some more info to the first post about how Similar Topic searches are made.
Key points:
  • Similar topic searches are not case sensitive
  • Short words (less than 4 letters) are ignored
  • Stopwords are ignored (the, and, some, etc.) full list of stopwords
  • If a word is present in more than 50% of all topic titles, it is too common and is treated as a stopword and is ignored.
As you can see, threads like "This is how you do it" would not factor in to Similar Topics as these words are all stopwords. So "This is how you fix a truck" and "This is how you cook fish" would not show up as similar topics to each other... The keywords in those topics are truck, cook, fish :ugeek:

EDIT: Download package updated in 1st post. No new edits or installer file to run, just copy the included files over the old ones. Just contains some minor language, code and ACP style tweaks :)
That does not solve the problem. Topics with non stopwords in them listed in both forums will still be listed together. Like "I need help" can be in both forums, but the topics content can be totally diffrent.

We must have 4-5000 topics with the words "i" "need" "help" in the topic tittle, additional to that there is many many other topics with the same problem. Only way to solve it would be a switch not to seach other forums than the one your in.

I hope you can see the problems this missing feature can give in 8-10 yrs old forums with millions of topics. Like here.
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.
Locked

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