PDA

View Full Version : Only Admin/Mod can have signature


Tok Muda
08-17-2002, 07:18 PM
ive looked everywhere on this board to find it and I cant
does anyone know where i can get a hack that only allow
admin/mod to use it.

thanks.. :nervous:

Xenon
08-17-2002, 11:37 PM
easiest way:

open admin/functions.php
find:
if ($post[showsignature] and $allowsignatures and trim($post[signature])!="" and ($bbuserinfo[userid]==0 or $bbuserinfo[showsignatures])) {
if (!isset($sigcache["$post[userid]"])) {
$post[signature]=bbcodeparse($post[signature],0,$allowsmilies);
eval("\$post[signature] = \"".gettemplate("postbit_signature")."\";");
$sigcache["$post[userid]"] = $post[signature];
} else {
$post[signature] = $sigcache["$post[userid]"];
}
} else {
$post[signature] = "";
}

and replace with this:
if (($post[usergroupid]==6 or $post[usergroupid]==5 or $post[usergroupid]==7) and $post[showsignature] and $allowsignatures and trim($post[signature])!="" and ($bbuserinfo[userid]==0 or $bbuserinfo[showsignatures])) {
if (!isset($sigcache["$post[userid]"])) {
$post[signature]=bbcodeparse($post[signature],0,$allowsmilies);
eval("\$post[signature] = \"".gettemplate("postbit_signature")."\";");
$sigcache["$post[userid]"] = $post[signature];
} else {
$post[signature] = $sigcache["$post[userid]"];
}
} else {
$post[signature] = "";
}

Tok Muda
08-18-2002, 12:14 AM
:) hey it works..:D thanks Xenon i have a few questions tho'

1.how about a feature in usergroup "Can use Signature - Yes No"
can this be done?

2.does this feature will be in VB3?

thanks...:)

Xenon
08-18-2002, 12:20 AM
1. yes, search through the requestforum, i have answered such a request in the last two weeks as i know ;)

2. perhaps, i think so.

Tok Muda
08-18-2002, 01:06 AM
sorry xenon, i cant find it. i searched the request & full release forum, would you help me? :rolleyes:

this maybe stupid.. again, i tried to change only admin can
use signature with the code above, but it gave me an error.
how about only admin can have signature? :cross-eyed:

Smoothie
08-18-2002, 02:04 AM
Its under the "Requests" Forum.

Xenon
08-18-2002, 01:10 PM
only admin you have to remove " or $post[usergroupid]==5 or $post[usergroupid]==7"


https://vborg.vbsupport.ru/showthread.php?s=&threadid=41411&highlight=Signature

Tok Muda
08-18-2002, 02:52 PM
i have removed the code above as you told me
but instead i got these error

Parse error: parse error, unexpected '{' in /home/bincang/public_html/forum/admin/functions.php on line 483

are there any different modifications Xenon?

*thanks for the link.. ;)

Xenon
08-20-2002, 08:48 PM
count all ( and ) perhaps you have accidently deleted one