2013-07-03, 08:21 PM
I have the GCVT plug in on my forum - http://www.phoenixsupras.net
I want un-registered people to be able to see the forum sections - which they can.
And the threads - which they can.
I don't want them to see the posts in the threads - which they can not.
I do have a one area of the forum that I do want them to be able to see inside the threads. How can I achieve this??
This is the code for the plug in below.
I want un-registered people to be able to see the forum sections - which they can.
And the threads - which they can.
I don't want them to see the posts in the threads - which they can not.
I do have a one area of the forum that I do want them to be able to see inside the threads. How can I achieve this??
This is the code for the plug in below.
<?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("<center>You must be logged into the forum in order to view the thread.<br /><br /><a href='member.php?action=register'>Register</a> or <a href='/member.php?action=login'>Log in</a></center> ","Error");
}
$lang->send_thread = "";
}
?>