We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Minimum characters required to post; By Godkillah
Topic Started: Feb 3 2010, 11:38 PM (2,401 Views)
Reid
Member Avatar
È una trappola!

This topic has been moved from our official support board.

Originally posted by: Will
Minimum characters required to post
 
This code has been moved here from our old support forum (as it will soon no longer exist at it's current location).
Please use the report button on this post to notify our staff of any problem with this modification.


Originally posted by: Godkillah
minimum characters required to post
 
simply disables posting if the post does not have enough characters

Original Request: http://phantom-designs.net/index.php?showtopic=11573

Add anywhere under the board
Quote:
 
<script type="text/javascript">
//<![CDATA[
/*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.length
if(characters<MinimumCharacters){
alert(Message)
return false
}else{
return true
}}}
//]]>
</script>

edit what is red, should be pretty much selfexplaining,
enjoy
Edited by Reid, Feb 7 2010, 01:56 AM.
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

Is there a way to turn it off in some boards?
Quote Post Goto Top
 
ItsZippy
Member
[ * ]
Is it possible for this to work only in specific forums?
Offline Profile Quote Post Goto Top
 
terralime
Member
[ * ]
thank you for this codes Godkillah, this is very helpful in my forums since we have the points per post system..:)
Offline Profile Quote Post Goto Top
 
gbchaosmaster-ZNR
Member
[ * ]
Doesn't work for quick reply. =/

Chaos
Offline Profile Quote Post Goto Top
 
paradise.engineering
Member Avatar
Lowpoly Workshop Founder
[ *  *  * ]
Doesn't work for quick reply.
Offline Profile Quote Post Goto Top
 
akstylish-ZNR
Member
[ * ]
Same here. Can someone append the code so it works on fast reply too?
Offline Profile Quote Post Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
Code:
 
<script type='text/javascript'>
$('form:has(#fast-reply)').submit(function(){
if($('#fast-reply textarea').val().length < 15){
alert('Your post requires at least 15 characters');
return false;
};
});
</script>
That should do it.
Offline Profile Quote Post Goto Top
 
akstylish-ZNR
Member
[ * ]
Could you append it to the original code rather than make it a separate code?
Offline Profile Quote Post Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
nope
Offline Profile Quote Post Goto Top
 
akstylish-ZNR
Member
[ * ]
Ok. I'm sorry if I sounded ungrateful. Thank you anyway. :)
Offline Profile Quote Post Goto Top
 
Quozzo
Member Avatar
By the blood of Sanguinius!
[ *  *  *  *  * ]
It wasn't anything you said, its just that i dont have permission to edit his code so any other code needs to be a separated from it.
Offline Profile Quote Post Goto Top
 
sarchabid
Member Avatar
Member
[ * ]
Is there anyway to make it so that spaces don't count? I'm not that great at coding and whatever I tried adding doesn't seem to work.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply