| The original content in this documentation is copyrighted to Agent Moose.
Compatibility: · · · · 
Description: This code makes it so if you have under a certain amount of words in a post, you can't post that post.
Footers: - Code:
-
<script type="text/javascript"> var NumWords = 3;
//Created by Agent Moose (revolutionx.smfforfree3.com) var username = $("td.titlebg2 span b").not($("td.titlebg2 span b:contains(News)")).html(); if(username){ if(location.href.match(/action=post/i)){ $("textarea[name='message']").after("<span id='SMC_Count'>Total words typed: <b>0</b></span>"); }else if(location.href.match(/topic,/i) && document.forms.postmodify.message){ $("tr#quickReplyOptions td[width='25%']").html("<span id='SMC_Count'>Total words typed: <b>0</b></span>"); }; if(location.href.match(/action=post/i) || location.href.match(/topic,/i) && document.forms.postmodify.message){ $("input[value='Post'],input[value='Preview']").attr("disabled","disabled"); document.forms.postmodify.message.onkeyup = function(){ var Words = document.forms.postmodify.message.value.split(/ /g); var Count = 0; for(i=0;i<Words.length;i++) if(Words[i].length > 2) Count++; var Bar = Count * 2; $("#SMC_Count").html("Total words typed: <b>" + Count + "</b>"); if(Count < NumWords) $("input[value='Post'],input[value='Preview']").attr("disabled","disabled"); if(Count >= NumWords) $("input[value='Post'],input[value='Preview']").attr("disabled",""); };}; }; </script> See this line at the top of the code?- Code:
-
var NumWords = 3; The 3 is how many words you need enable to submit a post.
If you require support for this code, please start a topic in our Global Support Forum. Once your topic is posted, please PM the URL to the topic starter so that they know a support request is pending for their topic. Please DO NOT PM the topic starter with your actual support request.
|