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)

Skavenger 09-17-2007 09:58 PM

is there any way to make this work only in certain forums?

JohnBee 09-18-2007 11:43 AM

I have been using this MOD since it was introduced back in the day and it has served out community beautifully. From the start we modified it and I have been carrying the custom code over between releases. I figured someone could benefit from it as well.

The customization produces a doublepost /merged message with time function on a lower key than the default prompt.

Quote:

Vestibulum diam risus, euismod id, tristique sed, mollis vitae, massa. Donec ante nibh, euismod ac, iaculis a, rutrum quis, neque. Donec vel velit. In hac habitasse platea dictumst. Aliquam id nunc sed mi mollis lacinia.

JohnBee added 0 Minutes and 13 Seconds later...

Vestibulum diam risus, euismod id, tristique sed, mollis vitae, massa. Donec ante nibh, euismod ac, iaculis a, rutrum quis, neque. Donec vel velit. In hac habitasse platea dictumst. Aliquam id nunc sed mi mollis lacinia.
Customization for this is quite simple, and can be accomplished in two ways.
  1. editing the .xml file directly(which I prefer) and overwriting the existing installtion or...
  2. editing the installed plugin and keeping the installation.
Method 1. edit the product file product-xenon_prevdoublepost.xml and fine the following line(line 55)
Code:

        $doublepost['message'] = $doublepost['pagetext'] . "\n" . $vbulletin->options['xen_dp_spacer'] . "\n" . $post['message'];
and replace with:
Code:

$doublepost['message'] = $doublepost['pagetext'] . "\n\n" . $vbulletin->userinfo['username'] . ' added ' . intval((TIMENOW - $doublepost['dateline'])/60) . ' Minutes and ' . ((TIMENOW - $doublepost['dateline']) % 60). ' Seconds later...' . $vbulletin->options['xen_dp_spacer'] . "\n\n" . $post['message'];

Method 2.
Through ACP open: Plugins & Products > Plugin Manager: [Product : Prevent Doubleposts] > Main Doublepost Prevent Engine. and In the Plugin PHP Code window find the following code:
Code:

$doublepost['message'] = $doublepost['pagetext'] . "\n" . $vbulletin->options['xen_dp_spacer'] . "\n" . $post['message'];
and replace with:
Code:

$doublepost['message'] = $doublepost['pagetext'] . "\n\n" . $vbulletin->userinfo['username'] . ' added ' . intval((TIMENOW - $doublepost['dateline'])/60) . ' Minutes and ' . ((TIMENOW - $doublepost['dateline']) % 60). ' Seconds later...' . $vbulletin->options['xen_dp_spacer'] . "\n\n" . $post['message'];
And thats it. Hope this helps someone.

Black Tiger 09-18-2007 03:26 PM

Very nice modification.
But can this not also be achieved by using the "Post seperator" option in Ezbounce itselve?

JohnBee 09-18-2007 05:27 PM

Quote:

Originally Posted by Black Tiger (Post 1341785)
Very nice modification.
But can this not also be achieved by using the "Post seperator" option in Ezbounce itselve?

It might, but I'm not sure about the accurate time stamp though.

aycan555 09-19-2007 12:05 AM

Is it posible to put Admins name instead of the users on the last edited by notice?

hitmann 09-19-2007 09:52 AM

Nice modification

stonner 09-23-2007 02:01 PM

hi,

i've installed it and set the options. but the users still can doublepost.
how can i fix it?

thank you!

Black Tiger 09-23-2007 03:37 PM

Did you enable it? Because it's disabled by default.

stonner 09-23-2007 04:44 PM

Where can i find the enable option? there is none.

nnjj.net 09-23-2007 08:39 PM

is there any update for this for 3.6.8?

ragtek 09-23-2007 09:01 PM

it's working fine on 3.6.8

Smiry Kin's 09-23-2007 09:05 PM

has anyone posted how they got it to work similar to cableforums?

Smoothie 09-24-2007 02:37 AM

Quote:

Originally Posted by stonner (Post 1345271)
Where can i find the enable option? there is none.

