Member only view list of thread but can't view thread
lenkbreak Offline
Junior Member
**
Posts: 23
Joined: Apr 2012
Post: #1
Member only view list of thread but can't view thread
Hi all
Thanks for RateU and others who supported me in my last thread. Yipi

I need some help from u guys..
let me explain about the situation first.

in example, I have a forum with 4 usergroups beside admin, mod, supmod, awaiting activation and banned. let see those groups are A, B, C and D.
when somebody register on my forum, they will automatically in A group and after certain of post, they will promote to B, C, and D.

for some reason, I have to make a private subforum and I set only member on B, C and D group can view and post like normal forum.

my problem is, I can set A group permissions so they only can see the specify forum not thread within the specify forum in Admin CP of mybb, but what I want is they can see the list of threads within specify forum, but they can't view it or when they click it, they will see error page or rules page or something like that.

is possible to do this?

I found plugin called guest can't view thread
can I use the codes with some modifications for my purpose?

code is like this

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?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 = "";
}
?>

(This post was last modified: 06-05-2012 04:21 PM by lenkbreak.)
06-05-2012 04:11 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Member only view list of thread but can't view thread - lenkbreak - 06-05-2012 04:11 PM

 Standard Tools
Forum Jump: