[Xenmods] Similar Threads [Paid] [Deleted]

Daniel Hood

Well-known member
Daniel Hood submitted a new resource:

[XenMods] Similar Threads - Display similar threads upon thread creation and while viewing a thread

[XenMods] Similar Threads

On big forums, especially support forums, people tend to post the same content and ask the same questions. To counteract that, I'm developing an add on that once the input box for the thread title change, they are shown some similar threads. Currently, the threads are gathered based on matching words from the title they entered to the title of existing threads. Administrators can change the amount of results, and the minimum...

Read more about this resource...
 
Very nice. What is the logic for picking the similar threads for thread_view? Same as when typing a new thread? Interested to see if the logic for selecting can be improved. It works for me for now though!

It would be nice to easily turn off certain parts of the widget, just as username. Maybe include a snippet of the post.
 
Turning off for certain forums would be nice. Don't really need Similar threads for Intro area of sites for example. Mostly I just need to reduce the size of it. Only have it set to 5 right now but the extra content such as username and such pushes it further down the page.
 
Error:

Code:
Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Got error 'repetition-operator operand invalid' from regexp - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, 17 minutes ago
Stack Trace
#0 /home/ford/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/ford/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/ford/public_html/library/Zend/Db/Adapter/Abstract.php(734): Zend_Db_Adapter_Abstract->query('SELECT * FROM x...', Array)
#3 /home/ford/public_html/library/XMSimilarThreads/Model/Threads.php(16): Zend_Db_Adapter_Abstract->fetchAll('SELECT * FROM x...', Array)
#4 /home/ford/public_html/library/XMSimilarThreads/Widget.php(32): XMSimilarThreads_Model_Threads->search('JOTD: A Golf Jo...', '3', '5')
#5 /home/ford/public_html/library/WidgetFramework/WidgetRenderer.php(637): XMSimilarThreads_Widget->_render(Array, 'hook:thread_vie...', Array, Object(XenForo_Template_Public))
#6 /home/ford/public_html/library/WidgetFramework/Core.php(335): WidgetFramework_WidgetRenderer->render(Array, 'hook:thread_vie...', Array, Object(XenForo_Template_Public), '')
#7 /home/ford/public_html/library/WidgetFramework/Core.php(289): WidgetFramework_Core->_renderWidgetsFor('hook:thread_vie...', Array, Object(XenForo_Template_Public), '')
#8 /home/ford/public_html/library/WidgetFramework/Listener.php(66): WidgetFramework_Core->renderWidgetsForHook('thread_view_qr_...', Array, Object(XenForo_Template_Public), '')
#9 [internal function]: WidgetFramework_Listener::template_hook('thread_view_qr_...', '', Array, Object(XenForo_Template_Public))
#10 /home/ford/public_html/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#11 /home/ford/public_html/library/XenForo/Template/Abstract.php(285): XenForo_CodeEvent::fire('template_hook', Array, 'thread_view_qr_...')
#12 /home/ford/public_html/internal_data/templates/S.3,L.1,thread_view.php(2479): XenForo_Template_Abstract->callTemplateHook('thread_view_qr_...', '', Array)
#13 /home/ford/public_html/library/XenForo/Template/Abstract.php(260): include('/home/ford/publ...')
#14 /home/ford/public_html/library/XenForo/Template/Abstract.php(191): XenForo_Template_Abstract->_renderInternal('/home/ford/publ...', Array)
#15 /home/ford/public_html/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#16 /home/ford/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(119): XenForo_Template_Public->render()
#17 /home/ford/public_html/library/XenForo/FrontController.php(604): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#18 /home/ford/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#19 /home/ford/public_html/index.php(13): XenForo_FrontController->run()
#20 {main}
Request State
array(3) {
  ["url"] => string(62) "http://www.fordforumsonline.com/threads/jotd-a-golf-joke.9684/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Very nice. What is the logic for picking the similar threads for thread_view? Same as when typing a new thread? Interested to see if the logic for selecting can be improved. It works for me for now though!

It would be nice to easily turn off certain parts of the widget, just as username. Maybe include a snippet of the post.

Yes, it is the same as when typing a new thread. I'm going to be increasing the logic just trying not to destroy performance in the mean time.

Turning off for certain forums would be nice. Don't really need Similar threads for Intro area of sites for example. Mostly I just need to reduce the size of it. Only have it set to 5 right now but the extra content such as username and such pushes it further down the page.

Try putting this in the expression for the widget: in_array($forum['node_id'], array(x, y, z)) == false replace "x, y, z" with a comma separated list of ids.

To help your logic here is a thread that doesn't really have an similar threads: http://www.fordforumsonline.com/threads/1998-3-8l-ford-windstar-abs-coming-on.9860/#post-56892

Title has Windstar in it which is a Mini Van. Top similar thread is about a Ford Taurus.
Did you uninstall it?

Error:
......
Nevermind, I see why. This should be a somewhat easy fix.

What is the difference between this addon and this one http://xenforo.com/community/resources/show-similar-threads-on-thread-creation.2050/ ?

The other one seems more feature rich and at a lower price.

Erm, I suppose nothing yet. I didn't realize that existed. I saw a few posts about wanting this feature and no mention of that add on.

Well damn lol

I'll refund you if you want or you can let me know what features you'd like that aren't there and I can make this one better.
 
I haven't bought this yet but one thing I don't like about it from my experience of using it on discussionjunkies is that avatars are large in this addon which causes the drop down to be taller. I don't think avatars should show up to save some space. If I buy this maybe I'll be able to remove the avatars so that the threads take up less space height-wise. I might even be able to shrink the font and padding a bit.
 
Just bought this, great.

One thing caught me out, I searched for the phrase text "Have you seen?" and it didn't show in the results because there are two spaces between "Have" and "You"
 
It would be got if we could exclude certain words.

I would like to automatically exclude common words such as "and" or "the"

Also words that are very generic to the niche. e.g. if your forum is about widgets and nearly every thread has the word "widgets" in the title, so when you search for small blue widgets, you just get threads with the words "small" and "blue"
 
Error:

Code:
Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Got error 'repetition-operator operand invalid' from regexp - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, 17 minutes ago
Stack Trace
#0 /home/ford/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/ford/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/ford/public_html/library/Zend/Db/Adapter/Abstract.php(734): Zend_Db_Adapter_Abstract->query('SELECT * FROM x...', Array)
#3 /home/ford/public_html/library/XMSimilarThreads/Model/Threads.php(16): Zend_Db_Adapter_Abstract->fetchAll('SELECT * FROM x...', Array)
#4 /home/ford/public_html/library/XMSimilarThreads/Widget.php(32): XMSimilarThreads_Model_Threads->search('JOTD: A Golf Jo...', '3', '5')
#5 /home/ford/public_html/library/WidgetFramework/WidgetRenderer.php(637): XMSimilarThreads_Widget->_render(Array, 'hook:thread_vie...', Array, Object(XenForo_Template_Public))
#6 /home/ford/public_html/library/WidgetFramework/Core.php(335): WidgetFramework_WidgetRenderer->render(Array, 'hook:thread_vie...', Array, Object(XenForo_Template_Public), '')
#7 /home/ford/public_html/library/WidgetFramework/Core.php(289): WidgetFramework_Core->_renderWidgetsFor('hook:thread_vie...', Array, Object(XenForo_Template_Public), '')
#8 /home/ford/public_html/library/WidgetFramework/Listener.php(66): WidgetFramework_Core->renderWidgetsForHook('thread_view_qr_...', Array, Object(XenForo_Template_Public), '')
#9 [internal function]: WidgetFramework_Listener::template_hook('thread_view_qr_...', '', Array, Object(XenForo_Template_Public))
#10 /home/ford/public_html/library/XenForo/CodeEvent.php(58): call_user_func_array(Array, Array)
#11 /home/ford/public_html/library/XenForo/Template/Abstract.php(285): XenForo_CodeEvent::fire('template_hook', Array, 'thread_view_qr_...')
#12 /home/ford/public_html/internal_data/templates/S.3,L.1,thread_view.php(2479): XenForo_Template_Abstract->callTemplateHook('thread_view_qr_...', '', Array)
#13 /home/ford/public_html/library/XenForo/Template/Abstract.php(260): include('/home/ford/publ...')
#14 /home/ford/public_html/library/XenForo/Template/Abstract.php(191): XenForo_Template_Abstract->_renderInternal('/home/ford/publ...', Array)
#15 /home/ford/public_html/library/XenForo/Template/Public.php(110): XenForo_Template_Abstract->render()
#16 /home/ford/public_html/library/XenForo/ViewRenderer/HtmlPublic.php(119): XenForo_Template_Public->render()
#17 /home/ford/public_html/library/XenForo/FrontController.php(604): XenForo_ViewRenderer_HtmlPublic->renderContainer(Object(XenForo_Template_Public), Array)
#18 /home/ford/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_View), Object(XenForo_ViewRenderer_HtmlPublic), Array)
#19 /home/ford/public_html/index.php(13): XenForo_FrontController->run()
#20 {main}
Request State
array(3) {
  ["url"] => string(62) "http://www.fordforumsonline.com/threads/jotd-a-golf-joke.9684/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

I found this error, it was associated with a thread title that had 3 or more question marks in the title. Editing the thread (with the addon disabled) and removing the question marks solved the issue.

Have contacted the developer.
 
There is a very slight widget issue:

The thread titles wrap to the right of the member icon unless they are long enough to cause a line break. In this case the icon goes above the title instead of floating to the left, which causes a bit of waste of vertical space. Also it would be good to have slightly smaller icons.

e.g. compare widgets

Most replied threads:

mostreplied.webp

With Similar threads:

similar.webp
 
I just installed this but it doesn't seem to work. It seems to be installed but I'm not seeing an similar threads?
 
Back
Top Bottom