Log in

View Full Version : Allowing images in sigs for certain usergroups? (detailed question about my code)


sblum
08-04-2004, 09:23 PM
This is how I'm trying to do it... in includes/functions_bbcodeparse.php

replacing this:
// parse non-forum item
case 'nonforum':
$dohtml = $vboptions['allowhtml'];
$dobbcode = $vboptions['allowbbcode'];
$dobbimagecode = $vboptions['allowbbimagecode'];
$dosmilies = $vboptions['allowsmilies'];
if ($allowsmilie != 1)
{
$dosmilies = $allowsmilie;
}
break;

with this:

// parse non-forum item
case 'nonforum':
$dohtml = $vboptions['allowhtml'];
$dobbcode = $vboptions['allowbbcode'];
if($post['usergroupid'] == 6)
{
$dobbimagecode = 1;
}
else {
$dobbimagecode = $vboptions['allowbbimagecode'];
}
$dosmilies = $vboptions['allowsmilies'];
if ($allowsmilie != 1)
{
$dosmilies = $allowsmilie;
}
break;

Now, I've isolated the problem being in that it doesn't know what "$post['usergroupid']" is, as it's not recalling the variable whatsoever. Is there a way to get around this or a different way to go about doing this as opposed to just having it apply universally?

sblum
08-05-2004, 02:48 PM
Anyone have any idea what I'm doing wrong here? I assume it's because it's just not feasable to call the $post variable from anywhere but the template, so I tried defining $dobbimagecode seperately for different users in the postbit template, but it won't let me define it...

AN-net
08-05-2004, 03:15 PM
i think you should find bbcode_parse2 function used for signatures, im unsure if its used before inserting it into the usertextfield table or if it is used everytime that user posts