Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2003, 07:51 PM
drives fast's Avatar
drives fast drives fast is offline
 
Join Date: Nov 2001
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 03-23-2003, 08:11 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe this will do it for you. You might have to tinker a bit and I haven't tested it.
Attached Files
File Type: txt maxchars.txt (827 Bytes, 20 views)
Reply With Quote
  #3  
Old 03-23-2003, 08:28 PM
drives fast's Avatar
drives fast drives fast is offline
 
Join Date: Nov 2001
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 03-23-2003, 10:38 PM
drives fast's Avatar
drives fast drives fast is offline
 
Join Date: Nov 2001
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any other ideas?

I thank you for your help
Reply With Quote
  #5  
Old 03-23-2003, 10:49 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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")."\");");
  } 
Reply With Quote
  #6  
Old 03-23-2003, 10:51 PM
drives fast's Avatar
drives fast drives fast is offline
 
Join Date: Nov 2001
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 03-23-2003, 11:09 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just use what amy has in her file but change the first line to what I have.
Reply With Quote
  #8  
Old 03-23-2003, 11:19 PM
drives fast's Avatar
drives fast drives fast is offline
 
Join Date: Nov 2001
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 03-23-2003, 11:23 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Amy
Reply With Quote
  #10  
Old 03-24-2003, 01:09 AM
drives fast's Avatar
drives fast drives fast is offline
 
Join Date: Nov 2001
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04847 seconds
  • Memory Usage 2,281KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete