Agent Moose
|
|
« on: June 03, 2009, 11:48:33 am » |
|
Footers: <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> Well, I decided to finally release this code. Its not the same as the one we have on here, but its all you need This code makes it so if you have under a certain amount of words in a post, you can't post that post. See this line at the top of the code? var NumWords = 3; The 3 is how many words you need enable to submit a post Enjoy
|
|
|
|
|
Andrew
|
|
« Reply #1 on: June 03, 2009, 11:55:32 am » |
|
Er...This is doing the same thing the last one did, its not counting the words typed Perhaps this doesnt work if we are using the Reason For Edit?
|
|
|
|
|
Agent Moose
|
|
« Reply #2 on: June 03, 2009, 11:58:12 am » |
|
Well, that would be why it doesn't want to work for you. I can't really do anything about that either. I would say though, this code is better than Slayers "hows my post" code Mine makes it so you can't click Post or Preview if you have less than a certain amount of characters.
|
|
|
|
Andrew
|
|
« Reply #3 on: June 03, 2009, 12:00:35 pm » |
|
Well, that would be why it doesn't want to work for you. I can't really do anything about that either. I would say though, this code is better than Slayers "hows my post" code Mine makes it so you can't click Post or Preview if you have less than a certain amount of characters. Lol very nice, hey this is really cool what the one is doing here, it looks like you combined with both of them. Looks like Ill have to remove the Reason For Edit code, make them put *their name edit: reason. Great job with the code, it looks great Btw... Wow! You truly have the longest post
|
|
|
|
Agent Moose
|
|
« Reply #4 on: June 04, 2009, 07:00:05 am » |
|
I thought people might like that I need to make it so its more flowing with the forum though.
|
|
|
|
Lyle
MeTube
Member
Offline
Gender:
Posts: 69
Badges: (View All)
|
|
« Reply #5 on: June 07, 2009, 04:00:44 pm » |
|
This is great moose
i wish it was like the RX one, but what you see is what you get,
|
|
|
|
Mojobojo82
MVP
Offline
Gender:
Posts: 838
Badges: (View All)
|
|
« Reply #6 on: June 14, 2009, 02:11:21 am » |
|
Woo! Thanks for this! It really helps stop spam posts
|
|
|
|
Mojobojo82
MVP
Offline
Gender:
Posts: 838
Badges: (View All)
|
|
« Reply #7 on: June 14, 2009, 02:14:52 am » |
|
Aww it doesn't Count the Words? Should i remove the code?
|
|
|
|
Andrew
|
|
« Reply #8 on: June 14, 2009, 09:07:10 am » |
|
It should count the words fine. Its just like the one here, except it doesnt show the bar thing, and the extra text (keep going! You are doing great!, You truly have the longsest post!, etc.)
Did you edit any part of the code? Do you have another code similar to it? (Like the Reason for Edit)
|
|
|
|
Mojobojo82
MVP
Offline
Gender:
Posts: 838
Badges: (View All)
|
|
« Reply #9 on: June 15, 2009, 06:57:02 am » |
|
Nope. Just copied in the code to my Footers... It doesn't count the posts so you can't post... I'll keep trying
|
|
|
|
Mojobojo82
MVP
Offline
Gender:
Posts: 838
Badges: (View All)
|
Aww... Nope not working. I tried a few more times but... Oh well.. I don't really need it anyway...
|
|
|
|
Andrew
|
It worked fine for me...You gotta be using another code that is similar to it...
|
|
|
|
Mojobojo82
MVP
Offline
Gender:
Posts: 838
Badges: (View All)
|
Mhm okay. Just don't worry about it. I'll try find another code or I'll get my friend to take a look at my forum EDIT1: Er... Maybe do i need something in headers? like a javascript thing? I'll check now.. EDIT2: W00t worked! And 1 question.. How do you get that "you must have at least 3 words in the post before posting." and "You are getting better" and stuff? and the RX sign... would be nice to have on mine
|
|
« Last Edit: June 17, 2009, 10:41:53 am by Agent Moose »
|
Report Spam
Logged
|
|
|
|
Mojobojo82
MVP
Offline
Gender:
Posts: 838
Badges: (View All)
|
Er... Maybe do i need something in headers? like a javascript thing? I'll check now..
|
|
|
|
Agent Moose
|
mojobojo82, please don't double post. You can edit your post you know For the other words and such, that code isn't released. Its only for Revolution X.
|
|
|
|
|
|