MyBB Central

Full Version: HELP Trying To Create A Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to make a plugin, that puts a linkable image onto a page, that only certain usergroups can see.

I have {$link} in the template.
I dont know what to put into the plugin to replace the {$link} with a actual link. Ive tried,

PHP Code:
function link(){
if(!
in_array($mybb->user['usergroup'], array('3','4',)))
{
        
$link "";
}else{
    
$link "www.link.com";



Anyone know what to do? Please help!
First of all, what are you trying to do really?
Try this:
PHP Code:
function link(){
    if(!
in_array($mybb->user['usergroup'], array('3','4',))){
        eval(
"\$link = \"\";");
    }else{
        eval(
"\$link = \"www.link.com\";");
    }