If I can read your settings, looks like 1440 minutes until a new post is no longer considered as doublepost. Might want to fix that and try again. LOL

stonner 09-24-2007 08:35 AM

i set it to 0, and it's still the same.

Dave Hawley 09-24-2007 08:44 AM

It works just fine for me. Been using it with great success on 3.5.4 for 2 Moths now.

stonner 09-24-2007 08:45 AM

i am using vb3.6.8. is this the problem?

Dave Hawley 09-24-2007 09:04 AM

I wouldn't think so as other here have reported it working on 3.6.8

aycan555 09-24-2007 07:46 PM

Quote:

Originally Posted by stonner (Post 1345799)
i am using vb3.6.8. is this the problem?

I have ınstalled on the 3,6,7 and ıt ıs dısable the product after ınstallıng ıt, ı thınk you got same problem...

Just go to the products and try enableıng ;)

Paul M 09-25-2007 11:55 PM

Quote:

Originally Posted by Smiry Kin's (Post 1345436)
has anyone posted how they got it to work similar to cableforums?

I doubt it, CF runs a very old (modified) version - the version running here is actually much newer.

To what are you referring anyway, the Quick Reply fix, the spacer, or something else ?

aeturner89 09-26-2007 04:38 PM

I installed this but later uninstalled it because of that annoying quick reply problem. It doesn't merge them properly until the page is refreshed.

Has anybody managed to fix this and is willing to share how?

Dave Hawley 09-26-2007 11:38 PM

No problems here and been in use for 2 Months.

REIGN SS 09-28-2007 05:52 AM

When i installed this, i had to go back and "Enable" it before it would work. (installed 3.6.8)

mauro1947 10-04-2007 03:44 AM

A lot of thanks.
100% tested and working with vBulletin 3.6.8
Just after install, Enable the product.
Regards!

aycan555 10-04-2007 11:19 PM

Is it posible to enable it on the specific forums? Because we got chi-chat forum i want to enable this on the that forums to prevent double postings...

