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)

JohnBee 05-03-2006 12:52 PM

Okay, its working now :D

I got this
JohnBee added after 1349 Minutes and 9 Seconds
Another try
JohnBee added after 1349 Minutes and 15 Seconds
hadee yadee
JohnBee added after 1352 Minutes and 5 Seconds
df sdfs

The times are a little muddled, also I wanted to ask if accepted vb or html formatting or do I have to use another approach to change the character styling of the message?

Xenon 05-03-2006 04:59 PM

you can use vb code in that messages

it is just creating one post wich contains that message, so everything which can be within a normal post posted by a user can be used :)

Eagle Creek 05-03-2006 07:52 PM

Looks nice!

But are admins/smods ignored from this hack atm?

JohnBee 05-04-2006 01:17 PM

Quote:

Originally Posted by Xenon
you can use vb code in that messages

it is just creating one post wich contains that message, so everything which can be within a normal post posted by a user can be used :)

Okay great and thank you for your support on this mod.
Any idea why its giving me large minute values instead of the accurate times?

MixMakers 05-04-2006 09:22 PM

Hack nearly worked flawlessly except there is a <br> after every edited message:

http://img54.imageshack.us/img54/1473/a0la.jpg

bada_bing 05-05-2006 11:49 AM

When is this hack going to be updated and pulled from beta? A new version with some new features would be nice

JohnBee 05-05-2006 01:44 PM

How can I add a space (linebreak) before and after the message?

for example instead of this:
JohnBee added after 1349 Minutes and 9 Seconds later...
Oh and btw this is a double post!
lbla bla bla blabla blabla lbla bla blabla blabla blabla lbla bla blabla blabla
lbla bla bla blabla lbla blabla bla blablabla blabla
JohnBee added after 1349 Minutes and 15 Seconds later...
hadee yadee yadaa yeeha haha

-

I would like to have this:

JohnBee added after 1349 Minutes and 9 Seconds later...

Oh and btw this is a double post!
lbla bla bla blabla blabla lbla bla blabla blabla blabla lbla bla blabla blabla
lbla bla bla blabla lbla blabla bla blablabla blabla

JohnBee added after 1349 Minutes and 15 Seconds later...

hadee yadee yadaa yeeha haha


Okay, nevermind.. I fixed it :D

JohnBee 05-05-2006 02:03 PM

Xenon I turned off all Ajax features for my board and suprizingly the script still placed the automerged message on the thread is though it was still on (weird) any ideas why this happened?

Xenon 05-05-2006 03:05 PM

@John: linebreak: just add more \n to the message, each \n is a linebreak

no idea about the high minute values, actually that should work...

Automerged message: i think we are talking about something different, it sounds to me now that you mean the edited by message, which can be disabled as an option ;)

@Mixmaker: that doesn't happen on a default version, so i assume you have added a <br> somewhere, where it cannot be added.

@Eagle: nope, not per default

@badabing: when i have the time ^^

JohnBee 05-05-2006 03:52 PM

Okay I found that (edited by reason) setting and it did alter that portion of the script function however what I meant is.. on my older file based script when people would double post using quick reply the screen would refresh and the merger was there.

With this newer script however it uses Ajax and you immediately see the seperate threads until the thread is refreshed. I wondered if it was possible to simply imvoke a screen refresh when automerging is invoked instead of waiting until its done manually?

I hope this makes more sense.

Xenon 05-05-2006 03:53 PM

yep, and the solution to to an automatic refresh after a post is posted here, iirc, just search the first pages of the thread, it was in them :)

JohnBee 05-05-2006 04:19 PM

Okay thanks.

I was aware of this post

Code:

