Back to vBulletin 3.0 Add-Ons

Only Show Posts With Attachments On Showthread
Mod Version: 1.00, by NTLDR

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

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

Description:

This hack will allow you to only show posts which contain attachments on showthread.php.

Usage:
showthread.php?threadid=1&attachments=1

(i.e add &attachments=1 onto the URL).

File Edits:

In showthread.php find:

PHP Code:
if ($threadedmode == 0)

Add after:

PHP Code:
    // show only threads with attachments
    
if ($_REQUEST['attachments'] == 1) {
        
$attachsql 'AND post.attach <> 0';
        
$attachwhere true;
    } else {
        
$attachsql '';
        
$attachwhere false;
    } 
Find:

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

PHP Code:
$attachsql 

Find (just after the last edit):

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

PHP Code:
$attachsql 
Find:

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

PHP Code:
    if (empty($ids) && $attachwhere) {
        eval(
print_standard_error('error_sorry_no_attachments'));
    } 
Add the following phrase to the Front-End Error Message group:
Varname: sorry_no_attachments
Text:
Code:
Sorry, this thread doesn't contain any attachments.
Please click install if you use this hack

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024