The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||||
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 |
#82
|
||||
|
||||
![]() Quote:
[USE AT OWN RISK - NOT TESTED ] PHP Code:
PHP Code:
I just took some code from /admincp |
#83
|
|||
|
|||
![]()
good hack. thanks
|
#84
|
|||
|
|||
![]() Quote:
|
#85
|
||||
|
||||
![]()
I'm glad you got it to work.
![]() The comments exist to
|
#86
|
|||
|
|||
![]()
I didn't mean the comments, I meant the comma...in the wrong place
![]() |
#87
|
||||
|
||||
![]()
Working on 3.0.3. It's a great hack. Clicks install.
Thanks |
#88
|
||||
|
||||
![]()
Will this prevent spidering ?
|
#89
|
||||
|
||||
![]()
Yes, It will prevent spidering of the contents of showthread.php.
It's part of the permission-based system so whoever you give "permission" to VIEW will have access to read contents. |
#90
|
|||
|
|||
![]()
I am still using 3.01. I installed, tested and it is working. There was a small discrepancy.
it says in usergroup.php to look for: 'canusesignature' => 1, 'cannegativerep' => 1, 'canuserep' => 1, in my copy I am missing the last two above line and have 'canmodifyprofile' => 1, 'canthreadrate' => 1, 'canpostattachment' => 1, 'canpostpoll' => 1, 'canvote' => 1, 'canwhosonline' => 1, 'allowhidden' => 1, 'showeditedby' => 1, canseeprofilepic' => 1, 'canusesignature' => 1, so I placed the line below right after and it works. // ================================================= \\ // == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ] 'gtpcanreadcontent' => 1 // == [ 00-00-2004 - GTP END ] // ================================================= \\ Now I tried to install the vbookie hack which instructs to place like below (which is the same as in my version) 'canmodifyprofile' => 1, 'canthreadrate' => 1, 'canpostattachment' => 1, 'canpostpoll' => 1, 'canvote' => 1, 'canwhosonline' => 1, // +++ vBookie 'canpostvbookieevent' => 1, 'caneditothersvbookieevents' => 1, 'canbet' => 1, // --- vBookie so the whole thing looks like that // set default yes permissions (bitfields) $ug_bitfield = array( 'showgroup' => 1, 'canview' => 1, 'canviewmembers' => 1, 'canviewothers' => 1, 'cagetattachment' => 1, 'cansearch' => 1, 'canmodifyprofile' => 1, 'canthreadrate' => 1, 'canpostattachment' => 1, 'canpostpoll' => 1, 'canvote' => 1, 'canwhosonline' => 1, // +++ vBookie 'canpostvbookieevent' => 1, 'caneditothersvbookieevents' => 1, 'canbet' => 1, // --- vBookie 'allowhidden' => 1, 'showeditedby' => 1, 'canseeprofilepic' => 1, 'canusesignature' => 1, // ================================================= \\ // == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ] 'gtpcanreadcontent' => 1 // == [ 00-00-2004 - GTP END ] // ================================================= \\ ); After I did, the two hacks started to interfere with each other, not responding to the selected radio buttons, disabling each other randomly. Please, do you have the version 3.01 for usergroup.php? I also posted the complete line in vbookie forum. https://vborg.vbsupport.ru/showthrea...044#post556044 Help! |
#91
|
|||
|
|||
![]()
Looks like I got it. It was a matter of both using the same bitfield. I simply doubled the Allowed Hack bitfield. At least the permissions are holding.
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|