Member only view list of thread but can't view thread
WINBOY Offline
Member
***
Posts: 71
Joined: Nov 2012
Post: #16
RE: Member only view list of thread but can't view thread
is below code is right for 1.8>=?

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
37
38
39
40
<?php
$plugins->add_hook('showthread_start', 'gcvt_thread');
$plugins->run_hooks("showthread_start");
$plugins->add_hook('archive_thread_start', 'gcvt_thread');
$plugins->run_hooks("archive_thread_start");


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',
	"compatibility" => "14*,16*,18*"
        'guid'        => '8ac34edb831b6a420c48602ed5384b59'
    );
}

function gcvt_activate()
{
}

function gcvt_deactivate()
{
}
function gcvt_thread()
{
    global $db, $mybb,$lang, $thread;

                    if($mybb->user['gid'] == '1,2,5' && in_array($thread['fid'], array(168))
                    {
                        error_no_permission();
                    }
                    
    $lang->send_thread = "";
}
?>


It give me Parse error: syntax error, unexpected '{' in C:xxx/xxx/xxx\inc\plugins\gcvt.php on line 33

01-26-2017 10:01 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Member only view list of thread but can't view thread - WINBOY - 01-26-2017 10:01 PM

 Standard Tools
Forum Jump: