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 |
#252
|
|||
|
|||
Quote:
Thanks for suggesting a possible problem. No. I did not "search for 65536" and place the code after that. I performed the hack as instructed and had it working fine until I installed the other hack. I HAVE only posted the parts of each hack that *appeared* to me to be conflicting, but you can see both of the hacks, in full, through the links I provided in my first post, to compare the full codes for other possible conflicts ('cause I sure don't know where or how they're conflicting...). ~ Mark |
#253
|
|||
|
|||
Okay... I'm thinking the problem is coming from "text on pm" redefining "hasaccessmask"
Prior to installing that hack, 'hasaccessmask' reads: Code:
'hasaccessmask' => 8192, Code:
'hasaccessmask' => 16384, That hack is using 8192 for a new permission: 'txtmsgonpm'. Can 'txtmsgonpm' be redefined to the 16384 or some other number, so that 'hassaccessmask' can remain 8192? Alternatively, is there a way to allow 'hasaccessmask' to be redefined and still work for this hack? ~ Mark |
#254
|
|||
|
|||
Alright. The more I explore, the more sure I am of the conclusion I came to in my last post above.
In the end, I've left both hacks installed. Because the "Text on PM" redefines the bitfield for 'hasaccessmask', if you choose to use both hacks ("Text on PM" and "Allow Groups to read"); AND you've first installed the "Allow Groups" hack FIRST, THEN installed "Text on PM", you'll need to go back to all the users you've allowed to read the thread contents (in the forum(s) you've selected as your "Allow Groups to read" forum(s)) and: 1) Change each user first to "no" or "default"; THEN 2) Change that same user BACK to "yes" YOU HAVE TO DO THIS EVEN THOUGH YOUR USER ACCESS MASKS WILL STILL SHOW THOSE USERS AS HAVING PERMISSION TO READ CONTENTS Although I am not sure how it happens, it's my belief that by redefining 'hasaccessmask' with a new bitfield, it causes vB to "forget" whom could and could not read thread contents, requiring you to again re-define them. Said another way, the variable that used to define who could read contents, has been changed. To restore that permission you need to again define those users. Again, this *should* only apply to users who have FIRST installed the "allow groups to read" hack, THEN installed the "text on pm" hack. ~ Mark |
#255
|
||||
|
||||
Did you try clearing all cookies / closing session / logging out / close browser before you did all the above? It could have worked; but, then again--maybe not. Anyway, you got the hacks working and that was the ultimate goal.
thanks for sharing your find... |
#256
|
|||
|
|||
Am i missing something? What does a phonenumber got to do with this hack?
|
#257
|
|||
|
|||
Does this work with 3.0.8?
|
#258
|
||||
|
||||
yea, it should work ...
in case you are not aware--this option is now built into vb 3.5 |
#259
|
|||
|
|||
Thanks for the reply. I have 3.0.8 and I have installed it and I can see the options in admin and have set them but guests can still view!
|
#260
|
||||
|
||||
Have you set and saved each usergroup permissions?
If not, you must 'save' each usergroup permissions setting for it to work. If you done the above take a closer look at the instructions -- you may have made an error while copying and pasting. |
#261
|
|||
|
|||
By save each usergroup permission do you mean select the usergroup chose yes or no and save? Sorry I am new at this
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|