Welcome, Guest. Please Login or Register.
March 29, 2024, 11:59:15 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

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


My $txt[228]

[Done 1.5.1] Js Validate
« on: April 18, 2003, 11: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, 08: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, 11: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


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Done 1.5.1] Js Validate
« Reply #2 on: April 19, 2003, 12:30:30 AM »
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?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.5.1] Js Validate
« Reply #3 on: April 19, 2003, 03:17:28 AM »
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


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Done 1.5.1] Js Validate
« Reply #4 on: April 19, 2003, 03:28:21 AM »
Reply with quote

Quote from: oldiesmann on April 19, 2003, 03:17:28 AM
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?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.5.1] Js Validate
« Reply #5 on: April 20, 2003, 02:52:32 AM »
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 20, 2003, 03:22:59 AM »
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 20, 2003, 03:23:57 AM 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, 06: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, 06: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, 08: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, 08: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!'

ICQ - 44729151 WWW
Re:[Done 1.5.1] Js Validate
« Reply #11 on: April 20, 2003, 11: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?

oldiesmann@oldiesmann.us WWW
Re:[Done 1.5.1] Js Validate
« Reply #12 on: April 21, 2003, 04:16:36 PM »
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, 07: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, 10:06:35 PM by bostasp » Logged

oldiesmann
YaBB God
*****
Posts: 577


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

oldiesmann@oldiesmann.us WWW
Re:[Done 1.5.1] Js Validate
« Reply #14 on: April 22, 2003, 12:06:03 AM »
Reply with quote

Just go into post.php and...

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


and replace it with
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  |  [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.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.031 seconds with 19 queries.