View Full Version : Admin Only HTML
Dark_Angel2
05-10-2003, 09:53 PM
Is there anyway (I think it needs a hack) to allow admins only to post HTML?
Thanks.
Boofo
05-10-2003, 10:01 PM
In admin/functions.php
Find:
====================
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
//highlight words for search engine
====================
Replace with
if ($post[usergroupid]==6 OR $post[usergroupid]==5) {
$post[message]=bbcodeparse2($post[pagetext],1,1,1,1);
} else {
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
}
//highlight words for search engine
===================
Just add more OR $post[usergroupid]==X to the IF statement for whatever usergroups you want to allow.
5 is Super Mod and 6 is Admin.
Dark_Angel2
05-10-2003, 10:03 PM
Wow! That was quick thanks! :banana:
Boofo
05-10-2003, 10:04 PM
We aim to please. ;)
Dean C
05-11-2003, 12:29 PM
Just a heads up to try and search before you ask as this has been done many times before :)
Thanks
- miSt
I realize this thread is from early May, but MiSt - I've been searching and haven't come up with much other than this thread alone. Thank you, Boofo for the quick fix, it works for version 2.3.0. However, it doesn't censor Private Messages. Er, un-censor html for admins in PM's. I imagine it'll be a similar step, but could you point me in the right way?
Boofo
06-10-2003, 03:43 PM
In private.php, find:
$message[message]=pmcodeparse($message[message],0,$allowsmilies);
$message[message] .= '<br>'.$message['attachment'] . $fromuserinfo[signature];
REPLACE it with:
if ($fromuserinfo[usergroupid]==6 OR $fromuserinfo[usergroupid]==5) {
$message[message]=pmcodeparse($message[message],1,1,1,1);
} else {
$message[message]=pmcodeparse($message[message],0,$allowsmilies);
}
$message[message] .= '<br>'.$message['attachment'] . $fromuserinfo[signature];
Try that and let me know if it works for you. I haven't tested it.
It doesn't give any errors, Bob, but it doesn't do the trick. :(
filburt1
06-10-2003, 04:21 PM
I'm fairly sure that this has long since been released...have ye searched?
I have, but apparently not with the right searchwords. :s I'll keep looking. I was sure it's been published several times before as well.
Boofo
06-12-2003, 04:49 AM
I've never seen it for pm's. It has been done for regular messages.
Come on, filburt, let's see you coding skills in action on this one. Should be a breeze for you. :p
DaveRobbo
06-25-2003, 09:23 AM
Also doesn't work for thread preview and thread review on the reply page :(
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.