TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 291
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 204
  • Total: 204

how do I limit shoutbox text entry?

Started by omapie, December 11, 2007, 03:53:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

omapie

OK. So I should eliminate the line:
       $shout=strip_tags(substr($_POST['tp-shout'],0,300),'<b><u><i>');

or am I just not seeing some character that I've missed in this code?
                global $func;
if($func['strlen']($_REQUEST['tp-shout']) > 200)
redirectexit($scripturl);



Congrats on the 500th post, Dragoon!  :up: ;D

Again, thank you!
Lori

Dragooon

LOL!
No no, Don't eliminate that line.
Just add that chunk of code before that line.

omapie

scared ya there, huh! LOL (sorry)

will try again now! ;)

omapie

#23
ah ha!
Okay. So if it's under 200, it posts.
If it's over, it kicks you back to the front page.

That's what it should do... right? (that's what the "redirectexit" means -- yes?)

Nifty!

And now I know how/where to change it to more characters if it turns out that amount is a problem! LOL

coool!
:)

I just love it when things work!

Dragooon

Yup thats what it should do.

Glad I could help and sorry for less descriptive answers.

omapie

No, that was and you ARE phenomenal, Dragoon! Fantastic! No need to apologize -- sorry I couldn't "get it" faster!

Thank you so much -- I really appreciate it! Now I'm just debating on if I should set it for a longer amount! LOL

Ah well. You're great! Thank you so much for your time & effort (& patience! LOL) in this!
;D

Hugs!

Lori

This website is proudly hosted on Crocweb Cloud Website Hosting.