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 |
#92
|
||||
|
||||
thanks for the update
|
#93
|
|||
|
|||
And thank you for the hack. That solves a lot of things for me.
|
#94
|
|||
|
|||
sorry if i missed it but if thread preview enabled you can read a bit of first post content even if "Group can read content?" - NO! Can you fix it please!
|
#95
|
||||
|
||||
the idea behind this is to give viewers a small peak of what is inside--the title and preview can provide this ...
modify the character limit for thread preview if you want it removed |
#96
|
|||
|
|||
Hi,
thx for the finest hack i have build in :-) in the first test cases it works fine and bring me more flexibility. but, how can i select a seperately error messages, if a "non read user" want to read topics from a closed forum? i want to put some urgent information on this site, how a user can get access to the closed forum. so i dont want to take the standard error page. is there any way ? have thanks ! tom :banana: |
#97
|
|||
|
|||
installed on 3.0.3 Gold
works like a charm |
#98
|
|||
|
|||
I am almost finished installing this hack, when clicking usergroup manager, I get this error
" [I]Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in E:\hshome\wiltechs\afrochat.net\forums\admincp\use rgroup.php on line 127" Here is what I have on line 127 in Bold and Italics: // == [ 00-00-2004 - GTP END ] // ================================================= \\ 'shoutpost' => 1, 'shoutedit' => 1, 'shoutdelete' => 1, |
#99
|
||||
|
||||
Parse Errors are usually caused by something that you have overlooked. For example, a comma, semi-colon, closing bracket, etc is missing or out of place.
I see that you have other hacks installed .. this may be the reason why you are having trouble. To find your error, I recommend that you go over your code and make sure everything is exactly the way I have it on the hack instructions. I'm guessing that your problem is in the init.php file. |
#100
|
|||
|
|||
I fixed it! Error in ini.php and usergroup.php.
Even though it was terribly frustrating, I don't feel justified in complaining since so much modding had to be done. Great job dude! Install! |
#101
|
||||
|
||||
thanks for the update
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|