← Back to vBulletin 3.0 Add-Ons

Only Show A Specific Users Posts In A Thread
Mod Version: 1.00, by NTLDR

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 2
Released: 13 Jan 2004 Last Update: Never Downloads: 1
Not Supported  

Author: NTLDR
Version: 1.0.0
vB Compatibility: vB3 Gamma, RC1, RC2

Description:

This hack will allow you to only show posts by a specific user on showthread.php.

Usage:
showthread.php?threadid=1&userid=X
showthread.php?threadid=1&username=Y

(i.e add &userid=X for all posts by userid X or &username=Y for all posts by user Y).

File Edits:

In showthread.php find:

PHP Code:
if ($threadedmode == 0)
{ 
Add after:

PHP Code:
    // EDIT ########################################################################
    // get posts by a specific user only
    
if (!empty($_REQUEST['userid'])) {
        
$usersql = 'AND post.userid = '.intval($_REQUEST['userid']);
        
$uidwhere = true;
    } elseif (!empty(
$_REQUEST['username'])) {
        
        
$fetchuserid = $DB_site->query_first("SELECT userid FROM ".TABLE_PREFIX."user WHERE username = '".addslashes($_REQUEST['username'])."'");
        
$uidwhere = false;
        
        if (empty(
$fetchuserid['userid'])) {
            
$idname = $vbphrase['user'];
            eval(
print_standard_error('error_invalidid'));
        } else {
            
$usersql = 'AND post.userid = '.intval($fetchuserid['userid']);
        }

    } else {
        
$usersql = '';
        
$uidwhere = false;
    }
    
// END EDIT #################################################################### 
Find:

PHP Code:
WHERE threadid = $threadid AND visible = 1 $delthreadlimit 
Add after:

PHP Code:
$usersql 

Find (just after the last edit):

PHP Code:
WHERE threadid = $threadid AND visible = 1 
Add after:

PHP Code:
$usersql 
Find:

PHP Code:
$postids = "post.postid IN (0" . $ids . ")"; 
Add after:

PHP Code:
    if (empty($ids) && $uidwhere) {
        
$idname = $vbphrase['userid'];
        eval(
print_standard_error('error_invalidid'));
    } 
Done!

Please click install if you use this hack

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2025