Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Prevent Doubleposting Details »»
Prevent Doubleposting
Version: 1.6, by Xenon Xenon is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.0.6 Rating:
Released: 01-07-2004 Last Update: 02-05-2005 Installs: 288
Code Changes  
No support by the author.

When a User posts into a thread where he already has the lastpost, no new post will be added. The lastpost of him will be edited and the new text is put after his first message, attachments will be added to the old post as well.
This will be done until the old post is older than 1 hour (you can change this timespan yourself)
by changing $do_bump in the script, you can define wether the post's time will be altered or not.

Enjoy, and don't forget to click install

Notice: If you have installed the Proxy ip to real ip conversion or Proxy Detector v3.1 Hack, then you should probably take a look at this post.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #192  
Old 01-26-2005, 04:24 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

of course you can't

the seperator will become part of the post, and if you don't allow html in posts, you cannot use it
Reply With Quote
  #193  
Old 02-06-2005, 03:04 AM
TCattitude's Avatar
TCattitude TCattitude is offline
 
Join Date: Oct 2004
Location: Chile
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by eblivion
I installed the mod and didn't notice any code excluding administrators and moderators from the restriction. How can I prevent it from blocking admins & moderators?
After upgrade to 3.0.5/3.0.6 i have the same thing here.
Before, admins (i don't know if mods or supermods too) were not affected by the anti-doublepost.

And now... works for admins too.
Anything wrong?
Obviously, i applied the hack again after upgrade.

How exclude admins?
Reply With Quote
  #194  
Old 02-06-2005, 05:33 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone every included the mod to this hack to update the editlog table? These forums are using it so I know it must exist.
Reply With Quote
  #195  
Old 02-06-2005, 06:27 PM
FASherman's Avatar
FASherman FASherman is offline
 
Join Date: Aug 2002
Posts: 289
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay, okay...i figured it out myself.

FIND
PHP Code:
//Update forum if postdate has changed.
if ($dp_settings['dobump'])
{
    
$DB_site->query("
     UPDATE " 
TABLE_PREFIX "forum
     SET lastpost = " 
TIMENOW ",
     lastposter = '" 
addslashes($post['postusername']) . "',
     lastthread = '" 
addslashes($threadinfo['title']) . "',
     lastthreadid = 
$threadinfo[threadid],
     lasticonid = " 
iif($threadinfo['pollid'], -1$threadinfo['iconid']) . "
     WHERE forumid = 
$foruminfo[forumid]
    "
);

AFTER THAT, ADD:
PHP Code:
//Now lets update the editlog
$reason "Automerged Doublepost";
$lastedit $DB_site->query_first("
     SELECT postid, userid, username, dateline, reason 
     FROM " 
TABLE_PREFIX "editlog 
     WHERE postid = 
$post[postid]
"
);
if (
$lastedit['postid']) {
    
$DB_site->query("
     UPDATE " 
TABLE_PREFIX "editlog
     SET postid = 
$lastedit[postid],
     userid = 
$bbuserinfo[userid],
     username = '" 
addslashes($post['postusername']) . "',
     dateline = " 
TIMENOW ",
     reason = '" 
addslashes($reason) . "'
     WHERE postid = 
$post[postid]
    "
);
} else {
    
$DB_site->query("
     INSERT INTO " 
TABLE_PREFIX "editlog
     (postid, userid, username, dateline, reason)
     VALUES (
$post[postid]$bbuserinfo[userid]
     '" 
addslashes($post['postusername']) . "',
     " 
TIMENOW ",'" addslashes($reason) . "')
    "
);

Reply With Quote
  #196  
Old 02-06-2005, 07:24 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@FASherman: well, here on vb.org there are often some more features in my hacks than in the released version, as i don't release every single change immediatelly

but i have uploaded the newest version now, which adds the editlog text
Reply With Quote
  #197  
Old 02-14-2005, 01:37 AM
Imperial Fritz Imperial Fritz is offline
 
Join Date: Dec 2003
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, this hack was much needed.
Reply With Quote
  #198  
Old 02-14-2005, 07:02 PM
That Rob Guy That Rob Guy is offline
 
Join Date: Dec 2004
Location: Bossier City, LA
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love this hack...

/me clicks install. One of the easiest and worthy hacks to have.
Reply With Quote
  #199  
Old 02-14-2005, 08:18 PM
JMH11788 JMH11788 is offline
 
Join Date: Jan 2005
Location: Ohio
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am going to install this mod but i want the option in the admincp to disable it. i know ill have to put it in <if condition> tags and then an <else> at the end but im not sure exactly how.

so i would need an if and else for the top two codes, and this one ^^ needs just and if..correct? so what would the codes be and what would the code i need to add for an ON and OFF radio button in the admin cp be?

thanks!
Reply With Quote
  #200  
Old 02-14-2005, 08:56 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's not needed to post the hack instructions, everyone know them from the file

and actually it's not hard to do.

first of all you have to enable debug mode of your vb.
then got to acp options and you see you can add new settings to the settinggroups
add one to the message posting options yesno as option code
for example:

varname: preventdoubleposts
title Preventing Doubleposting
optioncode yesno
default 1
vbulletin default no

then just change that line:
PHP Code:
if ($type != 'thread' AND $threadinfo['lastpost'] > TIMENOW $dp_settings['timespan'] AND $threadinfo['lastposter'] == $post['postusername']) 
into
PHP Code:
if ($vboptions['preventdoubleposts'] AND $type != 'thread' AND $threadinfo['lastpost'] > TIMENOW $dp_settings['timespan'] AND $threadinfo['lastposter'] == $post['postusername']) 
that's all you need
Reply With Quote
  #201  
Old 02-14-2005, 10:54 PM
JMH11788 JMH11788 is offline
 
Join Date: Jan 2005
Location: Ohio
Posts: 83
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^^
ahh ic...why do i have to put it in debug mode? and where is the option to put it in debug mode?

thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:11 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04956 seconds
  • Memory Usage 2,335KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete