vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Prevent Doubleposting (https://vborg.vbsupport.ru/showthread.php?t=96602)

Xenon 10-11-2005 10:59 AM

Quote:

Originally Posted by mtha
can we extend the condition, so that only posts sorter than xx lines or xx characters, are merged. Longer posts are stays seperated

those things can be added easily

you just have to manipulate the if condition when a post is considered as doublepost just add a AND strlen($post[message]) <= 30 and just posts shorter than 30 chars will be merged.

Boofo 10-11-2005 11:12 AM

What post length would be a good length to set this at?

Xenon 10-11-2005 11:40 AM

hmm, personally i'd say up to 5 lines around 400 chars would be a good lenghth, but that depends on personal views..

Boofo 10-11-2005 12:21 PM

Quote:

Originally Posted by Xenon
hmm, personally i'd say up to 5 lines around 400 chars would be a good lenghth, but that depends on personal views..

So it would look like this with that added, right?

PHP Code:

 if ($type != 'thread' 
AND !in_array($vbulletin->userinfo['usergroupid'], array(5,6,7))
AND 
$threadinfo['lastpost'] > TIMENOW $dp_settings['timespan'
AND 
$threadinfo['lastposter'] == $vbulletin->userinfo['username'])
AND 
strlen($post['message']) <= 400



Xenon 10-11-2005 02:30 PM

apart from wrong placed brackets, yes ;)

Boofo 10-11-2005 02:39 PM

You mean like this?

PHP Code:

 if ($type != 'thread' 
AND !in_array($vbulletin->userinfo['usergroupid'], array(5,6,7))
AND 
$threadinfo['lastpost'] > TIMENOW $dp_settings['timespan'
AND 
$threadinfo['lastposter'] == $vbulletin->userinfo['username']
AND 
strlen($post['message']) <= 400)



Xenon 10-11-2005 03:46 PM

yep :)

Boofo 10-11-2005 03:58 PM

Thank you, sir. ;)

If you can figure out a way to do a plug-in on this (product), I could make settings for the usergroups and string length. ;)

mtha 10-11-2005 04:53 PM

look like boofo got right into the idea.

Thank you very much Xenon


PHP Code:

AND strlen($post['message']) <= 400


Boofo, use

PHP Code:

    $dp_settings = array(
        
'timespan' => 3600 24,// how many seconds after the last post the new post is defined as doublepost
        
'spacer' => "\n\n",    // What should be between the old post and the new one (default: two empty lines)
        
'editedbymsg' => 'Automerged Doublepost'// If left blank no edited by will appear
        
'maxchars' => 400// Max chars where post is merged.
    
); 

and

PHP Code:

AND strlen($post['message']) <=  $dp_settings['maxchars'] ) 




well, should you exclude Unregistered Users from the post, or checking IPs for those unregistered too? otherwise, you wont know "which unregistered user" post what :)

Xenon 10-12-2005 11:06 AM

Unregistred users use usernames as well afaik, they are just not registred.


All times are GMT. The time now is 09:01 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.01998 seconds
  • Memory Usage 1,752KB
  • 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
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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