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 |
#122
|
||||
|
||||
Quote:
|
#123
|
||||
|
||||
Quote:
|
#124
|
||||
|
||||
Is there a way to add a message into the beginning of all threads created in certain forums to prevent message previewing?
For instance, when guests view my premium forums they can do a message preview. I would like for a message to be attached at the top of the first post of all threads created in that forum. Ex: This message was posted in a premium forum and contains private information. Sharing this message with non-premium members violates our terms of service. And then the message would continue. That way, guest previewing would only see the standard message and not the real one. Make sense? Possible? |
#125
|
||||
|
||||
Ok just installed this but I think the instructions are not very clear.
The file edits went fine, I am refering to the last bit ( all can be done in Admincp bit ) 2 things : Firstly. for the custom no permission error, perhaps you should mention changing the phrase gtp_cannot_read to suit your personal needs. Secondly, for this section : Code:
Upon completion, you must set this option to "Yes" for each USERGROUP that exists. (This will allow everyone to view contents of showthread.php.) You must update each existing usergroup for this to take effect or they will not be able to see showthread.php 1. Enter "USERGROUPS/USERGROUP MANAGER" found in vB Control Panel 2. Edit each group - check YES on "Group can read content?" 3. Update each group by pressing the UPDATE button found at the bottom. Perhaps you should mention, set this setting to NO if you do not want that particular usergroup access to read the content in all the forums ? Just off the top of my head, unless I failed to understand this hack properly. |
#126
|
||||
|
||||
Hmm now I am confused again, are we supposed to set the forum permission bit AS WELL ?
Some of my registered members are reporting getting the error ( despite setting in the usergroup permissions for registered users to allow them to see the content ). |
#127
|
||||
|
||||
Your'e assuming that people need a helping hand every step ...
I'm assuming that people will know what to do (even if they take an educated guess). I like your suggestion so I will change the instructions as followed: Code:
Upon completion, you must set your desired setting for each USERGROUP that exists. "YES"--will allow users to view contents of showthread.php. "NO"--will NOT allow users to view contents of showthread.php. You must update each existing usergroup for this to take effect or they will not be able to see showthread.php 1. Enter "USERGROUPS/USERGROUP MANAGER" found in vB Control Panel 2. Edit each group - check YES on "Group can read content?" to allow members to view content; check NO to NOT ALLOW members to view content. 3. Update each group by pressing the UPDATE button found at the bottom. |
#128
|
||||
|
||||
Here's an example of how this 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 |
#129
|
||||
|
||||
So if on my boards, I want ALL the forums and subforums contents to be viewable only to registered members, all I have to do is just set the Usergroup manager setting for registered - YES
and do not have to do anything in forum permissions manager. Correct ? Sorry for sounding stupid princeton, I appreciate your help |
#130
|
||||
|
||||
Hmm, not too sure if this is a bug or not, but in forums where you cannot post REPLIES, this hack stops anyone from viewing the content, regardless if the usergroup has been set to YES.
Could you check this ? |
#131
|
||||
|
||||
Quote:
i think ... sorry, it's been a while since I released this hack |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|