vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Minimum characters needed for a new post (https://vborg.vbsupport.ru/showthread.php?t=51176)

FlyingDutchman 04-03-2003 10:00 PM

Minimum characters needed for a new post
 
What does this hack do?
If you post a new thread or a new reply and the message is too short (shorter than a number of characters you specify), you'll recieve an error. This *might* stop spamming.



Requested by
https://vborg.vbsupport.ru/showthread.php?postid=377468



Screenshots
-Admin CP Options -> [Thread Display Options]
-The actual error page



Installation
See attached text file
Approx. install time: 5 min or so
[high]After installation, remember to set the 'Minimum Characters per post' option to a suitable value (for example 50)[/high]


Updates
-fixed lil typo in the install file :) (template name was wrong)
-thanks to Zelda-King for pointing me on editpost.php ;)





[high]Please click the install button if you installed this hack!!![/high]

FlyingDutchman 04-04-2003 12:07 PM

Screenshot
Admin options [Thread Display Options]

FlyingDutchman 04-04-2003 12:08 PM

Screenshot
The actual error page

Boofo 04-04-2003 12:33 PM

Nice little addition. I will make it so Admins and Mods are exempt, though. ;)

Dean C 04-04-2003 12:34 PM

Nice idea - vB users are really hitting down on spammers nowadays ;)

- miSt

FlyingDutchman 04-04-2003 01:40 PM

Quote:

Today at 03:33 PM Boofo said this in Post #4
Nice little addition. I will make it so Admins and Mods are exempt, though. ;)
this code will do this job i think:

PHP Code:

  $minmod = array("1""2""3""4");
  if (
strlen($message)<$postminchars and $postminchars!=and in_array("$bbuserinfo[usergroupid]"$minmod)) {
    eval(
"standarderror(\"".gettemplate("error_tooshort")."\");");
  } 


[high]not tested though![/high]
please tell me if it works ;)






[high]btw, anyone know if there's a similar function to in_array, but that returns FALSE where in_array returns TRUE (like checking if something is NOT in an array...)[/high]

Boofo 04-04-2003 01:55 PM

Here's the code I was going to use.

PHP Code:

  if (strlen($message)<$postminchars and $postminchars!=AND !in_array($bbuserinfo[usergroupid], array(567))) {
    eval(
"standarderror(\"".gettemplate("error_tooshort")."\");");
  } 


Zelda-King 04-04-2003 03:46 PM

I recommend the code be inserted into editpost.php as well. Also, in the text file you said to make a template called 'error_toolong'. Surely you mean 'error_tooshort'.

sabret00the 04-04-2003 09:12 PM

great work, i saw this on vb3, altho it's more a little pop up like the pm thing but blah, this is great!

Spitfireisgod 04-04-2003 10:09 PM

this is nice, im gonna install


All times are GMT. The time now is 11:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01054 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete