PDA

View Full Version : Mini Mods - Thumbnails For All Usergroups


Gio~Logist
11-21-2008, 10:00 PM
Brought To You By
ModernvB - Vbulletin Solutions & Services
http://www.modernvb.com

What does this do?[/b]
This modification makes it so that all usergroups can view attachment thumbnails. Give them a little tease and allow them to at least see what they're missing out on :p

This modification also still keeps basic forum permissions intact. For example, if they are requesting to view a thumbnail for a forum where they can't even view threads (or even that forum), it will not let them of course.

Step 1)
In showthread.php, find (2 instances): $vbulletin->options['attachthumbs'] = 0;
Change it to: //$vbulletin->options['attachthumbs'] = 0;
Step 2)
In attachment.php, find: if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['cangetattachment']) OR (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($attachmentinfo['postuserid'] != $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] == 0)))
{
print_no_permission();
}Change it to: // Change up the conditional below to allow everyone (including guests)
// to view thumbnails
// by Gio~Logist

if($imagetype == 'thumbnail'){


if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($attachmentinfo['postuserid'] != $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] == 0)))
{
print_no_permission();
}

} else {

if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['cangetattachment']) OR (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($attachmentinfo['postuserid'] != $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] == 0)))
{
print_no_permission();
}

}
// end permission thumbnail change


F.A.Q
Q) How can i allow all usergroups to access thumbnails, regardless of their forum permissions (whether or not they can access the forum or threads).
A) Resort to the second post of this thread.

Gio~Logist
11-22-2008, 03:45 PM
Step 2) (Alternate)
Use this as an alternate Step 2 in order for any usergroup to the thumbnail images, regardless of whether or they have permission to access the thread or forum.

In attachment.php, find: if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['cangetattachment']) OR (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($attachmentinfo['postuserid'] != $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] == 0)))
{
print_no_permission();
}
Change it to: // Change up the conditional below to allow everyone (including guests)
// to view thumbnails
// by Gio~Logist

if($imagetype == 'thumbnail'){


// Allow anyone to view thumbnails

} else {

if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['cangetattachment']) OR (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($attachmentinfo['postuserid'] != $vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] == 0)))
{
print_no_permission();
}

}
// end permission thumbnail change

nando99
11-22-2008, 09:22 PM
Very cool mod here bro... thanks for the heads up....

Tianuc
12-03-2008, 08:11 AM
How can i allow all guests to access thumbnails?

z0diac
08-25-2009, 03:26 AM
WARNING: DO NOT DO THESE STEPS ON VB 3.8x

It will mess everything up...

wangyu1314
06-28-2012, 11:40 AM
i am very love it, thank you.