MyBB Community Forums

Full Version: Creating an image with else/if or something?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to have an image on the forums somewhere.. Somewhere in the header file... The complicated thing is, i need it to only show to those in "Registered" usergroup and "unregistered"

Is this possible? How would i go about this?

Any help or suggestions are greatly appreciated Smile
Open global.php

Find
// Run global_start plugin hook now that the basics are set up
$plugins->run_hooks("global_start");

Add below
if($mybb->user['usergroup'] == 1 || $mybb->user['usergroup'] == 2)
{
$image = "<img src=\"SRC_URL\" />";
}

Change SRC_URL into the url of the image you want to use and add {$image} in the headertemplate where you want the image to appear.
You're awesome Lex, thanks so much Big Grin
Would it also be possible to add a link to the image?
I've figured it out lol, was really simple when i sat and thought about it lol Smile