PDA

View Full Version : Minimum Words on Thread Title


valdet
11-12-2014, 08:30 AM
Hello,

Is it possible to have a Minimum Words per Thread title mod for vBulletin ?

There are already Minimum Characters for Thread Title (https://vborg.vbsupport.ru/showthread.php?t=160566) and Minimum Characters for First Post (https://vborg.vbsupport.ru/showthread.php?t=314357&highlight=characters), but not for Words in thread titles.

I tried to combine the hacks above with word (http://stackoverflow.com/questions/18679576/counting-words-in-string) counting (http://stackoverflow.com/questions/6543917/count-number-of-word-from-given-string-using-javascript) javascripts (http://www.mediacollege.com/internet/javascript/text/count-words.html), but had no luck so far.

I appreciate any effort if someone comes up with a solution, which I hope is not too difficult.

Thanks

Simon Lloyd
11-12-2014, 12:46 PM
Ask in this thread https://vborg.vbsupport.ru/showthread.php?t=314357 if the author could add the possibliity of checking the number of spaces, better than counting words you look for a minimum number of spaces, so if you are looking for minimum of 5 words then there will be a minimum of 4 spaces :)

Ozzy is pretty accommodating and if you show him this thread he might just add it to the mod for you, if he does feel free to donate to him :)

kh99
11-12-2014, 12:51 PM
It's up to Ozzy of course, but the mod mentioned above works by changing the existing setting for minimum characters in a post, so changing it to count words in the title wouldn't be a trivial change.

BTW, there's a php function str_word_count() that will do the work of counting.