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 |
#22
|
|||
|
|||
Hello,
This solution adorned me simple assé for check resulted. In the file includes / functions_forumlist.php has the line 161 to replace if (!($forumperms & CANVIEW) OR !($forumperms & CANVIEWOTHERS)) By if (!($forumperms & CANVIEW)) In the file forumdisplay.php has the line 454 to replace if (!($forumperms & CANVIEWOTHERS)) By if (!($forumperms)) Can it work on the basis of forum by forum, that is we can activate or deactivate such or such forum by perissions, as it was the case for version vb2.x |
#23
|
||||
|
||||
huh?
yes, it works on a per forum basis |
#24
|
|||
|
|||
Nice hack What would we have to change to keep them from reading the titles too?
|
#25
|
||||
|
||||
you don't need this hack to achieve what you want ... look into vb's default permissions and prevent group from viewing the forum
|
#26
|
|||
|
|||
Actually, I do
I have a situtation where hazard report information is placed in a forum. The thread may affect all the groups or a combination of those groups. If a hazard does not affect a group it is important to keep the existence of the title and information from them. If I prevent groups from just seeing the forum as you stated it would require me to have multiple forums which could get out of hand. ie.. 300 reports would equal 300 forums. If I was able to hide the thread using your hack then I would only have 1 forum for all groups to go to and the groups would only be able to view titles and threads they are given access too. BTW thanks for the fast reply |
#27
|
||||
|
||||
You do not need a hack to accomplish what you want. You can prevent a group from viewing threads created by others using vb's default permissions system.
If this is not what you where asking there is no need to continue reading. For example, if userA, who belongs to groupA, creates a thread it does not mean that userB, who belongs to groupB, will have access to view the thread. (vice-versa) You control this by setting permissions to specific usergroups for specific forums. The usergroup section in your vb cpanel will allow you to set DEFAULT settings permissions per group. However, you can change the permissions per group/ per forum by going into the Forums & Moderators / Forum Permissions and modify permissions for each group as you see fit. |
#28
|
|||
|
|||
Thanks for the response. I can see why we have the confusion. I thought the admin could post a thread and then dictate who could see it. What I am lookin for is something that will alow me to post threads in a forum that 6 different groups have access too. With said threads I need to be able to let from 1 to 6 groups see each one depending on status given to the thread. Group 1 and 2 might be able to see thread 1 for instance while group 1, 3 and 6 might see thread 2 and so forth.
Thanks again for taking the time to respond |
#29
|
||||
|
||||
If I understand this correctly, you want to determine who gets to view thread upon submitting a new thread (based on the status poster chooses)?
Since you have "200 reports", it is wise to group/organize. One forum will give you a headache in the long run. What I recommend .... 1. Since you have 6 groups, I suggest creating 6 different forums. Set the proper permissions for each group. 2. Create a new FORM (similar to newthread form) that will use the "status" value as a replacement for forumid. for example HTML Code:
<select name="f" tabindex="1"> <option value="33">status green</option> <option value="34">status red</option> </select> |
#30
|
|||
|
|||
Thanks princeton
That is really not an option for me because the designated groups must be able to read and respond to the posts made by anyone that has access to the thread |
#31
|
||||
|
||||
Quote:
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|