Welcome, Guest. Please Login or Register.
September 19, 2021, 11:07:48 PM
Home Help Search Login Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  Topic: [Done 1.5.1] Js Validate « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: [Done 1.5.1] Js Validate  (Read 6607 times)
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]


[Done 1.5.1] Js Validate
« on: April 18, 2003, 06:04:16 PM »
Reply with quote

ID: Javascript Validate (Post, Password, IM)

Version: 1.0

Mod Info:
This mod adds a javascript validator (pop-up warning msg) for:
• Profile.php: if a user has not typed his/her old password
• Post.php: if a user has not typed the subject or message field
• InstantMessage.php: if a user has not typed the subject, message or recipient field
• ModifyMessage.php: if a user has not typed the subject or message field

Download:
BoardMod file
• YaBBPak: http://www.monkey-pirate.com/php/ysepak (not yet)

This mod is included in 1.5.2 release.
« Last Edit: January 26, 2004, 03:13:59 PM by Spaceman-Spiff » Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]


Re:[Done 1.5.1] Js Validate
« Reply #1 on: April 18, 2003, 06:05:38 PM »
Reply with quote

if you have other suggestions for some other annoying fatal_error messages, feel free to post...
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830



WWW
Re:[Done 1.5.1] Js Validate
« Reply #2 on: April 18, 2003, 07:30:30 PM »
Reply with quote

I'm gonna listen in on those suggestions myself ;).

I'll give you the only one I did and you didn't - LogInOut.php.

-[Unknown]
Logged
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?


WWW
Re:[Done 1.5.1] Js Validate
« Reply #3 on: April 18, 2003, 10:17:28 PM »
Reply with quote

Ah. Another useful mod that should be implemented in the next release (hint hint).
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830



WWW
Re:[Done 1.5.1] Js Validate
« Reply #4 on: April 18, 2003, 10:28:21 PM »
Reply with quote

Ah. Another useful mod that should be implemented in the next release (hint hint).

Well, the next release should be Trinity... and I'll kill anyone who stops me from making it part of that >:D.  (whether by a reload of the page - like my secret project - or javascript - like this does...)

-[Unknown]
Logged
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?


WWW
Re:[Done 1.5.1] Js Validate
« Reply #5 on: April 19, 2003, 09:52:32 PM »
Reply with quote

Yeah... It's annoying to view the error log and see messages about "guest" getting errors saying they have to be logged in to post or something...
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.


WWW
Re:[Done 1.5.1] Js Validate
« Reply #6 on: April 19, 2003, 10:22:59 PM »
Reply with quote

Maybe alter the error handleing function so that it has an extra argument that can be used to determine whether to log this specific error.

Such as this:
function fatal_error($e, $t = null, $log_error = true)
{

Then add an if, if $log_error is true log the error, but if the user adds false the fatal_error call, it would still print the error but not log it to the error table...
« Last Edit: April 19, 2003, 10:23:57 PM by Chris Cromer » Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Coyote
YaBB God
*****
Posts: 702


I love YaBB SE!


Re:[Done 1.5.1] Js Validate
« Reply #7 on: April 20, 2003, 01:47:46 AM »
Reply with quote

Your sites down Spiff :(

Cant wait to get my hands on that Mod : ;D
Logged

To the world - you are just one person, but to one person you are the world!
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]


Re:[Done 1.5.1] Js Validate
« Reply #8 on: April 20, 2003, 01:59:06 AM »
Reply with quote

alternate site: www.immortalshades.com/spaceman/mods
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Coyote
YaBB God
*****
Posts: 702


I love YaBB SE!


Re:[Done 1.5.1] Js Validate
« Reply #9 on: April 20, 2003, 03:28:08 AM »
Reply with quote

Thanks, it works great :D

Doesnt work if you have the AdvIM mod installed - but I just ripped that part out of the mod file ;)

Thanks Spiff
Logged

To the world - you are just one person, but to one person you are the world!
jack-uk
Full Member
***
Posts: 118


I'm a llamatron addict


Re:[Done 1.5.1] Js Validate
« Reply #10 on: April 20, 2003, 03:39:03 AM »
Reply with quote

Fantastic .. no more complaints from irate users who have just lost a big post cos they forgot the subject field.

You are my saviour! ;D
Logged

Horseman
YaBB God
*****
Posts: 784


'MAS VALE CABALLO QUE CAUDAL!'


WWW
Re:[Done 1.5.1] Js Validate
« Reply #11 on: April 20, 2003, 06:50:49 AM »
Reply with quote

here is the german translation:

$txt['jsvalidate1'] = 'Das Themenfeld oder das Mitteilungsfeld wurde nicht ausgefüllt. Dies ist erforderlich.';
$txt['jsvalidate2'] = 'Das Themenfeld, das Mitteilungsfeld, oder das Empfängerfeld wurde nicht ausgefüllt. Dies ist erforderlich.';
Logged
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?


WWW
Re:[Done 1.5.1] Js Validate
« Reply #12 on: April 21, 2003, 11:16:36 AM »
Reply with quote

Chris, you've got a good idea, but this way is much less complicated. The thing is, if you do it that way, you'd pretty much have to keep updating the error log every time you found another error that you didn't want to log...
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
bostasp
Jr. Member
**
Posts: 62



WWW
Re:[Done 1.5.1] Js Validate
« Reply #13 on: April 21, 2003, 02:47:57 PM »
Reply with quote

No more filling out long posts and losing it all because you forgot something! You do not realise how long my members have moaned about that...  ;D

What about if you have excceded the character limit? Is it possible for a JS dialog for that?
« Last Edit: April 21, 2003, 05:06:35 PM by bostasp » Logged

oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?


WWW
Re:[Done 1.5.1] Js Validate
« Reply #14 on: April 21, 2003, 07:06:03 PM »
Reply with quote

Just go into post.php and...

Search for
Code: [Select]
if(strlen($message) > $MaxMessageLen)
    fatal_error($txt[499]);

and replace it with
Code: [Select]
if(strlen($message) > $MaxMessageLen)
    javascript:alert("alert text");
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  Topic: [Done 1.5.1] Js Validate « previous next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.0.18 | SMF © 2021, Simple Machines
Valid XHTML 1.0! Valid CSS!
Page created in 0.256 seconds with 19 queries.