The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
I want to block guests from viewing individual topics. (e.g. A guest enters the forum home page, clicks on a forum, sees the topic titles, click on a topic title, and is then asked to log-in or register.)
I know that there is a similar option in the AdminCP that prevents guests from "viewing other's topics", but it makes each forum appear blank, as if there were no topics at all. Hopefully someone can help, as I believe this would be a hack that others would appreciate as well. |
#2
|
||||
|
||||
All done in your CNTRL panel
User Groups and Permissions Add | Modify Modify forums <-------HERE |
#3
|
||||
|
||||
Tweak, please read my post again.
Quote:
showthread.php is really the only thing I don't want guests to see... |
#4
|
||||
|
||||
Try this.
In your showthread.php, add the code in red Code:
error_reporting(7); if ( isset($goto) and ($goto=='lastpost' or $goto=='newpost')) { $noheader=1; } if ($bbuserinfo[userid]!=0) { Code:
getforumrules($forum,$getperms); eval("dooutput(\"".gettemplate("showthread")."\");"); } else { show_nopermission(); } |
#5
|
||||
|
||||
Thanks FireFly, but it didn't work. Showthread.php only returned this error:
Quote:
|
#6
|
||||
|
||||
Oh right, global.php was yet to be included. I'll work something out and post it here.
|
#7
|
||||
|
||||
Sounds great, thanks!
|
#8
|
||||
|
||||
Undo all changes.
Add the code in red in all 4 places. Code:
include('./global.php'); if ($bbuserinfo[userid]!=0) { if (isset($postid) and $postid!=0 and $postid!="") { $postid = verifyid("post",$postid); $getthread=$DB_site->query_first("SELECT threadid FROM post WHERE postid='$postid'"); $threadid=$getthread[threadid]; } Code:
eval("dooutput(\"".gettemplate("showpost")."\");"); exit; } else { show_nopermission(); } Code:
require('./global.php'); if ($bbuserinfo[userid]!=0) { // oldest first or newest first if ($postorder==0) { $postorder=""; } else { $postorder="DESC"; } Code:
getforumrules($forum,$getperms); eval("dooutput(\"".gettemplate("showthread")."\");"); } else { show_nopermission(); } |
#9
|
||||
|
||||
Uh-oh, now I'm getting a new error:
Quote:
|
#10
|
||||
|
||||
You dropped one } right before that ### block that says showthread.
(also remove that file) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|