2011-07-05, 04:28 AM
<?php
$plugins->add_hook('showthread_start', 'gcvt_thread');
$plugins->add_hook('archive_thread_start', 'gcvt_thread');
function gcvt_info()
{
return array(
'name' => 'Guests Can\'t View Threads',
'description' => 'Guests cannot view threads.',
'website' => 'http://mybbplug.in/',
'author' => 'Jammerx2',
'authorsite' => 'http://mybbplug.in/',
'version' => '1.1',
'guid' => '8ac34edb831b6a420c48602ed5384b59'
);
}
function gcvt_activate()
{
}
function gcvt_deactivate()
{
}
function gcvt_thread()
{
global $db, $mybb,$lang, $thread;
if($mybb->user['uid'] == 0)
{
error("I'm afraid I cannot let you view that! Guest thread viewing is disabled, but why not sign up and join-in on the fun? We're not that scary, are we?","Error");
}
$lang->send_thread = "";
}
?>
http://mybbplug.in/s/thread-guests-can-t-view-threads-1-1I'm currently using Jammerx2's "Guests Can't View Threads" script on my forum and I was wondering if anyone would mind adding a few simple functions for me.
I'd like to make it so that un-activated users (group ID 5) get a different message when they try to view threads and also make it so that posts in forum IDs 11, 28 and 29 are exempt from the effects of the script.
Could anyone give me a hand please? I'm not sure how hard this is to do