PDA

View Full Version : Wondering if this is possible?


c-pr0mpt
08-04-2001, 01:01 PM
<font face="courier new">What I want to do is make it so administrators can post HTML, but no one else. Is this possible? If its not, and it would take a hack to get this done please feel free to move it to the hacking forum. I just thought I would try here first. Thank you</font>

Wayne Luke
08-04-2001, 02:03 PM
Sure it is possible. I haven't tested this but it should work, I am going to implement this in my own forums as well.

Add this function to admin/functions.php:

// ###################### Start getadminpermissions ################################
function isadmin($userid=-1) {
global $bbuserinfo, $DB_site;

if ($userid == -1) {
$userid = $bbuserinfo['userid'];
}
$admin=getpermissions(0,$userid);
if ($admin['cancontrolpanel']) {
return 1;
} else {
return 0;
}
}


I put it directly above the ismoderator() function.

Then in the same file look for:

return bbcodeparse2($bbcode,$dohtml,$dobbimagecode,$dosmi lies,$dobbcode);


Above this put:

if (isadmin()) {
$dohtml = 1;
}


If you wanted to allow all moderators to post HTML you can do:

if (ismoderator()) {
$dohtml = 1;
}

c-pr0mpt
08-05-2001, 11:08 AM
Thank you very much. This is greatly appreciated! :)

cyrus
08-25-2001, 09:55 AM
WORKED GREAT

thank you !!!!!!!1

Lordmusic
08-30-2001, 08:30 AM
Is there any way to make it so supermods can post HTML, but other mods can't?

cyrus
08-30-2001, 04:46 PM
lol

u just HAVE TO go that one step further dont you

*nods left to right *

:)

Lordmusic
08-30-2001, 05:28 PM
Yes I do, it's my nature. But is it possible? Some mods are not smart enough to or even deserve having html use.