Helpful Information
 
 
Category: vBulletin 3.0 Full Releases
Only Show Posts With Attachments On Showthread

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:


if ($threadedmode == 0)
{


Add after:


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


Find:


WHERE threadid = $threadid AND visible = 1 $delthreadlimit

Add after:


$attachsql



Find (just after the last edit):


WHERE threadid = $threadid AND visible = 1


Add after:


$attachsql


Find:


$postids = "post.postid IN (0" . $ids . ")";


Add after:


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:
Sorry, this thread doesn't contain any attachments.

Please click install if you use this hack :)

Just posting a txt in case someone wanted it like in the other thread.

Dark Shogun










privacy (GDPR)