Back to vBulletin 3.0 Add-Ons

Allow Group to Read Titles / Not Content
Mod Version: 1.05, by Princeton

This modification is in the archives.
vB Version: 3.0.7 Rating: (3 votes - 5.00 average) Installs: 146
Released: 14 Jan 2004 Last Update: 25 May 2005 Downloads: 27
Not Supported  

Tested and working in 3.0.3 - 3.0.7

This hack will enable you to DISABLE SHOWTHREAD according to USERGROUP.This will allow all your members to view titles and topic counts found within a section. Think of it as "window shopping". Your members will be able to read all topics from the forumdisplay.php page but, will not be allowed to read it's content unless they have permission

The edits below will prevent anyone from viewing the contents of a post from within showthread, printthread, showpost, and archives.

This feature can be used on a per USERGROUP and /or per FORUM basis. You, as the admin, will have complete control.

You will need to modify:
  • includes/init.php
  • includes/adminfunctions_forums.php
  • admincp/resources.php
  • admincp/usergroup.php
  • showthread.php
  • archive/index.php
  • printthread.php
  • showpost.php
  • archive.css
Add 3 new phrases.
MOD VERSION 1.05
  • Fixed issues concerning the archives - eg. blank page was displayed ... now, thread links are viewable but not active (if not allowed).
MOD VERSION 1.01
  • now with personal NOT ALLOWED message
  • Easier to install
  • now add the ability to allow users to view their own posts/threads (view below code)
  • archive section changed to NOT display links to content that is not READABLE
  • added a message to archive section if user cannot read content
[hr=blue]4[/hr]
Allow User To View And Post Into Their Own Threads:
If you want to allow users to view and post their own threads and have access to them ... use this code in showthread, printhread, and showpost.php:
Code:
// ================================================= \\
// == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ]
                 if (!($forumperms & GTPCANREADCONTENT)AND ($thread['postuserid'] != $bbuserinfo['userid']))
                 {
                     eval(print_standard_error('gtp_cannot_read'));
                 }
// == [ 00-00-2004 - GTP END ]
// ================================================= \\
NOTE: You may have to use "$threadinfo['postuserid]" on some of the pages.

[hr=blue]4[/hr]
Disable Thread Preview
To disable thread previews on forums that user cannot read content do the following edits:
FIND in functions/forumdisplay.php:
Code:
    // format thread preview if there is one
    if ($ignore["$thread[postuserid]"])
    {
        $thread['preview'] = '';
    }
    else if (isset($thread['preview']) AND $vboptions['threadpreview'] > 0)
    {
        $thread['preview'] = strip_quotes($thread['preview']);
        $thread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($thread['preview'], false, true), $vboptions['threadpreview']));
    }
REPLACE IT WITH:
Code:
// ================================================= \\
// == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ]
    $forumperms = fetch_permissions($foruminfo['forumid']);
    // format thread preview if there is one
    if ($ignore["$thread[postuserid]"] OR !($forumperms & GTPCANREADCONTENT))
    {
        $thread['preview'] = '';
    }
    else if (isset($thread['preview']) AND $vboptions['threadpreview'] > 0)
    {
        $thread['preview'] = strip_quotes($thread['preview']);
        $thread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($thread['preview'], false, true), $vboptions['threadpreview']));
    }
// == [ 00-00-2004 - GTP END ]
// ================================================= \\
[hr=blue]4[/hr]
Example Of How Hack Works:
I have a forum with (sub-forums) ... however, one of the sub-forums is private (for PREMIUM members only). Here's how the settings would look like.

In USERGROUP MANAGER (this is a global setting) set "Group can read content?:
UNREGISTERED - YES
REGISTERED - YES
PREMIUM - YES

The global setting will be transferred to all forums; but, we have a sub-forum that is only for PREMIUM MEMBERS so...

In FORUM PERMISSIONS MANAGER set private forum to:
UNREGISTERED - NO
REGISTERED - NO
PREMIUM - YES

Download

This modification is archived and cannot be downloaded.

Screenshots

       

 

Similar Mods

Allow users to self-censor thread titles and post content vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024