Welcome, Guest. Please Login or Register.
April 27, 2024, 12:24:29 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

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 7738 times)
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Done 1.5.1] Js Validate
« Reply #15 on: April 22, 2003, 12:09:32 AM »
Reply with quote

Quote from: oldiesmann on April 22, 2003, 12:06:03 AM
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");


UHHHHHHHH.... that won't work....

-[Unknown]
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[Done 1.5.1] Js Validate
« Reply #16 on: April 23, 2003, 03:39:37 PM »
Reply with quote

yeah, the character limit warning is cool too

it'd be nice to have a character counter under the textarea too, with the character limit next to it... that way you don't have to guess when it's too much
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[Done 1.5.1] Js Validate
« Reply #17 on: April 25, 2003, 01:19:20 AM »
Reply with quote

I just found a sweet way to count the characters... check out the form to submit a comment at the bottom of this page:

http://obiewebsite.sourceforge.net/o.php?opp=Tell_to_Friends

try typing something in the fields and look at the right of it

btw, the script is pretty sweet, nice way of promoting the site, I'll include it to my website's design under the nav menu hehe  ;)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Done 1.5.1] Js Validate
« Reply #18 on: April 25, 2003, 01:54:29 AM »
Reply with quote

It also is surprisingly laggy when I type into that box ::).

Notice that your signature keeps track of the characters left too...

-[Unknown]
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[Done 1.5.1] Js Validate
« Reply #19 on: April 25, 2003, 02:08:39 AM »
Reply with quote

hmmm... it isn't laggy for me, but it's not good if it is for some...

oh! the signature! I didn't put much attention to that counter before, but now I'm looking at it with new eyes hehehe... I'll see what can be done with that... thx for the hint ;)

(although I should first make that other thing work, remember the delete/modify buttons for the last messages of a member? lol  ;D)
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Webby
Beta Tester
YaBB God
*****
Posts: 829


Some mistakes are too funny to make only once.

ICQ - 9814812webby@salesplaza.nl WWW
Re:[Done 1.5.1] Js Validate
« Reply #20 on: April 25, 2003, 08:01:19 PM »
Reply with quote

I managed to get it to work with the quick-reply box (you have to be a member to see it) :

http://www.salesplaza.nl/forum/index.php?board=12;action=display;threadid=11814;start=0#lastPost

I added a partial screenshot.

I've put a piece in ubbc.js :

function vietbar(){
   if ((navigator.appName.indexOf("Microsoft") != -1) && (parseInt(navigator.appVersion) >= 4)) {
   document.write('<TABLE cellpadding="0" cellspacing="0" border="0" width="150"><TR><TD align="left" width="75" bgcolor="#EEEEEE" colspan="3">');
   document.write('<TABLE cellpadding="0" cellspacing="0" border="0" width="150">');
   document.write('<TR>');
   document.write('<TD bgcolor=red width="0"><Img src="YaBBImages/blanko.gif" name="u1" height="12" width="0"></TD>');
   document.write('<TD bgcolor=#F0F0F0 width="150"><Img src="YaBBImages/blanko.gif" name="u2" height="12" width="150"></TD>');
   document.write('</TR>');
   document.write('</TABLE>');
   document.write('</TD></TR></table>');
   }
   else document.write(' ');
}


function f1(a,num){
   x = num - a.value.length;
   if (x < 0) { a.value = a.value.substring(0,num); x = 0; }
   document.u1.width=150*(num-x)/num;
   document.u1.alt=num-x+" karakters reeds gebruikt";
   document.u2.width=150*x/num;
   document.u2.alt=x+" karakters nog te gebruiken";
}



function changeto(e,highlightcolor){
   return true;
}

function changeback(e,oldcolor2){
   return true;
}


And put this in the quickreply part in Display.php :

                <INPUT TYPE="RESET" VALUE="Wissen" ACCESSKEY="r">
            <br><br>Aantal karakters nog mogelijk : <script>vietbar();</script></FORM>
         </TD>
        </TR>


It is in dutch, but I guess you can figure out what it should be in english....
Logged

Webby of salesplaza.nl
The YaBBSE buttongenerator : Click HERE !
d3mia7
Noobie
*
Posts: 8


I'm a ferret!

Re:[Done 1.5.1] Js Validate
« Reply #21 on: May 18, 2003, 06:40:52 PM »
Reply with quote

How about a login box like this for when your session times out?  THAT would make my day...  Especially since there's nothing telling a user how much time they've got left in their session.
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:[Done 1.5.1] Js Validate
« Reply #22 on: May 18, 2003, 06:54:34 PM »
Reply with quote

that's a smart idea

I usually am at my computer and am "always logged-in" but sometimes, at a friend's, my session does time-out and I have to re-type everything  :(
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
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.046 seconds with 20 queries.