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 |
#242
|
||||
|
||||
attached is how the archives will look like when completed (not allowed to read)
notice there is no link? the second image is the content page ... when someone tries to go to the page directly via the address bar -- they see nothing |
#243
|
|||
|
|||
Unless I'm mistaken
Quote:
To disable thread previews on forums that user cannot read content do the following edits: FIND in functions_forumdisplay.php Great hack and exactly what I was looking for. Installed. Only problem is in attempting to view the Archives I get this error: Parse error: parse error, unexpected T_ELSE in /home/totalli/public_html/forum/archive/index.php on line 324 I, er... am doing this all by hand... er... on Word pad... and am having a hard time counting down 324 lines I've double checked and don't see the error I made. Anyone (with a proper php editor) have a clue where I might look? Thanks ahead of time. ~ Mark |
#244
|
||||
|
||||
LOL ... yep spelling error
the error states you did an erroneous copy/paste ... the only way to fix this is to check your file |
#245
|
||||
|
||||
small typo in archive/index.php
FIND ALL INSTANCES OF: slash_method REPLACE WITH: SLASH_METHOD |
#246
|
|||
|
|||
I'd love this hack, but it's conflicting with the Text Message User on PM hack I already have installed.
I believe the conflict is coming in the inclues/init.php changes. Specifically the change in this hack: Code:
Find: 'canthreadrate' => 65536, 'isalwaysmoderated' => 131072, 'canseedelnotice' => 262144 ); Replace with: 'canthreadrate' => 65536, 'isalwaysmoderated' => 131072, 'canseedelnotice' => 262144, // ================================================= \\ // == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ] 'gtpcanreadcontent' => 524288, // == [ 00-00-2004 - GTP END ] // ================================================= \\ ); Code:
$_USEROPTIONS = array( 'showsignatures' => 1, 'showavatars' => 2, 'showimages' => 4, 'coppauser' => 8, 'adminemail' => 16, 'showvcard' => 32, 'dstauto' => 64, 'dstonoff' => 128, 'showemail' => 256, 'invisible' => 512, 'showreputation' => 1024, 'receivepm' => 2048, 'emailonpm' => 4096, 'txtmsgonpm' => 8192, 'hasaccessmask' => 16384, //'emailnotification' => 32768, // this value is now handled by the user.autosubscribe field 'postorder' => 65536, ); Anyone have a clue why the conflict is occurring; and more importantly how I could have both hacks working without the current conflict? |
#247
|
||||
|
||||
the bitfields above have nothing to do with each other ... your problem is elsewhere
|
#248
|
|||
|
|||
Quote:
Either hack works fine, when I remove the other hack. But installing both together, causes both to stop working. ~ Mark |
#249
|
||||
|
||||
take a look at the instructions and you will see that there are not the same thing ... I don't even know why you are looking at $_USEROPTIONS
|
#250
|
|||
|
|||
I don't think he is following instructions. He is doing a search for : 65536 and is placing the code right after that. all 65536 are not the same.
|
#251
|
|||
|
|||
Quote:
Regardless, I admit that my conclusions that line is the conflict MAY BE WRONG. So... any OTHER possible place to begin with in figuring out why your hack and the other hack conflict? ~ Mark |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|