vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Wondering if this is possible? (https://vborg.vbsupport.ru/showthread.php?t=24543)

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

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

  return bbcodeparse2($bbcode,$dohtml,$dobbimagecode,$dosmilies,$dobbcode); 

Above this put:
PHP Code:

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

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

  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.


All times are GMT. The time now is 04:59 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.01632 seconds
  • Memory Usage 1,725KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete