MyBB Community Forums

Full Version: Show group specific message on starting page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to show a message only visible to users of a specific group (gid=2) right on my starting page (www.thatsmyforum.com/).
How can I do that or what´s the needed code?

Thank you!
Create a plugin and use the hook index_end. In your function then you can use if($mybb->user['usergroup'] == 2) { /* define a variable here then use it in your template, making sure you globalize it in the function. */}
(2016-11-03, 11:32 AM)OlDirty Wrote: [ -> ]I want to show a message only visible to users of a specific group (gid=2) right on my starting page (www.thatsmyforum.com/).
How can I do that or what´s the needed code?

Thank you!

Why don't you try this plugin: https://community.mybb.com/mods.php?action=view&pid=121
I managed to do it manually with:
<if $mybb->user['usergroup'] == 2 then>

But I will also look into your plugin. Seems to offer some more possibilities.
(2016-11-07, 07:29 PM)OlDirty Wrote: [ -> ]I managed to do it manually with:
<if $mybb->user['usergroup'] == 2 then>

But I will also look into your plugin. Seems to offer some more possibilities.

You can also write your mensage in header_welcomeblock_member_moderator templates of your theme