Page Index Toggle Pages: 1
Topic Tools
PM Subject Length (Read 2,508 times)
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,080
Location: Earth

YaBB 2.6.0
Re: PM Subject Length
Reply #9 - Nov 6th, 2012 at 9:31pm
Post Tools
This Topic was moved here from YaBB 2 - Bugs [Need Verification] [move by] Dandello.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,080
Location: Earth

YaBB 2.6.0
Re: PM Subject Length
Reply #8 - Aug 27th, 2012 at 2:38am
Post Tools
I agree - errors make more sense and that's usually YaBB's default behavior anyway.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
xnoddyx
Support Team
Documentation Team
YaBB Moderators
YaBB Next Team
Beta Testers
****
Offline



Posts: 1,584
Location: UK:Scotland/livingston

None
Re: PM Subject Length
Reply #7 - Aug 27th, 2012 at 2:37am
Post Tools
Derek Barnstorm wrote on Aug 27th, 2012 at 2:09am:
I think I prefer the error myself - it might make more sense.

i like this more sense and more visible but that's just my preferences  Grin
  

YaBB install help video
1. what yabb forum are you running and the url
2. describe in as much detail as you can what happens and also post screenshots if you can
3. please be patient we live in different time zones and have other commitments but we will help you
as bill and ted say (Be excellent to each other)
Back to top
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: PM Subject Length
Reply #6 - Aug 27th, 2012 at 2:09am
Post Tools
Derek Barnstorm wrote on Aug 27th, 2012 at 12:42am:
Dandello wrote on Aug 27th, 2012 at 12:38am:
Which would be less confusing for the average admin? Throwing an error would make it obvious, but the automatic limits are kind of implied by the wording.

Okay - I'll post up both methods when I get chance then, and you can see which one you prefer...

Okay, for the error, in Admin/Settings_Main.pl find:

Code (Perl)
Select All
    $settings{'pwstrengthmeter_common'} =~ s/'//g; 


And add after:

Code (Perl)
Select All
    if (($settings{'set_subjectMaxLength'} < 10 && $settings{'set_subjectMaxLength'} != 0) || $settings{'set_subjectMaxLength'} > 255) { &admin_fatal_error("invalid_value", "set_subjectMaxLength ($admin_txt{'498a'})"); } 


Or to change the value add this instead:

Code (Perl)
Select All
    if ($settings{'set_subjectMaxLength'} < 10 && $settings{'set_subjectMaxLength'} != 0) { $settings{'set_subjectMaxLength'} = 10; }
    elsif ($settings{'set_subjectMaxLength'} > 255 ) { $settings{'set_subjectMaxLength'} = 255; } 


I think I prefer the error myself - it might make more sense.
  
Back to top
 
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: PM Subject Length
Reply #5 - Aug 27th, 2012 at 12:56am
Post Tools
Yep. That's what the fix does. If you set it to zero now, then it doesn't default to 50, so there is no limit on characters.

That's what this line fixes:

Code (Perl)
Select All
$set_subjectMaxLength ||= 50; 

  
Back to top
 
IP Logged
 
xnoddyx
Support Team
Documentation Team
YaBB Moderators
YaBB Next Team
Beta Testers
****
Offline



Posts: 1,584
Location: UK:Scotland/livingston

None
Re: PM Subject Length
Reply #4 - Aug 27th, 2012 at 12:49am
Post Tools
Derek Barnstorm wrote on Aug 27th, 2012 at 12:42am:
xnoddyx wrote Today at 1:28am:i always thought that the Characters in the PMs Subject was locked to 50 to stop a text overflow on the text container ?. Nope, they're not locked at 50 - it works from the same variable as the post subject.

ah ok's for the edit can we keep the default to 50-60 Characters?
  

YaBB install help video
1. what yabb forum are you running and the url
2. describe in as much detail as you can what happens and also post screenshots if you can
3. please be patient we live in different time zones and have other commitments but we will help you
as bill and ted say (Be excellent to each other)
Back to top
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: PM Subject Length
Reply #3 - Aug 27th, 2012 at 12:42am
Post Tools
xnoddyx wrote on Aug 27th, 2012 at 12:28am:
i always thought that the Characters in the PMs Subject was locked to 50 to stop a text overflow on the text container ?.

Nope, they're not locked at 50 - they work from the same variable as the post subject.

Dandello wrote on Aug 27th, 2012 at 12:38am:
Which would be less confusing for the average admin? Throwing an error would make it obvious, but the automatic limits are kind of implied by the wording.

Okay - I'll post up both methods when I get chance then, and you can see which one you prefer...
« Last Edit: Aug 27th, 2012 at 2:03am by Derek Barnstorm »  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,080
Location: Earth

YaBB 2.6.0
Re: PM Subject Length
Reply #2 - Aug 27th, 2012 at 12:38am
Post Tools
Which would be less confusing for the average admin? Throwing an error would make it obvious, but the automatic limits are kind of implied by the wording.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
xnoddyx
Support Team
Documentation Team
YaBB Moderators
YaBB Next Team
Beta Testers
****
Offline



Posts: 1,584
Location: UK:Scotland/livingston

None
Re: PM Subject Length
Reply #1 - Aug 27th, 2012 at 12:28am
Post Tools
Derek Barnstorm wrote on Aug 27th, 2012 at 12:12am:
"0 = default(50)" for the "Maximum Allowed Characters in Post Subject" doesn't work For PMs:

i always thought that the Characters in the PMs Subject was locked to 50 to stop a text overflow on the text container ?.
  

YaBB install help video
1. what yabb forum are you running and the url
2. describe in as much detail as you can what happens and also post screenshots if you can
3. please be patient we live in different time zones and have other commitments but we will help you
as bill and ted say (Be excellent to each other)
Back to top
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
PM Subject Length
Aug 27th, 2012 at 12:12am
Post Tools
Regarding this post:

http://www.yabbforum.com/community/YaBB.pl?num=1345733397/13#13

"0 = default(50)" for the "Maximum Allowed Characters in Post Subject" doesn't work For PMs:

In Sources/InstantMessage.pl find:

Code (Perl)
Select All
if ($action eq 'detailedversion') { return 1; } 


And add after:

Code (Perl)
Select All
$set_subjectMaxLength ||= 50; 


And seeing as PMs work from the same setting, the language description should be changed too.

In Languages/English/Admin.lng find:

Code (Perl)
Select All
'498a' => 'Maximum Allowed Characters in Post Subject<br /> (0 = default(50) / min 10 / max 255)', 


And change to:

Code (Perl)
Select All
'498a' => 'Maximum Allowed Characters in Post and PM Subject<br /> (0 = default(50) / min 10 / max 255)', 


Also, the "min 10 / max 255" doesn't seem to actually do anything at all. I think the subject length setting was added in 2.2, and by the looks of it the min/max has never worked.

On the admin side, I guess you could do it two ways - either throw an error when it tries to save the settings if the value is less that 10 or more than 255, or automatically set the value to 10 if it is less than 10 and 255 if it is more than 255. Which method do you prefer?
« Last Edit: Aug 27th, 2012 at 12:14am by Derek Barnstorm »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top