Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

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

Version: 3.5.3 Rating:
Released: 09-19-2005 Last Update: 01-15-2007 Installs: 877
Uses Plugins
 
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.
This will be done until the old post is older than 24 hours (you can change this timespan yourself)

Nothing more to say about that, it's the quite same as my vb3.0 version.

This Mod should run with 3.6 as well


** Please make sure you ENABLE this product after you install it - it is disabled by default. **

For vb 3.8 there are two alternative updates ;

https://vborg.vbsupport.ru/showthread.php?t=203705
https://vborg.vbsupport.ru/showthread.php?t=204177

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
inphoenix

Comments
  #142  
Old 11-25-2005, 08:09 PM
xxskullxx xxskullxx is offline
 
Join Date: Jun 2002
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Paul for the update. I will try this out now.
Reply With Quote
  #143  
Old 11-26-2005, 10:46 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Coolio. I will definitely try this out tonight.
Reply With Quote
  #144  
Old 11-26-2005, 10:57 PM
dan35's Avatar
dan35 dan35 is offline
 
Join Date: Jul 2004
Location: California
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Hmm, well I installed this on my test forum last night, and yes, it has (had) two problems ;

1. The post dateline is not updated on a merge, so it doesn't get seen as unread.

2. The one everyone complains about - no ajax refresh (unless you alter the time stamp, then you get two versions of the same post).


So, since I wanted this on our forum I have fixed both locally - this is what I have done.


1. To fix the timestamp ;

Find ;

PHP Code:
// set info 
Add below it ;

PHP Code:
$dataman2->set('dateline'TIMENOW); 
2. To fix the ajax issue, use this nasty hack ;

Find ;

PHP Code:
    if ($isdoublepost)
    {
        
$id $doublepost['postid'];
        
$dataman->save();
        
        
//now add edited by
        
if ($dp_settings['editedbymsg'] != '')
        {
            
$vbulletin->db->query_write("
                REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
                VALUES (
$id, " $vbulletin->userinfo['userid'] . ", '" addslashes($vbulletin->userinfo['username']) . "', " TIMENOW ", '" addslashes($dp_settings['editedbymsg']) . "')
            "
);
        }
    } 
Replace with ;

PHP Code:
    if ($isdoublepost)
    {
        
// Ugly hack added by Paul M to fix ajax merge //
        
if (!$vbulletin->GPC['ajax'])
        {
            
$id $doublepost['postid'];
            
$dataman->save();
        
            if (
$dp_settings['editedbymsg'] != '')
            {
                
$vbulletin->db->query_write("
                REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
                VALUES (
$id, " $vbulletin->userinfo['userid'] . ", '" addslashes($vbulletin->userinfo['username']) . "', " TIMENOW ", '" addslashes($dp_settings['editedbymsg']) . "')
                "
);
            }
        }
        
$vbulletin->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . "p=$post[postid]#post$post[postid]";
        eval(
print_standard_redirect('redirect_postthanks'truefalse));
    } 
Seems to work okay for me, feel free to try it.

After using this, I can't post any new thread. Submit new thread, it just pops up a blank page.
Reply With Quote
  #145  
Old 11-26-2005, 11:38 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dan35
After using this, I can't post any new thread. Submit new thread, it just pops up a blank page.
Well the answer is simple enough, if it don't work for you don't use it.

FYI, It works for me, on two 3.5.1 systems, and no one else seems to have a problem .....
Reply With Quote
  #146  
Old 11-28-2005, 07:54 AM
EasyTarget EasyTarget is offline
 
Join Date: Nov 2004
Posts: 660
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nm.. learned it in the readme
great hack
Reply With Quote
  #147  
Old 11-28-2005, 10:49 AM
xxskullxx xxskullxx is offline
 
Join Date: Jun 2002
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ Paul M:

When I add
PHP Code:
 $dataman2->set('dateline'TIMENOW); 
I get this error:
Quote:
Fatal error: Call to a member function on a non-object in c:\appserv\www\ng\forums\includes\functions_newpos t.php on line 271
Adding everything else works fine.

3.5.1
Reply With Quote
  #148  
Old 11-28-2005, 10:51 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xxskullxx
@ Paul M:

When I add
PHP Code:
 $dataman2->set('dateline'TIMENOW); 
I get this error:
Adding everything else works fine.
Are you running RC2 by chance?
Reply With Quote
  #149  
Old 11-28-2005, 10:53 AM
xxskullxx xxskullxx is offline
 
Join Date: Jun 2002
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry just edited my post. Running 3.5.1. I haven't updated my profile in awhile, lol.
Reply With Quote
  #150  
Old 11-28-2005, 10:55 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xxskullxx
Sorry just edited my post. Running 3.5.1. I haven't updated my profile in awhile, lol.
Well, it worked fine for me on RC3, although I just took it out and skipped that part of the instrctions Paul gave. Since mine is set at an hour, updating the post time doesn't really make that much sense to me, anyway.
Reply With Quote
  #151  
Old 12-01-2005, 10:54 PM
utw-Mephisto utw-Mephisto is offline
 
Join Date: Jan 2005
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Hmm, well I installed this on my test forum last night, and yes, it has (had) two problems ;

1. The post dateline is not updated on a merge, so it doesn't get seen as unread.

2. The one everyone complains about - no ajax refresh (unless you alter the time stamp, then you get two versions of the same post).


So, since I wanted this on our forum I have fixed both locally - this is what I have done.


1. To fix the timestamp ;

Find ;

PHP Code:
// set info 
Add below it ;

PHP Code:
$dataman2->set('dateline'TIMENOW); 
2. To fix the ajax issue, use this nasty hack ;

Find ;

PHP Code:
    if ($isdoublepost)
    {
        
$id $doublepost['postid'];
        
$dataman->save();
        
        
//now add edited by
        
if ($dp_settings['editedbymsg'] != '')
        {
            
$vbulletin->db->query_write("
                REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
                VALUES (
$id, " $vbulletin->userinfo['userid'] . ", '" addslashes($vbulletin->userinfo['username']) . "', " TIMENOW ", '" addslashes($dp_settings['editedbymsg']) . "')
            "
);
        }
    } 
Replace with ;

PHP Code:
    if ($isdoublepost)
    {
        
// Ugly hack added by Paul M to fix ajax merge //
        
if (!$vbulletin->GPC['ajax'])
        {
            
$id $doublepost['postid'];
            
$dataman->save();
        
            if (
$dp_settings['editedbymsg'] != '')
            {
                
$vbulletin->db->query_write("
                REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
                VALUES (
$id, " $vbulletin->userinfo['userid'] . ", '" addslashes($vbulletin->userinfo['username']) . "', " TIMENOW ", '" addslashes($dp_settings['editedbymsg']) . "')
                "
);
            }
        }
        
$vbulletin->url 'showthread.php?' $vbulletin->session->vars['sessionurl'] . "p=$post[postid]#post$post[postid]";
        eval(
print_standard_redirect('redirect_postthanks'truefalse));
    } 
Seems to work okay for me, feel free to try it.

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 04:59 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.08001 seconds
  • Memory Usage 2,388KB
  • 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
  • (10)bbcode_php
  • (6)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
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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