https://www.icyphoenix.com/viewtopic.php?f=35&t=5056
-----------------------------------
Informpro
Sat 22 Nov, 2008 08:27

Make BBCode Only For Admin
-----------------------------------
[cell class=forumline][cell class=row-header][size=12][b]Hi;[/b][/size][/cell][cell class=row1h][b][url=http://www.icyphoenix.com]I've DownLoad IcyPhenix[/b]
BBCodes are perfect but i want to know how to create restriction ? link of BBcode restrict to admin and mod(first for admin only, second for admin & mod).[/cell][cell class=row1h][b][url=http://www.icyphoenix.com/viewtopic.php?f=4&t=1604]Second Link[/b]
And here (restriction begin at "Testing Cell BBCode"(restricted) and finish just before images). and a new restriction for video and the last : Icy Phoenix Staff[/cell][cell class=row1h][b][url=http://www.icyphoenix.com/viewtopic.php?f=4&t=1758]First Link[/b]
[b][color=red]Here i want to restrict only to admin(I want only admin can use).[/color][/b][/cell][/cell]


-----------------------------------
Informpro
Tue 25 Nov, 2008 18:19

Re: Make BBCode Only For Admin
-----------------------------------
nobody's know ?
I think it's in the bbcode replace; i've to add a
[code=php]if($userlevel = ADMIN)
 {
  $replace = str_replace(); 
 }[/code] ?


-----------------------------------
Mighty Gorgon
Tue 02 Dec, 2008 10:14

Re: Make BBCode Only For Admin
-----------------------------------
You need to add this code for the tags you want to disallow (file is bbcode.php of course).

FIND
[codeblock]		if($tag === 'color')[/codeblock]

REPLACE WITH
[codeblock]		if(($tag === 'color') && ($userdata['user_level'] == ADMIN))[/codeblock]


-----------------------------------
DWho
Tue 02 Dec, 2008 10:46

Re: Make BBCode Only For Admin
-----------------------------------
Thanks MG that is something to use in the future (well for my site anyway)


-----------------------------------
Mighty Gorgon
Tue 02 Dec, 2008 10:57

Re: Make BBCode Only For Admin
-----------------------------------
I have just noticed that this edit won't work... this will only disallow users to view the BBCode, not to use them.

So please disregard my previous suggestion... :sad:

It is not easy to allow only admins to use some BBCodes... because we need an extra condition in viewtopic.

I will try to think to an alternate solution, but it is not easy.


-----------------------------------
DWho
Tue 02 Dec, 2008 11:05

Re: Make BBCode Only For Admin
-----------------------------------
No worries... at present the bbcodes are fine.. I was just thinking if someone started abusing some of the features you can turn them off for users...

but as I said no worries..

 :mryellow:  :mryellow:


