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)

Snake 12-31-2005 01:08 PM

I guess he is too lazy to search for the link in this thread.

lanc3lot 01-03-2006 09:32 AM

Has someone found a fix on "prevent automerging for admins" yet?

It will be very usefull this one.

Also, it will be good if the timestamp of the thread, being updated when someone double post and his posts automerged

Thnx in advance :)

Snake 01-03-2006 11:32 AM

Paul has already implemented a fix for that. Do a search on this thread, it should be there somewhere. ;)

lanc3lot 01-03-2006 04:22 PM

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. :)


Apparently u point in this post...can u please tell me in which template / file i must do this edits? I searched the includes/functions_newpost.php but no luck:(

Also, PaulM, have u figured out any hint of how to prevent automerge for the Admin's Posts?

Thnx again:)

Snake 01-03-2006 04:25 PM

What do you mean no luck? It's working just fine on my forums. :)

lanc3lot 01-03-2006 04:33 PM

I meant, where i have to do the fileedits, in what file or template...

Paul M 01-03-2006 04:38 PM

Quote:

Originally Posted by lanc3lot
I meant, where i have to do the fileedits, in what file or template...

You edit the existing hacks code.

Quote:

Originally Posted by lanc3lot
Also, PaulM, have u figured out any hint of how to prevent automerge for the Admin's Posts?

I have never even looked at or thought about it, as I have no need of this. :)

lanc3lot 01-03-2006 04:41 PM

Damn, hope u find a little time and do so :(

lanc3lot 01-03-2006 04:50 PM

Update

Ok found it, i was using the one with the product, thats why i couldnt find it before:)

Thnx, hope it can be done for admins the one i said too :)


Update 2

PaulM, although i did the step one, the last post time, is not being updated in the time of the last post but stays with the time of the first one..

Any hints?

Puntoboy 01-03-2006 07:41 PM

any update on this? it is fully released yet?

will be good for the classifieds section to prevent people from bumping for sale posts.

i'm a total noob so any help will be greatly appreciated.


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

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.01786 seconds
  • Memory Usage 1,762KB
  • 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
  • (4)bbcode_php_printable
  • (3)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