vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   New Similar Threads Plugin? (https://vborg.vbsupport.ru/showthread.php?t=287493)

GCC LLC 09-05-2012 02:13 PM

New Similar Threads Plugin?
 
Does anyone have any suggestions (or know if a premade plugin that would do this) for creating a new plugin which will search for similar threads ONLY within a specfic forumid? I don't want to edit the existing similar threads code, I want to basically duplicate its functionality but only limit the search to a specific forum. The results of this search will appear below the existing similar threads list (but labeled differently to serve a different purpose).

Any thoughts/suggestions appreciated!

kh99 09-05-2012 02:36 PM

Look at file packages/vbdbsearch/coresearchcontroller.php, function get_similar_threads() (around line 138). It's really just a query that uses a mysql feature to match text against a something and return a score.

GCC LLC 09-05-2012 02:56 PM

Thanks, I had seen that. Do you know per chance how I could go about duplicating that, modifying the MySQL query, and then making those results available within a template on vB? Inknownthe query I need to run, it's just a matter of getting those results to show in vBulletin. I'd rather not modify any core vB files if I can avoid it, which is why I was hoping I could just write a plugin to accomplish this.

kh99 09-07-2012 12:38 PM

Yeah, sorry, I guess that was the easy part. I never have looked closely at the search code to see how it could be modified - maybe someone else will help.


All times are GMT. The time now is 09:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01022 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete