Go Back   Webmaster Forum > Development > Programming > JavaScript
REMOVE the ads below !
Reply
 
LinkBack Thread Tools
  # 1 (permalink)
Old
Junior Geek
Posts: 65
Join Date: Feb 2007
iTrader: (0)
[ZB] minimum characters required to post - 12-13-2007

Written for zetaboards
simply disables posting if the post does not have enough characters

Original Request: Board Message

Add anywhere under the board
Quote:
<script>
/*minimum characters per post
by godkillah from phantom-designs.net*/

var MinimumCharacters=15
var Message="Your post requires at least 15 characters"

if(location.href.match(/\/post\//i)){
document.forms.posting.onsubmit=function(){
characters=document.forms.posting.post.value.lengt h
if(characters<MinimumCharacters){
alert(Message)
return false
}else{
return true
}}}
</script>
edit what is red, should be pretty much selfexplaining,
enjoy
Reply With Quote
  # 2 (permalink)
Old
The Computer Addict !
Posts: 2,091
Join Date: Feb 2007
iTrader: (0)
Location: Bhopal (MP, India)
Re: [ZB] minimum characters required to post - 12-13-2007

Thanks for posting.

Btw, is this possible :
Quote:
var MinimumCharacters=15
var Message="Your post requires at least " + MinimumCharacters + " characters"
?

for people who are too lazy.

PS : i think this was suggested somewhere else too.
i don't remember where. lolz.

-Shadab.
Reply With Quote
  # 3 (permalink)
Old
Junior Geek
Posts: 65
Join Date: Feb 2007
iTrader: (0)
Re: [ZB] minimum characters required to post - 12-13-2007

maybe in my Invisionfree version of this code?
its basically except 2 words the same :P
Reply With Quote
Reply


Thread Tools



PSD to HTML

vBulletin®, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. | SEO by vBSEO | Skin developed by vBStyles.com