vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   exempt admin/mods from max characters in posts? (https://vborg.vbsupport.ru/showthread.php?t=50727)

drives fast 03-23-2003 07:51 PM

exempt admin/mods from max characters in posts?
 
well...after much searching I haven't been able to find this

I have some team members that make very large posts with important information so I have to have my max characters at like 30,000

how would one be able to set that lower and make admin and mods exempt from that?

vb version 2.2.x

thanks for your help in advance

amykhar 03-23-2003 08:11 PM

1 Attachment(s)
I believe this will do it for you. You might have to tinker a bit and I haven't tested it.

drives fast 03-23-2003 08:28 PM

yea...I had already tried that but it didn't work

I am thinking it needs to look something like

PHP Code:

if (strlen($message)>$postmaxchars and $postmaxchars!=and ($bbuserinfo[usergroupid]!=6) or ($bbuserinfo[usergroupid]!=5) or ($bbuserinfo[usergroupid]!=7)) {
    eval(
"do what it is supposed to do")."\");");
}else{
    eval(
"standarderror(\"".gettemplate("error_toolong")."\");");
  } 

granted I don't know what it is supposed to do and I am spit at php....lol

drives fast 03-23-2003 10:38 PM

any other ideas?

I thank you for your help

Boofo 03-23-2003 10:49 PM

PHP Code:

if (strlen($message)>$postmaxchars and $postmaxchars!=and !in_array($bbuserinfo[usergroupid], array(567))) {
    eval(
"do what it is supposed to do")."\");");
}else{
    eval(
"standarderror(\"".gettemplate("error_toolong")."\");");
  } 


drives fast 03-23-2003 10:51 PM

thank you but is this gonna work?
Quote:

eval("do what it is supposed to do")."\");");
I just threw that in there cuz I didn't know what was supposed to go there

Boofo 03-23-2003 11:09 PM

Just use what amy has in her file but change the first line to what I have.

drives fast 03-23-2003 11:19 PM

okay...this is what I have in those two files now:
Quote:

if (strlen($message)>$postmaxchars and $postmaxchars!=0 and !in_array($bbuserinfo[usergroupid], array(5, 6, 7))) {
eval("standarderror(\"".gettemplate("error_toolong ")."\");");
}
but it still limits admin and mods

does it need the }else{ before the eval?

we'll sneak up on this booger yet :)

amykhar 03-23-2003 11:23 PM

I just realized the problem with my code. The "Or"s need to be "And"s.

Amy

drives fast 03-24-2003 01:09 AM

I tried it with "and" in place of the "or" and still doesn't allow team members to by-pass the limit

just a recap on what has been tried:

first tried this:
Quote:

if (strlen($message)>$postmaxchars and $postmaxchars!=0 and ($bbuserinfo[usergroupid]!=6) or ($bbuserinfo[usergroupid]!=5) or ($bbuserinfo[usergroupid]!=7)) {
eval("standarderror(\"".gettemplate("error_toolong ")."\");");
}
then tried this:
Quote:

if (strlen($message)>$postmaxchars and $postmaxchars!=0 and !in_array($bbuserinfo[usergroupid], array(5, 6, 7))) {
eval("standarderror(\"".gettemplate("error_toolong ")."\");");
}
then tried this:
Quote:

if (strlen($message)>$postmaxchars and $postmaxchars!=0 and ($bbuserinfo[usergroupid]!=6) and ($bbuserinfo[usergroupid]!=5) and ($bbuserinfo[usergroupid]!=7)) {
eval("standarderror(\"".gettemplate("error_toolong ")."\");");
}
with no results.

any other ideas?


All times are GMT. The time now is 01: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.01167 seconds
  • Memory Usage 1,745KB
  • 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_php_printable
  • (5)bbcode_quote_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