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 |
#62
|
|||
|
|||
Quote:
Ups HDD-crash. that is not god. Sorry for stressing you. I pleased to get the 3.0.3 hack Greets Snatch |
#63
|
|||
|
|||
Install in 3.0.3 Ok
|
#64
|
||||
|
||||
Instructions have been updated for version 3.03
If you have this hack installed and it's given you problems, I suggest starting from scratch. Do not take no shortcuts as you will have problems. This version has been tested by me and a few people with success. For those who wanted images (couldn't understand what this hack does) --- I have uploaded a few images. I recommend you do not remove the Code:
// ================================================= \\ // == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ] // replaced code gets commented not removed // == [ 00-00-2004 - GTP END ] // ================================================= \\ |
#65
|
|||
|
|||
I am sure that this part is just a template edit, but how would I make it so that if a user doesn't have permissionto view thread content, the title of the threads on showthread would only appear as text, without their hyperlinks.
|
#66
|
||||
|
||||
If they don't have permission the "user" will not be able to see the title in showthread.
You probably mean removing the link from threadbit and forumhome_lastpostby template. If this is what you mean you can use: Code:
<if condition="($forumperms & GTPCANREADCONTENT)"> {if can read} <else /> {if cannot read} </if> Oh, by the way - if you do this the end-user may become confused. eg. they will probably think that something is wrong with your site I recommend adding a cue or a short message if you decide to do this. The default way at least gives them some kind of feedback. Thus, they know that they do not have the proper permissions. |
#67
|
|||
|
|||
This is working great on my test forums, 1 question though (I haven't seen it asked in the thread so far), does this allow search engine bots to access threads? And if not how can I grant them access? I'd like google to be able to index the pages and the content but only allow users to read the threads if they're registered.
Cheers, Robert |
#68
|
|||
|
|||
*bump*
|
#69
|
||||
|
||||
it could be possible I guess...
Find a script/hack that will temporarily place "users" in usergroups by IP or user agent. |
#70
|
|||
|
|||
Quote:
|
#71
|
||||
|
||||
yes, that's possible - do a match for useragent - if (preg_match(useragent)) allow;
If you find something that works post it here ... I'm sure others may find it useful. one thing you have to think about is that google displays "cached" pages; thus, you have to prevent google from cacheing your site. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|