And we got signatures&avatars firum.. Some users sends about 50 avatar... and it joins all the avatars on the one post... Then page opens slowly... :(

anwar.abdullakh 10-08-2007 11:55 AM

Quote:

Originally Posted by stonner (Post 1345799)
i am using vb3.6.8. is this the problem?

go to acp > plugins and products > manage products
there you will have to look for the Prevent Doubleposts 1.0

if the text is striken in the middle, this means that it's turned off...you have to enable it.
at your righthandside you will see a dropdown menu...select "enable there".

and if that doesn't do the trick then go to vbulletin options > doublepost preventing
and set the timespan to 1.

Note: don't turn the timespan 0 coz that will turn the plugin off.

you won't see the threads merged immediately, if you refresh you will see that it got merged.

hope that it worked for you now.

aycan555 10-08-2007 11:44 PM

Quote:

Originally Posted by aycan555 (Post 1353168)
Is it posible to enable it on the specific forums? Because we got chi-chat forum i want to enable this on the that forums to prevent double postings...

And we got signatures&avatars firum.. Some users sends about 50 avatar... and it joins all the avatars on the one post... Then page opens slowly... :(


any help please?

too_cool_3 10-18-2007 06:36 AM

Does anyone know how to make the Post Seperator for this hack diplay like this:

--------------- Added 17 Oct 2007 at 7:17pm ---------------

so far I'm using this code in the Post Seperator section but can't figure out how to make the current date and time show:


?---------------Added---------------

too_cool_3 10-18-2007 07:26 AM

this is exactly what I want to do... it seems no one has helped this guy out either, I've spend the last 3 hours reading all 50-some pages trying to figures this out. please help someone

Quote:

Originally Posted by Smiry Kin's (Post 971155)
Hi this works perfect but!!

is it possible for every time it makes a double post. to make something like this


First Post Here

<Added Tuesday 99th 2059 at 12.32 AM>

Merged Post Here

<Added Tuesday 99th 2059 at 12.42 AM>

Another Merged Post Here

if you get me??

please help, this would be very usefull?! im sure it can be added! i just don't no any of the code! :(


Black Tiger 10-18-2007 11:55 AM

Post #725 is something similar, you could adjust the used code I guess.

too_cool_3 10-18-2007 03:43 PM

Quote:

Originally Posted by Black Tiger (Post 1363008)
Post #725 is something similar, you could adjust the used code I guess.

Thats Black Tiger but alas, that was one of the first things I tried but instead of having it show up like:

--------------- Added 17 Oct 2007 at 7:17pm ---------------

Which is how I want it, it shows up like this:

User Poster xx Hours and xx Minutes Later

In the same size font and colour as regular user posts so you cant tell the difference between the Post Separator and what the actual user wrote!?

Please someone must know.

Black Tiger 10-18-2007 05:34 PM

No sorry I don't know, it's not my adjustment. Somewhere I've seen still another, more like you wanted, I have looked for it but can't find it anymore.

redlabour 10-31-2007 01:43 PM

Any Idea how to excluded a ForumID from beeing affected?

Quote:

Additional Condition (experts only)
Here you can add extra conditions, which will be required for a post to be seen as a doublepost. Be carefull, as this code is evaluated without doing any errorchecking, so use it at your own risk! (Examlpe: add !can_moderate() into the box to exclude moderators from doublepost prevention)
It collides at NuWiki if the Articlewriter wants to post a first Comment.

yoyoyoyo 10-31-2007 04:05 PM

Here is the edited product, which works in 3.6.8, and it is no longer disabled by default.

Thanks to Xenon for a great mod.

Black Tiger 10-31-2007 04:21 PM

Quote:

which works in 3.6.8
What was needed to be edited then? The original one also worked in 3.6.8. You only changed the "disabled by default" or did you also change other things?

yoyoyoyo 10-31-2007 05:27 PM

well, perhaps I worded it poorly - just stating it works in 3.6.8, not implying the other one didn't...

I made the changes indicated here:
https://vborg.vbsupport.ru/showpost....&postcount=725
and also made it enabled by default, since many people seemed to have problems with that.

Black Tiger 10-31-2007 10:13 PM

Ah oke, I understand. Nice change, thanks!
Is the option from the change you made selectable like an on/off setting?

redlabour 11-02-2007 05:59 AM

Quote:

Originally Posted by redlabour (Post 1372749)
Any Idea how to excluded a ForumID from beeing affected?



It collides at NuWiki if the Articlewriter wants to post a first Comment.


Anyone ?

Keyser S?ze 11-05-2007 07:22 PM

i would love it if when someone double posts and it is merged it would time stamp the merge,

i have mine set up that when it is merged it says -edit- above the merge, looks nice, and a time stamp next to it would be great

Kalina 11-06-2007 01:55 PM

Quote:

Originally Posted by too_cool_3 (Post 1363132)
Thats Black Tiger but alas, that was one of the first things I tried but instead of having it show up like:

--------------- Added 17 Oct 2007 at 7:17pm ---------------

Which is how I want it, it shows up like this:

User Poster xx Hours and xx Minutes Later

In the same size font and colour as regular user posts so you cant tell the difference between the Post Separator and what the actual user wrote!?

Please someone must know.

I achieved what you're looking for by editing the "Main Doublepost Prevent Engine" plugin. You can replace all the code in it with the following.

PHP Code:

// ########### Xenon's prevent doublepost modification #########

$vbulletin->GPC['xen_isdoublepost'] = false;

// parse custom conditions
$custcond true;
if (
trim($vbulletin->options['xen_dp_custcond']) != '')
{
    eval(
'$custcond = ((' $vbulletin->options['xen_dp_custcond'] . ') ? true : false);');
}


// at first check if there is at least the possibility to be a doublepost
if ($custcond AND $type != 'thread'
    
AND $dp_threadinfo['lastpost'] > TIMENOW $vbulletin->options['xen_dp_timespan'] * 60
    
AND $dp_threadinfo['lastposter'] == $vbulletin->userinfo['username']
    AND 
$dataman->fetch_field('attach') == 0)
{
    
// we are here, so we may have a doublepost -> do more exact checkings
    
$doublepost $vbulletin->db->query_first("
        SELECT post.*
        FROM " 
TABLE_PREFIX "post AS post
        LEFT JOIN " 
TABLE_PREFIX "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
        WHERE post.threadid = 
$threadinfo[threadid]
            AND post.dateline > " 
. (TIMENOW $vbulletin->options['xen_dp_timespan'] * 60) . "
            AND post.visible = 1 AND deletionlog.primaryid IS NULL
            AND post.postid <> 
$post[postid]
        ORDER BY post.dateline DESC
        LIMIT 1
    "
);

    if (
$doublepost['userid'] == $vbulletin->userinfo['userid'] AND $doublepost['attach'] == 0)
    {
        
// we truely have a doublepost, now check if the merged post still fits the rules!
        
$dpdataman =& datamanager_init('Post'$vbulletinERRTYPE_ARRAY'threadpost');
        
$dpdataman->set_existing($doublepost);
        
$doublepost['message'] = $doublepost['pagetext'] . "\n\n[SIZE=\"1\"][COLOR=\"Silver\"]" $vbulletin->userinfo['username'] . ' added ' intval((TIMENOW $doublepost['dateline'])/60) . ' Minutes and ' . ((TIMENOW $doublepost['dateline']) % 60). ' Seconds later...' $vbulletin->options['xen_dp_spacer'] . "[/COLOR][/SIZE]\n\n" $post['message'];

        
// set info
        
$dpdataman->set_info('preview'$post['preview']);
        
$dpdataman->set_info('parseurl'$post['parseurl']);
        
$dpdataman->set_info('posthash'$post['posthash']);
        
$dpdataman->set_info('forum'$foruminfo);
        
$dpdataman->set_info('thread'$dp_threadinfo);

        
// set options
        
$dpdataman->setr('showsignature'$post['signature']);
        
$dpdataman->setr('allowsmilie'$post['enablesmilies']);

        
// set data
        
$dpdataman->setr('pagetext'$doublepost['message']);
        
$dpdataman->setr('iconid'$post['iconid']);

        
$dpdataman->pre_save();
        if (!
$dpdataman->errors)
        {
            
// merged post is ok, so actually do the merging by editing old post
            
$vbulletin->GPC['xen_isdoublepost'] = true;

            if (
$vbulletin->options['xen_dp_bumpthread'])
            {
                
// bump thread, so change the post's dateline
                
$doublepost['dateline'] = TIMENOW;
                
$dpdataman->setr('dateline'$doublepost['dateline']);
            }
            
$dpdataman->save();

            
// as we have edited an old post, we can now delete the new created post
            
$postman =& datamanager_init('Post'$vbulletinERRTYPE_SILENT'threadpost');
            
$postman->set_existing($post);
            
$postman->delete($foruminfo['countposts'], $threadinfo['threadid'], $removaltype true, array('userid' => $vbulletin->userinfo['userid'], 'username' => $vbulletin->userinfo['username'], 'reason' => $vbulletin->options['xen_dp_editedby'], 'keepattachments' => false), false);
            unset(
$postman);

            
$doublepost['oldmessage'] = $post['message'];
            
$post $doublepost;
            
$id $post['postid'];

            
//now add edited by message
            
if ($vbulletin->options['xen_dp_editedby'] != '')
            {
                
$vbulletin->db->query_write("
                    REPLACE INTO " 
TABLE_PREFIX "editlog (postid, userid, username, dateline, reason)
                    VALUES (
$post[postid], " $vbulletin->userinfo['userid'] . ", '" addslashes($vbulletin->userinfo['username']) . "', " TIMENOW ", '" addslashes($vbulletin->options['xen_dp_editedby']) . "')
                "
);
            }

            
// last step update counters
            
build_thread_counters($post['threadid']);
            
build_forum_counters($foruminfo['forumid']);
        }
    }



mauro1947 11-07-2007 04:33 AM

Anyone knows how to disable to a certain user (mauro1947 for example)???
Thanks
Regards!


All times are GMT. The time now is 10:30 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.02419 seconds
  • Memory Usage 1,902KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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