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)

cynthetiq 01-29-2009 11:26 AM

Quote:

Originally Posted by Paul M (Post 1727561)
Yes, it merges the post instantly (like here at vb.org).

It involves changes to the actual plugin code and also vbulletin_quick_reply.js

Thanks! Okay I'm going to read your post more carefully, and ask appropriate questions once I've completely RTFM.
Quote:

Originally Posted by Voltar (Post 1727587)
Care to share those improvements? :D

He has in a post on page 10.

Quote:

Originally Posted by Paul M (Post 830152)
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. :)

Quote:

Originally Posted by Leo Brazil (Post 1728034)
I'm glad to see I'm not the only one on this....lol....I was about say the same thing....lol...

I've seen something similar to this working pretty good on vB.org and I always feel like I really need something like it on my board. But after reading tons of pages I just can't figure out how.

As Xenon seems to be out of this for a long time why not take over it for improvements ?

I believe someone from the community needs to pick it up not the board staff.

Leo Brazil 01-30-2009 10:22 AM

Finally I got it working good with time stamp on my 3.8.0 but there was a conflict with another mod Live Mod . The problems seems the Ajax trick from this one os conflicting each other and when I have a bump post that should be merged the user has the impression that nothing happens (but it does) and if you keep trying to post the same thing when you reload the page the merged post is showed with lots of merged things as much as you tried before.


Quote:

Originally Posted by cynthetiq (Post 1728054)
I believe someone from the community needs to pick it up not the board staff.

I've got what you mean but as Paul M has a lot of published mods here (very good ones BTW) and it seems he know exactly what our needs for it, why not ?

Paul M 01-30-2009 10:33 AM

Quote:

Originally Posted by cynthetiq (Post 1728054)
He has in a post on page 10.

That code is ancient, and not what I am referring to.

Id be surprised if that still works as the mod itself has changed since that was posted - I would not suggest anyone use it now.


Quote:

Originally Posted by cynthetiq (Post 1728054)
I believe someone from the community needs to pick it up not the board staff.

Last I checked I was "from the community ". I have many mods released here.

Simon Lloyd 01-30-2009 10:52 AM

Quote:

Originally Posted by Paul M (Post 850585)
Did you try the fix I posted a few pages back ?

Paul M, i looked at your edits but i could only find the //set info so i could only ad the first edit to the plugin (i assume its done in plugin manager?) hwo and where do i find the rest of it, i dont seem to have a
PHP Code:

if ($isdoublepost)
    {
        
$id $doublepost['postid'];
        
$dataman->save(); 

Could you give a suggestion?, im using 3.8.1

Kihon Kata 01-30-2009 12:14 PM

This is working on my 3.8 board just fine. I have had it since it's inception.

Paul M 01-30-2009 03:45 PM

Quote:

Originally Posted by Simon Lloyd (Post 1729022)
Could you give a suggestion?, im using 3.8.1

Please read my post above ;

Quote:

Originally Posted by Paul M (Post 1729013)
That code is ancient, and not what I am referring to.

Id be surprised if that still works as the mod itself has changed since that was posted - I would not suggest anyone use it now.

JFYI, Xenon has given me permission to release an updated version, I will try and do this over the next week.

cynthetiq 01-30-2009 03:51 PM

Yippee!!!!!! thanks Paul.

I didn't mean to exclude you from the superset of the community.

Simon Lloyd 01-30-2009 07:09 PM

Quote:

Originally Posted by Paul M (Post 1729241)
Please read my post above ;



JFYI, Xenon has given me permission to release an updated version, I will try and do this over the next week.

Thats great Paul, reading through the 75 pages here (well most of them....honest!) there are lots of wants and wishes for a 3.8 version, i look forward to it, like always from you it will be something special and easy to install ;)

Paul M 01-31-2009 10:16 AM

Not all wants and wishes will be granted ;)

ePrOmD 01-31-2009 10:46 AM

Hi paul, I am bothered again!
But as I see you're watching something on this hack. I wonder if by chance you don´t know how to solve the problem that this hack don´t join post that contain attachments.

Thanks again!


All times are GMT. The time now is 09:07 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.01892 seconds
  • Memory Usage 1,776KB
  • 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
  • (11)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