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

ZiRu$ 04-04-2003 11:48 PM

i think i'll install too

McDohl 04-05-2003 05:59 AM

Haha, first ever hack dedicated to me! -Punches air-

Thanks for this, i'm grateful. Good job! :)

-Clicks Install-

ga.net 05-07-2003 10:23 PM

I cant understand this one:

now, run this query:
--------------------
INSERT INTO setting VALUES ('', 8, 'Minimum Characters per post', 'postminchars', '0', 'The minimum number of characters that you want to require per post. Set this to 0 to disable it.', '', 7);
--------------------

Koutaru 05-09-2003 08:42 PM

Run it in PHPmyadmin

(SQL)

ga.net 05-11-2003 12:38 AM

You mean Ill put everything that's inside the parenthesis?? :) I have PHPadmin running but how do I do it? What are the procedures for this?? :)

ga.net 05-12-2003 11:33 AM

bump

Boofo 05-12-2003 12:05 PM

You run the whole query, just like it is written:

INSERT INTO setting VALUES ('', 8, 'Minimum Characters per post', 'postminchars', '0', 'The minimum number of characters that you want to require per post. Set this to 0 to disable it.', '', 7);

in phpmyadmin, which you should be able to get to from your server. If not, talk to your host and they will tell you how to get to phpmyadmin. ;)

ga.net 05-12-2003 09:41 PM

Quote:

Yesterday at 10:05 PM Boofo said this in Post #17
You run the whole query, just like it is written:

INSERT INTO setting VALUES ('', 8, 'Minimum Characters per post', 'postminchars', '0', 'The minimum number of characters that you want to require per post. Set this to 0 to disable it.', '', 7);

in phpmyadmin, which you should be able to get to from your server. If not, talk to your host and they will tell you how to get to phpmyadmin. ;)


I know how to get to phpmyadmin, in fact i was the one who installed it. I just dont know how to run this query, what should I click and what are the fields that I should fill up? Is it ok to provide me the steps? :)

Boofo 05-13-2003 02:43 AM

Ok, let's try this one last time. ;)

Before you do anything, backup your database!

Go to phpmyadmnin and click on the database name (at the top) in the left window. You will see 5 options in the right hand window. They are:

Structure
SQL
Export
Search
Query

Click on the SQL option and enter this in the big box (just copy and paste):

INSERT INTO setting VALUES ('', 8, 'Minimum Characters per post', 'postminchars', '0', 'The minimum number of characters that you want to require per post. Set this to 0 to disable it.', '', 7);

Hit go and you are done.

ga.net 05-13-2003 12:19 PM

Wow! That was easy! thanks :)

ga.net 05-15-2003 09:23 AM

Ei, what if I dont want this hack anymore, how do I uninstall it?? :)

Dankinit 06-04-2003 01:47 AM

Why not just set the min characters to 0 to disallow?

brauner 07-23-2003 12:24 PM

Leider ist die .txt Datei nicht mehr vollständig.
Könnte das vielleicht nochmal jemand anhängen?

DuffMan 12-13-2003 08:51 PM

This hack is exactly what I was looking for! It works great, thanks a lot!

tm21 12-14-2003 08:49 PM

I installed the hack, works fine. One of my mods asked if it would be possible to make a different limit based on post count? We basicially want newbies to post more information than our regular members, so we want a higher minimum for the newbs.


All times are GMT. The time now is 12:06 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.01384 seconds
  • Memory Usage 1,769KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete