Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2003, 02:45 PM
DaveG DaveG is offline
 
Join Date: Apr 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default No PM character limit for admins?

I searched around but cannot find a hack like this. Any way to make a hack so that administrators aren't limited to a max character amount when sending PMs?

Thanks!
Reply With Quote
  #2  
Old 05-19-2003, 03:02 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

should be already so. At least it is in ver 2.2.6 and above..
Reply With Quote
  #3  
Old 05-19-2003, 03:11 PM
DaveG DaveG is offline
 
Join Date: Apr 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the response. I am currently running v2.2.7 and ran into this problem yesterday when sending a PM. The system informed me that I exceeded the 1000 character limit. Any suggestions?

Thanks!
Reply With Quote
  #4  
Old 05-19-2003, 03:27 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 11:02 AM Logician said this in Post #2
should be already so. At least it is in ver 2.2.6 and above..
Are you sure? I don't think it is standard. I have also run into this problem in the past.

BTW: Sinan, did you get my pm?
Reply With Quote
  #5  
Old 05-19-2003, 04:09 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok you guys caught a minor vb bug congratulations hehe..

private.php has this line:
PHP Code:
 if (strlen($message)>$pmmaxchars and $pmmaxchars!=and $bbuserinfo[usergroupid] != 6) {
    eval(
"standarderror(\"".gettemplate("error_pmtoolong")."\");");
  } 
which tells the vb to ignore "pmmaxchars" restriction if sender is an admin.

However you get this error because the javascript does not let you click submit if your post is too long. So either disable javascript, or apply this small fix:

find:
PHP Code:
 eval("dooutput(\"".gettemplate("priv_sendprivmsg")."\");"); 
before that add:
PHP Code:
if ($bbuserinfo['usergroupid']==6) {$pmmaxchars=1000000;} 
Not tested but should work

Quote:
BTW: Sinan, did you get my pm?
yeah and just replied. Sorry I was out of town in the weekend..
Reply With Quote
  #6  
Old 05-19-2003, 04:17 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not a good idea to overwrite an options variable. I suggest:
PHP Code:
if ($pmmaxchars != and $bbuserinfo['usergroupid'] == 6)
{
    
$maxcharsjs 0;
}
else
{
    
$maxcharsjs = &$pmmaxchars;

...then use $maxcharsjs in the template instead of $pmmaxchars.

edit: no offense, just my opinion
Reply With Quote
  #7  
Old 05-19-2003, 04:20 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this is a bug, then it probably does the same thing in the newthread, newreply and editpost, right? Same fix for that?
Reply With Quote
  #8  
Old 05-19-2003, 04:26 PM
DaveG DaveG is offline
 
Join Date: Apr 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Adding this text:
PHP Code:
if ($bbuserinfo['usergroupid']==6) {$pmmaxchars=1000000;} 
right before this text:
PHP Code:
eval("dooutput(\"".gettemplate("privmsg")."\");"); 
still causes me to get an JavaScript error box when I click SUBMIT if the text is over 1,000 characters.
Reply With Quote
  #9  
Old 05-19-2003, 04:35 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try putting it before this:

PHP Code:
  eval("dooutput(\"".gettemplate("priv_sendprivmsg")."\");"); 
Reply With Quote
  #10  
Old 05-19-2003, 04:37 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 12:17 PM filburt1 said this in Post #6
It's not a good idea to overwrite an options variable. I suggest:
PHP Code:
if ($pmmaxchars != and $bbuserinfo['usergroupid'] == 6)
{
    
$maxcharsjs 0;
}
else
{
    
$maxcharsjs = &$pmmaxchars;

...then use $maxcharsjs in the template instead of $pmmaxchars.

edit: no offense, just my opinion
Which templates do we put this in? I have 4 of them with it. Can they all be done? Or do we need to put the code in other places, too?
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:01 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.04677 seconds
  • Memory Usage 2,258KB
  • Queries Executed 13 (?)
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
  • (8)bbcode_php
  • (3)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
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete