View Thread
My Stuff » Incident/Change Management » Site Notes
 Print Thread
BBcode post restriction by group
With a little, okay, a lot, of help from a more experienced person on the phpfusionmods support site, I modded the members only bbcode add-on that I found on the mods site. I also combined some of the code from san admin only add-on that hides text from non-admins. I edited it to restrict posts/text to specific groups.

I did this by changing the code to:
Download source  Code

if (!defined("IN_FUSION")) { die("Access Denied"); }
if (!checkgroup("1")) {
$text = preg_replace('#\[adult\](.*?)\[/adult\]#si', '<div class=\'admin-message\' style=\'width:70%; height:24px;\' align=\'left\'><img src=\''.INCLUDES.'bbcodes/images/adult.png\' align=\'left\'> '.$locale['bb_adult_message'].'</div>', $text);
} else {
$text = preg_replace('#\[adult\](.*?)\[/adult\]#si', '<div class=\'quote\'><strong>'.$locale['bb_adult'].'</strong><br /><span style=\'color:black;font-weight:bold\'>\1</span></div>', $text);


The !checkgroup checks the group number for the correct group to restrict to. So in my situation and for my purposes, I made one add-on for each group in which I want the capability to hide.

Samples of a few groups I made the add-on for.
Royce attached the following file:
You are not allowed to see attachments in this thread.

Edited by Royce on 05/13/2016 07:00
Share This Post:
Delicious Facebook Google Live Reddit StumbleUpon Yahoo

Share This Thread
Social Sharing: Delicious Facebook Google Live Reddit StumbleUpon Yahoo
Facebook Like:

Jump to Forum:


Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Last seen
Last Seen Admins
[SA] Royce 20:08:51

Last Seen Users
[U] ronnieboy 2 Days
[U] ChadM 3 Days
[U] NormaJean 5 Days
[U] Matt 1 Week
[U] Nick 2 Weeks

» Show More Users «

[U] MelindaRose 3 Weeks
[U] TomG 3 Weeks
[U] jofey04 3 Weeks
[U] Sirena 6 Weeks
[U] Ksantos670 8 Weeks
[U] Nette 9 Weeks
[U] jfcruz 9 Weeks
[U] JDaniels 9 Weeks
[U] joe 10 Weeks
[U] ssiruma24 10 Weeks

You must login to post a message.

03/18/2017 04:23
hafa adai

03/14/2017 03:31
Sirena, it's a joke. Ask Royce. Or post with the [adult] and [/adult] restriction so it's not open. Adult joke... Smile

03/14/2017 03:30
can listen to it but cannot download it

03/13/2017 09:34
how do we download the music

03/11/2017 18:38
is the joke on me, what long answer is that Ron

03/11/2017 06:53
long answer is: welcome to jamaica have a nice day! Pfft

03/10/2017 22:38
what is the long answer? LOL

01/15/2017 00:39
short answer is yes

01/14/2017 11:23
anything new on the hidden side

01/09/2017 00:09
We're all "late" these days!!! Grin

808 State
Photos of Hawaii
Honor Panel
random pics
Top Top  1,312,706 unique visits  Top Top