// ########### Xenon Modified Prevent Doublepost Hack #########
    $dp_settings = array(
        'timespan' => 3600 * 24, // how many seconds after the last post the new post is defined as doublepost (default: 24 hours)
        'spacer' => "\n\n Additional Comment: \n",    // What should be between the old post and the new one (default: two empty lines). Note: PersianImmortal has added Additional Comment: \n to make it clear what is being added each time - can be removed if you wish.
        'editedbymsg' => '[Automerged Doublepost]', // If left blank no edited by will appear
    );
   
    $isdoublepost = false;
    $oldmsg = $post['message'];

    if ($type != 'thread'
        AND $threadinfo['lastpost'] > TIMENOW - $dp_settings['timespan']
        AND $threadinfo['lastposter'] == $vbulletin->userinfo['username'])
    {
        // 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 threadid = $threadinfo[threadid]
                AND dateline > " . (TIMENOW - $dp_settings['timespan']) . "
                AND visible = 1 AND deletionlog.primaryid IS NULL
            ORDER BY dateline DESC
            LIMIT 1
        ");
   
        if ($doublepost['userid'] == $vbulletin->userinfo['userid'])
        {
            // we truely have a doublepost, now check if the merged post still fits the rules!
            $dataman2 =& datamanager_init('Post', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
            $dataman2->set_existing($doublepost);
            $post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . $post['message'];
           
            // set info
            $dataman2->set_info('preview', $post['preview']);
            $dataman2->set_info('parseurl', $post['parseurl']);
            $dataman2->set_info('posthash', $post['posthash']);
            $dataman2->set_info('forum', $foruminfo);
            $dataman2->set_info('thread', $threadinfo);
   
            // set options
            $dataman2->setr('showsignature', $post['signature']);
            $dataman2->setr('allowsmilie', $post['enablesmilies']);
   
            // set data
            $dataman2->setr('pagetext', $post['message']);
            $dataman2->setr('iconid', $post['iconid']);
   
            $dataman2->pre_save();
            if (!$dataman2->errors)
            {
                // merged post is ok, so do merging
                $isdoublepost = true;
                unset($dataman);
                $dataman =& $dataman2;
                $post['postid'] = $doublepost['postid'];
            }
            else
            {
                // merging will produce errors so keep it as a single post..
                $isdoublepost = false;
            }
        }
    }
   
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', true, false));
    } 
    else
    {
        // no doublepost so save as new post
        $post['message'] = $oldmsg;
        $id = $dataman->save();
    }

This was for the file based edit however, for kicks I replaced my Main Doublepost Prevent Engine contente with this one :p
it wasn't pretty. I did a search within the thread for auto refresh and I did find 2 results but no reference with code changes other than the one shown above. am I missing it?

MixMakers 05-05-2006 04:32 PM

I tried uninstalling/reinstalling because it didn't seem to work, and now when I try to import the xml, i get this error:

XML Error: mismatched tag at Line 6

Xenon 05-06-2006 01:43 PM

sounds like a corrupted xml file, redownload it again might help :)

JohnBee 05-06-2006 02:08 PM

Quote:

Originally Posted by Xenon
yep, and the solution to to an automatic refresh after a post is posted here, iirc, just search the first pages of the thread, it was in them :)

What does iirc mean?
and I was unable to find an auto refresh function that I could incorporate into the plugin system.

vitnuce 05-06-2006 02:50 PM

Hi Xenon,

Does this hack work with v3.5.4 ?

- v

JohnBee 05-06-2006 03:05 PM

Quote:

Originally Posted by vitnuce
Hi Xenon,

Does this hack work with v3.5.4 ?

- v

Yes I'm using it on 3.5.4, its fine

Xenon 05-06-2006 04:32 PM

iirc = if i remember correctly

i just think it was posted here, but not by myself, because the things i wanted to do didn't work out as they should

JohnBee 05-06-2006 04:55 PM

Quote:

Originally Posted by Xenon
iirc = if i remember correctly

i just think it was posted here, but not by myself, because the things i wanted to do didn't work out as they should

Ah okay well thanks, I learned a new thing today iirc ;)
I have the script looking beautifully and other than the lacking autorefresh feature its way nicer than my last file edit based version. However I do miss the auto refresh option though... I wish it came as an option under the CPanel so that way we could use it as an option.

As it is now, my members are a bit confused when they see the merged message and multiple post windows within the thread. So what happens is they try to edit it and then are even more confused afterwards... (its a mess) and yes... they are not all that technical, but I still love them :p

Anyways I would be more than happy with an edit in the plugin section if you could help me have it refresh after the double post feature is activated though. I tried on my own and although i did get it to autorefresh it was very nasty looking because it would created double, triples, and more everytime. lol

Any idea what command or edit I could add to the existing script to have it auto refresh?

Xenon 05-06-2006 05:26 PM

well, nope, as i said, my tests didn'T work out well, thats why i did it the "ghost post" way ;)

JohnBee 05-06-2006 06:14 PM

Quote:

Originally Posted by Xenon
well, nope, as i said, my tests didn'T work out well, thats why i did it the "ghost post" way ;)

Aah now I understand :)
Okay well... then I guess this will have to do...

I guess in a worst case scenario I could revert to using the file edit version.
Any chance of members getting it as an alternate version from you Xenon?

moep 05-07-2006 06:21 PM

hi,

i´m new in all this and i wanna know if following is possible wih this hack & maybe how!?

