Topic: How i make the Announcement only show for a special usergroup!
Yeah is it possible to make so the Announcement only be visible for a certain usergroup.
And is it easy to make a certain usergroup having a bold username.
THANKS!
You are not logged in. Please login or register.
PunBB Forums → Feature requests → How i make the Announcement only show for a special usergroup!
Yeah is it possible to make so the Announcement only be visible for a certain usergroup.
And is it easy to make a certain usergroup having a bold username.
THANKS!
There's no built-in support for that, but you could create your own PHP-script. Something like this:
if ($pun_user['g_id'] == 4) // Replace 4 with the id of the group in question
{
// output your announcement markup here
}
And put this script it in the include/user/ folder and then include it from your template via pun_include.
There's no built-in support for that, but you could create your own PHP-script. Something like this:
if ($pun_user['g_id'] == 4) // Replace 4 with the id of the group in question { // output your announcement markup here }
And put this script it in the include/user/ folder and then include it from your template via pun_include.
Well, I dont understand so much about what you said but i am going to try
Thanks rickard !:P
Wouldn't it be easier to just replace
if ($pun_config['o_announcement'] == '1')
in header.php with
if ($pun_config['o_announcement'] == '1' && $pun_user['g_id'] == 4)
(assuming he doesn't want to specify the group on a per-announcement basis)
I followed this approach but when I uploaded the modified files (main.php and the new one), nothing shows up on the index page, not even the forums.
So is this pun_include code correct?
<?php
if($pun_user['is_guest'])
{
<center><b>xyz</b></center>
}
?>
I dont know any php coding, so sorry if I sound like a rank noob.
No, that is not right. This should work though:
<?php
if($pun_user['is_guest'])
{
?>
<center><b>xyz</b></center>
<?php
}
?>
Thanks a lot
PunBB Forums → Feature requests → How i make the Announcement only show for a special usergroup!
Powered by PunBB, supported by Informer Technologies, Inc.