vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Similar threads - how to improve ? (https://vborg.vbsupport.ru/showthread.php?t=317772)

mario1973 03-14-2015 09:32 AM

Similar threads - how to improve ?
 
I would like to modify the code similar threads. I would like to add another condition.
I intend to in this section have been shown only threads that contain more than one post. Is it possible?

kh99 03-14-2015 09:54 AM

I think this should work: create a plugin using hook search_similarthreads_fulltext and code like this:
Code:

$hook_query_where .= ' AND thread.replycount > 0 ';

but I didn't actually test it, because I can never get similar threads to show up on my test forum and I never get around to figuring out why.

mario1973 03-15-2015 11:46 AM

Thank you very much .
I do not know on creating plugins so I made corrections ' AND thread.replycount > 0 ' in showthread.php section : get similar threads
And can tell you how to make a plugin?

kh99 03-15-2015 11:59 AM

Well, if you're going to add it to the code instead of making a plugin (which is easy, if you want to try), then it should go in includes/functions_search.php. That is if you want all the similar threads to have more than one post.

But if you meant that you only want to have a similar threads section displayed on threads that have more than one post, then you probably would do that in showthread.php.


All times are GMT. The time now is 08:27 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.00997 seconds
  • Memory Usage 1,709KB
  • 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)bbcode_code_printable
  • (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