an user edits an old post which is already @ page 15 for example. does the thread show up again then on top of the first page after editing only?

thx for your help

greetz

JohnBee 05-07-2006 06:31 PM

Quote:

Originally Posted by moep
hi,

i?m new in all this and i wanna know if following is possible wih this hack & maybe how!?

an user edits an old post which is already @ page 15 for example. does the thread show up again then on top of the first page after editing only?

thx for your help

greetz

There is an option that bumps the thread as new if the doublposting feature is used, its a setting in the options menu under cpanel

Coast to Coast 05-08-2006 02:25 AM

Installed on the Above Top Secret forum -

GreysAnatomy 05-08-2006 09:13 AM

Thanks a lot. Using 3.5.4 and it works like a charm! Didn't take more than 1 minute to install! :D

Xenon 05-08-2006 12:45 PM

@John: sorry, but i already have problems with my time to support one version of a hack, i cannot give out two versions...

JohnBee 05-08-2006 12:47 PM

Okay

Well I guess this version is better than nothing under 3.5.4
I hope we could get auto refresh in the future perhaps as an option :)

thanks for the reply and for a great hack!

moep 05-08-2006 08:07 PM

Quote:

Originally Posted by JohnBee
There is an option that bumps the thread as new if the doublposting feature is used, its a setting in the options menu under cpanel

hmm doesn?t work here when i just edit my first post of an old thread!?

you mean this one or?

Bump thread
Do you want a thread beeing bumped by a doublepost, or should it be a real edit?


greetz

Boofo 05-09-2006 12:17 AM

Can we add multiple conditionals in the settings? If so, how? ;)

jndeakin 05-09-2006 10:34 AM

Sorry, but 32 pages is too much to read through to check for a feature, but this isn't mentioned in the description post.
Merging two consecutive posts is good, but if the user has accidentally posted a duplicate entry rather than a follow-up would this recognise it and delete one?

Jim Deakin

Boofo 05-09-2006 10:44 AM

Quote:

Originally Posted by jndeakin
Sorry, but 32 pages is too much to read through to check for a feature, but this isn't mentioned in the description post.
Merging two consecutive posts is good, but if the user has accidentally posted a duplicate entry rather than a follow-up would this recognise it and delete one?

Jim Deakin

LOL 32 pages is nothing. We had to read through that in my day just to get to the thread title. ;)

JohnBee 05-09-2006 11:33 AM

Quote:

Originally Posted by jndeakin
Sorry, but 32 pages is too much to read through to check for a feature, but this isn't mentioned in the description post.
Merging two consecutive posts is good, but if the user has accidentally posted a duplicate entry rather than a follow-up would this recognise it and delete one?

Jim Deakin

I think vBulletin catches dupe posts before the MOD does. Seems to me I tested it out, either way you can freely edit the merged thread as second alternative.

Xenon 05-09-2006 04:17 PM

exactly, dupe checking is done by vbulletin before my mod starts working :)

Boofo 05-09-2006 04:20 PM

Quote:

Originally Posted by Xenon
exactly, dupe checking is done by vbulletin before my mod starts working :)

Stefan, while your here, how do we do multiple conditions in the setting for this?

Xenon 05-09-2006 04:42 PM

well, that condition will be added DIRECTLY into the code, so use AND tags ;)

Boofo 05-09-2006 04:43 PM

Quote:

Originally Posted by Xenon
well, that condition will be added DIRECTLY into the code, so use AND tags ;)


Ahhh, so we use AND before every condition or just after the first one?

beebi 05-09-2006 09:15 PM

Quote:

Originally Posted by Boofo
Ahhh, so we use AND before every condition or just after the first one?

I used

PHP Code:

$dp_threadinfo['lastposter'] != $dp_threadinfo['postusername'] AND !can_moderate() 

for the thred starter AND every one can edit the post ;)

Boofo 05-09-2006 09:28 PM

Quote:

Originally Posted by beebi
I used

PHP Code:

$dp_threadinfo['lastposter'] != $dp_threadinfo['postusername'] AND !can_moderate() 

for the thred starter AND every one can edit the post ;)

What is the dp for in the following?

Quote:

$dp_threadinfo
I've never seen that before.

Smiry Kin's 05-10-2006 03:23 AM

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! :(

Smiry Kin's 05-10-2006 03:35 AM

( just checked cableforum.co.uk) and theres comes up ass

---------- Post added at 05:32 ---------- Previous post was at 05:32 ----------

thats good..? lol


All times are GMT. The time now is 10:08 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.02223 seconds
  • Memory Usage 1,854KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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