The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[req] Min, word count to submit post [/req]
Hey all
Was curious, if someone has any free time, pending on how simple this would be To make a hack were there has to be a minimum amount of words / characters in a reply, before it can be posted? So lets say you have to post 30 characters or more, if you don't, when you try to post that reply, you will be told, "sorry, your post has to have at least 30 characters" or something like that...? |
#2
|
||||
|
||||
shouldnt be very hard (at least the char counter):
open newreply.php find PHP Code:
PHP Code:
|
#3
|
||||
|
||||
Or instead of letting the message go through and redirect to the error template, you can modify the javascript in the template that checks the message length by adding this:
Code:
if (postmaxchars != 0) { if (theform.message.value.length < 30) { alert("Your message is too short.\n\nIncrease your message to 5.\nIt is currently "+theform.message.value.length+" characters long."); return false; } else { return true; } } else { return true; } } |
#4
|
||||
|
||||
anotzher disadvantage is that some which haven't enabled javascript won't see that
my code works for all users |
#5
|
||||
|
||||
Quote:
|
#6
|
||||
|
||||
yes, you're right, the combination is used for maxchars too
and yes a combination would be best |
#7
|
||||
|
||||
^^^^
sweet guys!, okay, shall try this out |
#8
|
||||
|
||||
Hey guys
is there any special way i should put both of them together? or just copy and paste one after the other? Also where exactly should i paste this code? |
#9
|
||||
|
||||
well, copy and paste them one after th other is impossible.
my change is a codechange to newreply.php erwins instead is a change of the newreply template |
#10
|
||||
|
||||
AHAH okay ke kew - so just put each in it's correct template / file
easy enough! althought knowing me i will be back..lol |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|