Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
Ignore maxresults in "Search by username" Details »»
Ignore maxresults in "Search by username"
Version: 1.00, by azher azher is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 04-01-2004 Last Update: Never Installs: 3
 
No support by the author.

Hello everyone,

I've been lurking for the past several years and figured I should probably start sharing a few quick hacks to "give back". I did a quick search but couldn't find anything that did this....

What this does: Makes "Find all posts by (member name)" actually find ALL posts by that member and ignores the value you specify (via the AdminCP) for your maximum search results (maxresults). This maxresults limit is also ignored if someone specifies a username in your "advanced search" options.

It's good for boards that want to keep the maxresults limited for performance reasons, however still want to allow members to search for all their (or someone else's) past posts.

On to the hack: This one is real quick, only three lines are edited in one file.

In search.php:

1. Find:

PHP Code:
if ($vboptions['maxresults'] > AND $numitems $vboptions['maxresults']) 
Change to:

PHP Code:
if ($vboptions['maxresults'] > AND $numitems $vboptions['maxresults'] AND !$search['searchuser']) 
2. Find:

PHP Code:
$threads $DB_site->query("
                SELECT threadid
                FROM " 
TABLE_PREFIX "thread AS thread
                LEFT JOIN " 
TABLE_PREFIX "deletionlog AS delthread ON(delthread.primaryid = thread.threadid AND delthread.type = 'thread')
                WHERE forumid IN(" 
implode(', '$forumids) . ")
                AND thread.lastpost >= 
$datecut
                AND visible = 1
                AND delthread.primaryid IS NULL
                ORDER BY lastpost DESC
                LIMIT  
$vboptions[maxresults]
"
); 
Change to:

PHP Code:
$threads $DB_site->query("
                SELECT threadid
                FROM " 
TABLE_PREFIX "thread AS thread
                LEFT JOIN " 
TABLE_PREFIX "deletionlog AS delthread ON(delthread.primaryid = thread.threadid AND delthread.type = 'thread')
                WHERE forumid IN(" 
implode(', '$forumids) . ")
                AND thread.lastpost >= 
$datecut
                AND visible = 1
                AND delthread.primaryid IS NULL
                ORDER BY lastpost DESC
"
); 
3. Remove:

PHP Code:
LIMIT " . ($vboptions['maxresults'] * 2) . " 
This has been tested on our medium-sized boards (350k posts, 3k users) running vB3 gold and everything seems to be in order.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-03-2004, 06:23 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would be nice to search your own threads as well...
Reply With Quote
  #3  
Old 04-03-2004, 04:58 PM
azher azher is offline
 
Join Date: Oct 2001
Location: Chicago, IL
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello again,

UPDATE: Added a quick bugfix and "feature enhancement" that allows more than the maxresults limit for "New Posts" and "Today's Posts", as well.

And yes, it works for searching your own (or other people's) threads as well.
Reply With Quote
  #4  
Old 04-13-2006, 09:17 PM
denby denby is offline
 
Join Date: Nov 2004
Location: Canberra, Australia
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there an update for 3.5.4? I've had a go myself and I just can't get it working.

I want to return all the posts made in the last 24 hours without limit. Any help would be most appreciated.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04202 seconds
  • Memory Usage 2,238KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete