The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Allow Group to Read Titles / Not Content Details »» | |||||||||||||||||||||||||||
Allow Group to Read Titles / Not Content
Developer Last Online: Nov 2022
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:
MOD VERSION 1.05
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 ] // ================================================= \\ [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'])); } 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 ] // ================================================= \\ 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 Show Your Support
|
Comments |
#112
|
||||
|
||||
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 ] // ================================================= \\ |
#113
|
||||
|
||||
I installed this hack and seem to have the following issue (it's probably a very minor thing I'm overlooking):
I have a few forum which I'd like to show the threads and not the titles. In the admincp, I have the forum permissions set so that guests can see the forum and titles, but I set the "can see content" to no. For whatever reason, it still shows the content, even when the option was set to no. When I edit the guest usergroup to disallow thread viewing, all threads are then invisible to guests. Anyone know what I'm overlooking? I'm sure it's a very simple thing that I didn't notice... |
#114
|
||||
|
||||
You mean show title NOT content ???
This hack displays title ... content is displayed when proper permissions are given. You need to set your Group can read content? setting in USERGOUP MANAGER (global settings) and FORUM PERMISSIONS MANAGER (individual forum settings). |
#115
|
||||
|
||||
Just to confirm, this hack can let you allow specific usergroups to only view titles of the threads ( and not the contents ) in all forums ?
|
#116
|
||||
|
||||
this hack will show titles to everyone in forumdisplay.php but not content in showthread.php ...
you can prevent people from seeing the title (in forumdisplay) by using conditionals (I believe it's posted somewhere on previous posts) |
#117
|
||||
|
||||
Quote:
|
#118
|
||||
|
||||
Quote:
What I mean is all I have to do is just set to allow certain usergroups ( which i want to allow access to see the content ) to be able to see content , yes ? I dont want to have to do it for every single forum but across the board. For eg. for all the forum sections on my board, all can see titles, but i only want the registered folks to be able to see content of all threads. Can this be done ? Sorry if this sounds silly, am rather confused after reading all the posts in this thread. |
#119
|
||||
|
||||
Quote:
Quote:
Can you provide a url to your site; the forum in question, etc?? This hack will display showthread content if a user has permission. It has nothing to do with forumdisplay.php 'titles'. threads = forumdisplay.php (title will show to everyone) content = showthread.php (will show only if user has permission) Have you copied any code from previous posts? If so, please reinstall without any changes. |
#120
|
||||
|
||||
Quote:
|
#121
|
||||
|
||||
Thanks again princeton, will install it later !
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|