vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   HTML just for admins? (https://vborg.vbsupport.ru/showthread.php?t=61441)

Caspartheghost 02-11-2004 04:51 PM

HTML just for admins?
 
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
PHP Code:

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

REPLACE that with
PHP Code:

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
PHP Code:

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

REPLACE that with
PHP Code:

// 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'], 01);
          
$vboptions['allowhtml'] = $allowhtml;
        } else {
          
$userinfo['signature'] = parse_bbcode($userinfo['signature'], 01);
        } 


CarCdr 08-02-2004 02:28 AM

KirbyDE,

I suspect that
Code:

if ($post['permissions']['adminpermissions'] & CANCONTROLPANEL)
is not right. Perhaps
Code:

$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.


All times are GMT. The time now is 03:33 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01032 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete