PDA

View Full Version : HTML just for admins?


Caspartheghost
02-11-2004, 04:51 PM
Is it possible to only allow HTML posting for admin or a specified group, or even one user?

What I really want is to give the admins the ability to insert a javascript into their/ my signatures :)

All admins are trusted, btw :)

Dark_Wizard
02-11-2004, 05:25 PM
All admins are trusted? Hmmm... :rolleyes: anyway just set it per usergroup in the usergroup manager....

Caspartheghost
02-11-2004, 07:24 PM
Where abouts, I don't see the option there?

Boofo
02-12-2004, 12:19 AM
If you add that ability, some tags in your php boxes will not show up right in the code. If you post any code on your board with those tags, I would advise not to turn that on. ;)

Michael Morris
08-01-2004, 03:48 PM
I need a similar setup for my vb CMPS pages. I start threads in the news forums but anyone on the board can post replies. How do I turn HTML on only for myself?

technicali taze
08-01-2004, 06:42 PM
Yes i too want this.

Dark Wizard there is no option regarding posting html, vb code, php, or the likes in the usergroup -- usergroup manager -- edit options

romeshomey
08-02-2004, 01:49 AM
Same here...

Andreas
08-02-2004, 02:12 AM
@Caspartheghost
This is how I did it (really baaaad code, but seems to work):

In functions_showthread.php FIND

$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);

REPLACE that with

if ($post['permissions']['adminpermissions'] & CANCONTROLPANEL) {
$allowhtml = $vboptions['allowhtml'];
$vboptions['allowhtml'] = true;
$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
$vboptions['allowhtml'] = $allowhtml;
} else {
$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
}


In member.php FIND

// signature
if ($userinfo['signature'])
{
require_once('./includes/functions_bbcodeparse.php');
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 0, 1);

REPLACE that with

// signature
if ($userinfo['signature'])
{
require_once('./includes/functions_bbcodeparse.php');
if ($userinfo['permissions']['adminpermissions'] & CANCONTROLPANEL) {
$allowhtml = $vboptions['allowhtml'];
$vboptions['allowhtml'] = true;
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 0, 1);
$vboptions['allowhtml'] = $allowhtml;
} else {
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 0, 1);
}

CarCdr
08-02-2004, 02:28 AM
KirbyDE,

I suspect thatif ($post['permissions']['adminpermissions'] & CANCONTROLPANEL)
is not right. Perhaps$permissions['adminpermissions'] & CANCONTROLPANEL)although I am not sure in showthread.php where it is set. (Too tired to check. :) )

In any case, this suggested mod will only allow CANCONTROLPANEL to view/run the HTML. I am not sure, but I think the request might be for admin's to be able to post and all to view/run.

Cheers

Andreas
08-02-2004, 02:51 AM
$permissions does give you the permissions for the current user, whereas $post['permissions'] contains the permissions for the user who made the post.

And this is exactly what was requested here: Check if the user who made the post has admin permissions and then parse his sig with HTML enabled.

technicali taze
08-02-2004, 04:17 AM
i would like not just the sig but the whole post parsed with HTML

plz ty

CarCdr
08-02-2004, 12:02 PM
Riiiight... from the retrieval. Sneaky. :)