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 |
#142
|
||||
|
||||
Quote:
NO post will be fetched if the user doesn't have permission. In other words, in showthread.php the user CANNOT see anything therefore the system will not fetch anything. The custom error message will show in it's place. If you are still lost (OR, I am not understanding you correctly) please post a snapshot of how/where you want this message to display ... it will help both of us. I will then tell you if it's possible. |
#143
|
||||
|
||||
When you hover over a thread title, it gives a preview of the post. This is a wonderful feature for my members who have access, but sucks for those that aren't supposed to be able to read. I have it set to show the first 100 characters...this is why I would like that message to be at the top of all the posts in certain forums so that they will only see that when they preview. I hope this makes sense.
|
#144
|
||||
|
||||
Princeton
This hack works perfectly. Especially with the little code snippet that allows the user who posted the thread to view/edit their own post! Also, the instructions were beyond easy. Thanks for taking the time to make it so easy. Eric |
#145
|
||||
|
||||
Quote:
It's doable but it will require more hacking and that's something that I want to prevent with this hack. FYI: The more hacking involved the more people will be afraid to implement it. If that's not what you wanted please provide a screenshot of where you want this "message". Also, when you say "message" do you mean the preview or the error message? |
#146
|
||||
|
||||
I had this hack running perfectly. Then I went into admincp and made some usergroup and forum permission changes and now NOBODY can view any forum. The permission error being generated is the gtp_cannot_read error.
So i replaced the hacked scripts with the originals that I got when i bought a license of vB. Everything worked fine then. So i re-installed this hack and i am back to the same problem. NOBODY has permission to view any threads. I have checked that "Group can read content?" has been set to Yes where necessary. I have checked all usergroup and forum permissions and i can't see where the problem is. I have re-installed the script twice! http://eslhq.com/esl_forums Please help, i am starting to panic... eric |
#147
|
||||
|
||||
Oreamnos,
Under USERGROUP MANAGER set CAN READ to YES ... in FORUM PERMISSIONS MANAGER set CAN READ to NO for specific usergroup within a specific forum. This will prevent usergroup from reading anything within that forum; but, will allow them to read content within other forums. FYI The USERGROUP MANAGER is used for GLOBAL settings (the entire site). The FORUM PERMISSIONS MANAGER is used to modify usergroup settings withing a specific forum. |
#148
|
||||
|
||||
Princeton,
still no luck. I went through my usergroups and set everyone CAN READ to yes. the i set everyone to NO except admins and on special usergroup on forum permissions. Now the admin can view everything but the other usergroups are still unable to view any of the forums, even the public forums. i am using the special code to allow the person who posted the thread the ability to view their thread. PHP Code:
Here is an example of how my Registered Usergroup Permissions look (Note Can read content is the new permission category): Can Post Threads Yes Can Reply to Own Threads Yes Can Reply to Others' Threads Yes Can Edit Own Posts Yes Can Delete Own Posts No Can Move Own Threads No Can Open / Close Own Threads No Can Delete Own Threads No Always Moderate This Group's Posts No Can Rate Threads Yes Can read content. Yes And here is the permissions for a public forum for Registered Users Can Post Threads Yes Can Reply to Own Threads Yes Can Reply to Others' Threads Yes Always Moderate This Group's Posts No Can Upload Attachments Yes Can Rate Threads Yes Can read content. Yes Besides these 2 permission settings, are there others? Thanks Eric |
#149
|
||||
|
||||
EDIT
It seems the admin got permission for a few views and then received the Permission Denied message... |
#150
|
||||
|
||||
Do you have any other hacks installed? If so... this is where your problem lies.
If you send me username/password (FTP) and username/password of site I will take a look at it. Send me info via my site's (www.gthelp.com) contact form -- do not post it here. |
#151
|
||||
|
||||
I will send you that information now. Thanks!
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|