PDA

View Full Version : Prevent Doubleposting


Pages : 1 2 3 [4] 5

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?

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 (http://www.nuhit.com/nuwiki/features.html) 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
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.php?p=1341668&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
Any Idea how to excluded a ForumID from beeing affected?



It collides at NuWiki (http://www.nuhit.com/nuwiki/features.html) 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
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.

// ########### 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', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$dpdataman->set_existing($doublepost);
$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'];

// 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', $vbulletin, ERRTYPE_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!

eoc_Jason
11-08-2007, 04:45 PM
i would love it if when someone double posts and it is merged it would time stamp the merge

The problem with that is whatever time would only be relevant to a particular time zone. So people in other TZ's would only be confused. You might want to consider that. Some people suggested adding the time difference so it would be like (added 1hr later...)

Paul M
11-08-2007, 04:59 PM
The Timezone problem can be got around (like here for example).

eoc_Jason
11-09-2007, 03:53 PM
The only way though would be to NOT cache the posts though. Because otherwise whoever viewed the post it would be parsed & cached for their time zone.

About the only way I can see doing this and leaving caching on would be to make some sort of javascript?

Paul M
11-09-2007, 06:20 PM
The system we use works whether posts are cached or not, and has no reliance on Javascript.

too_cool_3
11-12-2007, 04:07 AM
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.

// ########### 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', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$dpdataman->set_existing($doublepost);
$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'];

// 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', $vbulletin, ERRTYPE_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']);
}
}
}

Thank you SO much Kalina for solving my problem. Just tried your method and it works perfect!

My double posts now show up as:

MarcGSR added 1 Minutes and 2 Seconds later...

But still no one has answer if there is a way to time stamp them like this:

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

???

eoc_Jason
11-12-2007, 12:48 PM
The system we use works whether posts are cached or not, and has no reliance on Javascript.

Could you please elaborate, or better yet post some code? :)

Mafialife Chris
11-20-2007, 03:31 AM
Can someone give me a step by step in dummies terms to make this happen on my forum. This includes any actions i would need to do with my FTP and files on the server. I just do not know what to do, sorry. help?

eoc_Jason
11-20-2007, 12:25 PM
Install the product via the XML upload. Configure settings in your new additional admincp options. That's it...

coolgus
11-21-2007, 10:34 AM
any fix for the quick reply refresh problem ?

Jikdor
11-24-2007, 09:25 PM
*installed*

Black Tiger
11-25-2007, 08:20 PM
Question: Ik would like to have the "xxx added xx minutes and xx seconds later" in bold. Where (and how) is the best place to adjust this so it will be kept in bold after for example a future update of this mod? If possible ofcourse.

Squiddy
11-30-2007, 08:09 PM
Installed on 3.6.8 and it works beautifully!

Kalina
12-01-2007, 12:40 AM
Question: Ik would like to have the "xxx added xx minutes and xx seconds later" in bold. Where (and how) is the best place to adjust this so it will be kept in bold after for example a future update of this mod? If possible ofcourse.

I posted the code to change that text, the code is quote above and it's also on the previous page, you can simply add the bold bbcode tags to what I have there.

Black Tiger
12-01-2007, 03:27 PM
Thank you Kalina but unfortunately I'm not that good in php. Maybe you can help me a little bit further?
I presume you mean this part (I took the original one)
$dpdataman->set_existing($doublepost);
$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'];

What or where should I change it? Should I just change it into this?

[ b]$dpdataman->set_existing($doublepost);
$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'][ /b];


Or should it be done another way?

Edit: I just see that the code tag doesnt prevent the code from being bold. I put the [ b] tag in front of $dpdataman and the [ /b] tag before the last ; and the end of the line. Ofcourse if this is correct I have to remove the whitespace before the b and the /b.

Kalina
12-02-2007, 02:58 AM
BlackTiger, in my code posted above, you'd change this line:
$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'];

To

$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'];

All I did was add the bold bbcode tags to my existing code from above. Hope that helps you. :)

Black Tiger
12-02-2007, 01:10 PM
Oke thanks I'm going to have a try, but I did not find the "[COLOR=\"Silver\"]" in the original plugin which I would like to keep as original as possible. But I will have a try then, thanks!

Black Tiger
12-02-2007, 01:31 PM
Sorry, I tried but then my quickreply option will give errors. I don't have a [color= thing in my plugin, it looks exactly like I posted in my reply above.

I did it like this:
$dpdataman->set_existing($doublepost);
$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'];

So this is not the right way I'm doing something wrong but I don't know what.
I also tried at the same places without the " signs before or after the bold tags, but same problem occurs.

Kalina
12-03-2007, 03:56 PM
Sorry, I tried but then my quickreply option will give errors. I don't have a [color= thing in my plugin, it looks exactly like I posted in my reply above.

I did it like this:
$dpdataman->set_existing($doublepost);
$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'];

So this is not the right way I'm doing something wrong but I don't know what.
I also tried at the same places without the " signs before or after the bold tags, but same problem occurs.

There should not be a quote between the \n\n and [*b*] on neither side. I'll have to post the full code for you in a bit, I can't post a little example, it's getting parsed.

Kadence
12-03-2007, 04:05 PM
This may have been posted but I couldn't find it. How do you make moderators and admins immune to this?

Here's my current main engine 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', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$dpdataman->set_existing($doublepost);
$doublepost['message'] = $doublepost['pagetext'] . "\n" . $vbulletin->options['xen_dp_spacer'] . "\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', $vbulletin, ERRTYPE_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']);
}
}
}

Kalina
12-03-2007, 04:13 PM
BlackTiger, here's the code to make it bold, if you don't want the size and silver color, simply remove those tags, don't add anything.

// ########### 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', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$dpdataman->set_existing($doublepost);
$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'];

// 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', $vbulletin, ERRTYPE_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']);
}
}
}

Black Tiger
12-03-2007, 08:47 PM
@Kalina
Thanks, I put it now like this as in your example:
"\n\n [ b]"
And at the end also as in your example.
And this seems to work, no errors anymore.
Can't post it here because it gets parsed too. But it seemd to have done the trick.

Many thanks for the explanation!

Artes_Marciales
12-08-2007, 12:38 PM
Thanks! :)

Keyser S?ze
12-13-2007, 11:04 AM
these things may have been posted, but wouldnt it be nice a product update?

anyways, some useful things i think -

ability to set a amount of time before thread is bumped with merged double post

a timestamp on the double post lke "added 11:47 am 12/25/2007"

nothing4me
12-23-2007, 06:31 PM
Works great on 3.6.8 :)
(Enable it in the product manager as it is disabled by default!)

ViViD
12-27-2007, 06:37 AM
Hello ,
How can I limit this hack to certain user IDs or 'additional' Usergroups ?

Qamdad
01-02-2008, 09:43 PM
Please can you edite it to work with 3.6.8 beacuse I try to edite by there is some error massege occure or it dose no work at all so can you edite it to looks like vb.org

Qamdad
01-02-2008, 09:43 PM
I mean this one silver with date only like what you see above

MiahBeSmokin420
01-03-2008, 12:16 AM
why on 3.6.7 its works like it will merge the posts

but

it will still leave the reply there to

so accually its not merging them its merging one of them but still leaving a copy of the merged post under the merged post as if it was a regular reply

Keyser S?ze
01-03-2008, 09:41 AM
when i was using 367 it did not do that, im using 368 now and this mod works fine

check and ensure u got it installed properly

awdawd
01-06-2008, 08:32 AM
no work Doublepost + vB Lightbulbs

Alfa1
01-12-2008, 04:01 AM
Does this work on vb 3.7?

Black Tiger
01-17-2008, 10:19 PM
Suggestion: Change the way time is displayed depending on the amount of time which is passed when a users writes his second reply after the initial post/reply.
I mean the following:
I've got my limit on 20 hours, so if a user writes a reply after some 14 hours and minutes it will be displayed like this
testuser added 888 Minutes and 26 Seconds later...

Now it would be nice to let only be shown minutes and seconds before an hour is over. So it would show the messages as followd after for example 63 minutes:
testuser added 1 Hour and 3 Minutes later...

Or for whoever likes it:
testuser added 1 Hour, 3 Minutes and 12 seconds later...

I guess this would not be difficult to make bye a IF/THEN statement in the code.
IF time >60... etc.. Ik wouldn't know exactly I'm not a coder.

Is there a way to implement this in a next version or if not, a way I can adjust the code myself to change it like this?
I have seen it with "hours" and "minutes" on some forum, just can't remember which forum.

redfox2010
01-19-2008, 11:38 AM
installed.

TPOCJames
01-21-2008, 01:36 PM
Works perfectly in 3.7.

Boofo
02-01-2008, 07:34 AM
Of course it does. The Master wrote it. ;)

haytham
02-05-2008, 08:06 PM
not working for me on 3.6.8 though....posters keep doubling and nothing happens.

Boofo
02-05-2008, 08:07 PM
That's strange as this works great in 3.7.0 beta 4.

haytham
02-05-2008, 08:53 PM
Sorrrrrrrrrrry. My bad. The product was disabled by default. I enabled it and now it's working. Just 1 thing though. The message that will appear to the members..can't I make it another colour..red for ex. I tried this:
<Font Color = "Red">message</Font> but it didn't work.

Boofo
02-05-2008, 09:20 PM
There are a couple of posts in this thread that tell you how to change the color and even give you some code to do it. Don't ask me which posts as I spent the good part of the night I installed this carefully going over the thread for any problems and fixes. I didn't save any links to the post with the info, sorry. ;)

Puntoboy
02-09-2008, 07:14 PM
Not sure if this has been answered yet, but is there any way to prevent this merging posts in certain forums?

Keyser S?ze
02-19-2008, 07:16 AM
can anyone explain how to timestamp a double post? damn an update to add that would be great :)

MiahBeSmokin420
02-19-2008, 09:48 PM
ok o got problems that still are not solved after reading almost every post in this thread

Details

VB Version 3.6.8

1) When person post a reply not using the quick reply they get a white page that says flood. In quick reply that dose not happen just shows a redirect page which is fine. Can this be changed?


2) no matter what when someone double posts it auto merges the 2 posts which is what it is suposed to do ok

but

it also leaves a copy of the post under the merged post

so now not only have the posts been merged but now there are technically 2 post the same in the thread

here is a demo of what happened
CLICK HERE TO SEE THE RESULTS OF THE AUTOMERGE (http://stillfallinentertainment.com/vB-Forums/showthread.php?t=2177)

Any support would be great cause i now have this uninstalled untill we can resolve this

Boofo
02-19-2008, 10:05 PM
You've got another hack installed that is fighting with it.

Also, did you check the settings for it in the Admin CP?

MiahBeSmokin420
02-19-2008, 10:51 PM
yes i checked the setting in the admin cp as far as i know they are set right

any suggestion on what kinda mod would have a effect on this?

i will try to post a list of the mods that i use

mariocaz
02-21-2008, 01:23 AM
Is not working for me, also I re-installed it with another file that a user put here and also is not working in my 3.6.8 patch level 2, I don´t know how to check if it is disable, but the file that also put here another users mentioned that is enabled.

I don´t know how to get this mod works in my forum, help.

mariocaz
02-21-2008, 01:30 AM
I reinstalled it with this file that is enabled it by default and also nothing happens in my forum, any other idea ?

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. POST #756

mariocaz
02-21-2008, 08:51 PM
Help!!! :)

mariocaz
02-22-2008, 08:15 PM
Bump, please help us.

guv2000
02-27-2008, 05:31 PM
Works great on 3.6.8 :)
(Enable it in the product manager as it is disabled by default!)

thnx.

bigcurt
03-04-2008, 08:09 PM
Option to set which forum it works in by chance?

Black Tiger
03-04-2008, 08:47 PM
Yes you can exclude forums in which you don't want it to work.

Boofo
03-04-2008, 09:08 PM
Has anyone come up with a good line for adding to the post for this?

mariocaz
03-05-2008, 12:12 AM
The same question as Boofo, will be great if somebody have a line like this forum have.

regitbull
03-05-2008, 06:31 PM
Has anyone come up with a good line for adding to the post for this?

The same question as Boofo, will be great if somebody have a line like this forum have.

To answer both post you can found it 1 page back.
I also wanted to know how to do it and its 2 pages back.

Find this code:
$doublepost['message'] = $doublepost['pagetext'] . "\n" . $vbulletin->options['xen_dp_spacer'] . "\n" . $post['message'];

Replace it with this
$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'];

Thats all :)

Boofo
03-05-2008, 11:47 PM
That does minutes and seconds, not the date and time like on here.

mariocaz
03-05-2008, 11:51 PM
And also I don´t know why in my forum don´t appears in little size and blue.

Black Tiger
03-06-2008, 12:01 AM
I would rather have xx hours and xx minutes later then xx minutes and xx seconds or a date.
So if anybody has a solution to the line for hours and minuts I would appreciate it.

@Mariocaz: It does not appear in color standard as far as I know, at least on my forums it only appears in bold and black like normal text, so I would like the option for coloring the line too if anybody knows how to do this.

EagleNick
03-06-2008, 01:21 AM
Works great! :D

Yes, be sure to manually enable the plugin, because it is disabled by default.

Saviour
03-06-2008, 03:51 PM
Okay...

I see we have 55 pages of posts here...and to be honest...I'm lazy and don't feel like searching through every post to find a resolution to the issues I'm facing with this mod.

I'm currently running vb 3.6.8 PL2 and this mod is working...other than for the problems listed below:

1. The Quick Reply feature...which I have read about, here in this thread, but don't believe the fix is specifically for my version of vbulletin...I could be wrong, but if someone could let me know...I'd much appreciate it.

2. If a person does double-post, then the auto merged post is not included in the New Posts if doing a search for new posts.

3. I also want the following line added as the separation for the merged posts:

On [Today's Date] at [The Current Time] [username] added...

So, if anyone, with kindness in their heart, would like to assist me with this...again, I'd really appreciate it. You don't even have to be kind, really...just have a willingness to help...LOL!

Black Tiger
03-06-2008, 04:18 PM
Hmm..... I'll see if I can have a try answering you.

1.) I don't know of any fix, mine was running non 3.6.8 pl2 fine without any fix as far as I know. But I'm not sure if my users used the quickreply so maybe you need the fix.

2.) That's normal behaviour, a merge post is in fact not a new post but an edited post. Edited post do not show up as new posts.

3.) A few more users asked that one, so we have to wait until somebody answers how to code such line.:)

I was not much of a help for you, except maybe by explaining question 2, but he... every little bit of help is something.;)

Saviour
03-06-2008, 04:58 PM
Thanks for getting back to me...

The Quick Reply problem is when someone does double post using Quick Reply, but the post shows as an additional post until the page is refreshed...then it shows as "merged".

There were two replies to this problem...one was to turn the Ajax features off...and the other was a code modification for vbulletin 3.5. So the code modification will not work...unless someone is using code for 3.6.8 PL2 of which I'm not aware.

As far as your statement goes about an editied post not showing as a new post...that's not true. An edited post will show as a new post...at least for 3.6.8 PL2 it does.

And as for the third problem...I guess I'll just sit back and watch the support come pouring in...LOL! Just kidding.

Again...thanks for the help...it's greatly appreciated...

Saviour
03-06-2008, 07:03 PM
Okay...

I've enabled "Disable Problematic Ajax Features" through the Admin CP...this seems to have taken care of the refresh problem. Hopefully, it won't cause any issues anywhere else. So #1 is taken care of.

As for #2...It doesn't matter whether this gets addressed or not...it's not really that important.

As for #3...I hope someone can provide me with the code I need to make it happen.

Thanks in advance...

bada_bing
03-10-2008, 06:36 PM
How can I exclude certain forums from using this hack? Example I only want my selling and trading forums to use this hack and not my other forums???

Black Tiger
03-10-2008, 09:49 PM
As far as your statement goes about an editied post not showing as a new post...that's not true. An edited post will show as a new post...at least for 3.6.8 PL2 it does.
That depends. It can do that, but then you have to put the "Bump Thread" setting to "yes". And standard it is set to no.
You could try setting this to "no" if you have it to "yes" and you don't want it as a new post.

I had running 3.6.8 pl2 before, at this moment I'm running 3.7.0 b5.

princeedward
03-21-2008, 08:05 AM
let's try this...thanks... ;)

Alfa1
03-27-2008, 10:48 AM
Does this work on vb 3.7?
Please add a function to exclude forums.

Black Tiger
03-27-2008, 02:20 PM
It does work on 3.7. Could be some template text is slightly changed, but it does work. I've got it running on 3.7.0 b6. But I'm using the TMS which is an enormous releave for mods for which template edits are needed.
No more reverting and editting again when upgrading vBulletin.

bada_bing
03-27-2008, 03:53 PM
Does this exclude Mods, Smods & Admin or is this hack for all usergroups ?

mariocaz
03-29-2008, 05:25 AM
Yes you can exclude them.

mum2gem
03-31-2008, 11:23 AM
ever since adding this to my forum, no one can edit there posts, no one can go advanced
can anyone help and tell me why and how to fix it??

bada_bing
03-31-2008, 11:51 AM
Yes you can exclude them.

How and where do you do that... Also can you exclude certain forums

Thomas P
03-31-2008, 07:19 PM
Is this modification used here?

I saw that there is something similar (or this) in place here, right?

Paul M
03-31-2008, 07:29 PM
An custom version is used here in some forums.

bada_bing
04-01-2008, 11:30 AM
An custom version is used here in some forums.

Would be nice if vb.org can release it...

Thomas P
04-01-2008, 12:14 PM
Yes, indeed :)

Paul M
04-01-2008, 03:51 PM
I dont have the time to seperate it out atm, and we could not do it without Xenons permission anyway.

Keyser S?ze
04-01-2008, 07:31 PM
throwing in my useless opinion here but to me if a mod is not supported then it really shouldnt matter if someone else releases an enhanced version of it

unless the thread asks not to or it plans to be supported in some way

Thomas P
04-02-2008, 08:06 AM
Well, I agree with Paul - Xenon should be asked beforehand.

I could do this, no problem, if you want, but Paul (sadly) doesn't have the time atm.

@Paul: Please come back to us, if you have the time to work on this :)

Boofo
04-02-2008, 09:22 AM
I already have this working flawlessly on 3.7.0 RC2. ;)

Hornstar
04-04-2008, 03:13 PM
I already have this working flawlessly on 3.7.0 RC2. ;)

Default? or did you modify this?

If you modified it, can you get permission and release it, I am looking to ugpade soon, and just making sure all my hacks are ready to go with 3.7

puertoblack2003
04-05-2008, 04:29 PM
My members has informed me that when they accidentally double posted a white page appears and the top left corner It say "FLOOD".

So i check the in message posting and its set it set to 30 so i don't know where else to check.

any info will be great

Black Tiger
04-05-2008, 11:56 PM
Default? or did you modify this?
I got it working on 3.7.0 beta 6 default, without changing things. Does that help you?

Alfa1
04-06-2008, 12:04 AM
I could do this, no problem, if you want
Would it be hard to change the code so that this mod would only work in selected forums?

I am testing out yoyoyoyo's version (https://vborg.vbsupport.ru/showpost.php?p=1372846&postcount=756). It has a field in the options called 'Additional Condition'. Can this be used to exclude forums?

Suggestion: Change the way time is displayed depending on the amount of time which is passed when a users writes his second reply after the initial post/reply.
I mean the following:
I've got my limit on 20 hours, so if a user writes a reply after some 14 hours and minutes it will be displayed like this
testuser added 888 Minutes and 26 Seconds later...

Now it would be nice to let only be shown minutes and seconds before an hour is over. So it would show the messages as followd after for example 63 minutes:
testuser added 1 Hour and 3 Minutes later...

Or for whoever likes it:
testuser added 1 Hour, 3 Minutes and 12 seconds later...

I guess this would not be difficult to make bye a IF/THEN statement in the code.
IF time >60... etc.. Ik wouldn't know exactly I'm not a coder.

Is there a way to implement this in a next version or if not, a way I can adjust the code myself to change it like this?
I have seen it with "hours" and "minutes" on some forum, just can't remember which forum.
AFAIK the above version does this.

Yes you can exclude forums in which you don't want it to work.
Could you please explain how?

Noctavia
04-06-2008, 12:35 PM
After reading back the past 10 pages, it seems there is still no reply to making the merged text read:

--------------- Added 6 April 2008 at 7:17pm ---------------

Anyone managed to get that working?

bada_bing
04-11-2008, 07:44 PM
I have tried to install this in my vb 3.5.x site and I get this error anyone know what this is and how to fix it

Database error in vBulletin 3.5.3:

Invalid SQL:

### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO plugin
(`active`, `executionorder`, `title`, `hookname`, `phpcode`, `product`)
VALUES
('1', '5', 'Main Doublepost Prevent Engine', 'newpost_complete', '// ########### Xenon\'s prevent doublepost modification #########\r\n\r\n$vbulletin->GPC[\'xen_isdoublepost\'] = false;\r\n\r\n// parse custom conditions\r\n$custcond = true;\r\nif (trim($vbulletin->options[\'xen_dp_custcond\']) != \'\')\r\n{\r\n eval(\'$custcond = ((\' . $vbulletin->options[\'xen_dp_custcond\'] . \') ? true : false);\');\r\n}\r\n\r\n\r\n// at first check if there is at least the possibility to be a doublepost\r\nif ($custcond AND $type != \'thread\'\r\n AND $dp_threadinfo[\'lastpost\'] > TIMENOW - $vbulletin->options[\'xen_dp_timespan\'] * 60\r\n AND $dp_threadinfo[\'lastposter\'] == $vbulletin->userinfo[\'username\']\r\n AND $dataman->fetch_field(\'attach\') == 0)\r\n{\r\n // we are here, so we may have a doublepost -> do more exact checkings\r\n $doublepost = $vbulletin->db->query_first(\"\r\n SELECT post.*\r\n FROM \" . TABLE_PREFIX . \"post AS post\r\n LEFT JOIN \" . TABLE_PREFIX . \"deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = \'post\')\r\n WHERE post.threadid = $threadinfo[threadid]\r\n AND post.dateline > \" . (TIMENOW - $vbulletin->options[\'xen_dp_timespan\'] * 60) . \"\r\n AND post.visible = 1 AND deletionlog.primaryid IS NULL\r\n AND post.postid <> $post[postid]\r\n ORDER BY post.dateline DESC\r\n LIMIT 1\r\n \");\r\n\r\n if ($doublepost[\'userid\'] == $vbulletin->userinfo[\'userid\'] AND $doublepost[\'attach\'] == 0)\r\n {\r\n // we truely have a doublepost, now check if the merged post still fits the rules!\r\n $dpdataman =& datamanager_init(\'Post\', $vbulletin, ERRTYPE_ARRAY, \'threadpost\');\r\n $dpdataman->set_existing($doublepost);\r\n $doublepost[\'message\'] = $doublepost[\'pagetext\'] . \"\\n\" . $vbulletin->options[\'xen_dp_spacer\'] . \"\\n\" . $post[\'message\'];\r\n\r\n // set info\r\n $dpdataman->set_info(\'preview\', $post[\'preview\']);\r\n $dpdataman->set_info(\'parseurl\', $post[\'parseurl\']);\r\n $dpdataman->set_info(\'posthash\', $post[\'posthash\']);\r\n $dpdataman->set_info(\'forum\', $foruminfo);\r\n $dpdataman->set_info(\'thread\', $dp_threadinfo);\r\n\r\n // set options\r\n $dpdataman->setr(\'showsignature\', $post[\'signature\']);\r\n $dpdataman->setr(\'allowsmilie\', $post[\'enablesmilies\']);\r\n\r\n // set data\r\n $dpdataman->setr(\'pagetext\', $doublepost[\'message\']);\r\n $dpdataman->setr(\'iconid\', $post[\'iconid\']);\r\n\r\n $dpdataman->pre_save();\r\n if (!$dpdataman->errors)\r\n {\r\n // merged post is ok, so actually do the merging by editing old post\r\n $vbulletin->GPC[\'xen_isdoublepost\'] = true;\r\n\r\n if ($vbulletin->options[\'xen_dp_bumpthread\'])\r\n {\r\n // bump thread, so change the post\'s dateline\r\n $doublepost[\'dateline\'] = TIMENOW;\r\n $dpdataman->setr(\'dateline\', $doublepost[\'dateline\']);\r\n }\r\n $dpdataman->save();\r\n\r\n // as we have edited an old post, we can now delete the new created post\r\n $postman =& datamanager_init(\'Post\', $vbulletin, ERRTYPE_SILENT, \'threadpost\');\r\n $postman->set_existing($post);\r\n $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);\r\n unset($postman);\r\n\r\n $doublepost[\'oldmessage\'] = $post[\'message\'];\r\n $post = $doublepost;\r\n $id = $post[\'postid\'];\r\n\r\n //now add edited by message\r\n if ($vbulletin->options[\'xen_dp_editedby\'] != \'\')\r\n {\r\n $vbulletin->db->query_write(\"\r\n REPLACE INTO \" . TABLE_PREFIX . \"editlog (postid, userid, username, dateline, reason)\r\n VALUES ($post[postid], \" . $vbulletin->userinfo[\'userid\'] . \", \'\" . addslashes($vbulletin->userinfo[\'username\']) . \"\', \" . TIMENOW . \", \'\" . addslashes($vbulletin->options[\'xen_dp_editedby\']) . \"\')\r\n \");\r\n }\r\n\r\n // last step update counters\r\n build_thread_counters($post[\'threadid\']);\r\n build_forum_counters($foruminfo[\'forumid\']);\r\n }\r\n }\r\n}', 'xenon_prevdoublepost');

MySQL Error : Unknown column 'executionorder' in 'field list'
Error Number : 1054
Date : Friday, April 11th 2008 @ 03:41:11 PM
Script : http://www.mysite.com/forums/admincp/plugin.php
Referrer : http://www.mysite.com/forums/admincp/plugin.php?do=productadd
IP Address : 67.x.x.x
Username : **********
Classname : vb_database

Boofo
04-11-2008, 08:08 PM
You need to go through the XML and take out the executionorder settings as that wasn't introduced until a later version of vb. I would recommend upgrading.

shadowevil
04-12-2008, 01:48 AM
work fine with 3.7.x :)

bada_bing
04-12-2008, 02:13 AM
You need to go through the XML and take out the executionorder settings as that wasn't introduced until a later version of vb. I would recommend upgrading.

Boofo can you help me out by removing the correct code and posting the xml please... I know I should upgrade but with my site being extremely hacked and lots of members along with the site running good I am just no ready, maybe when version 3.7 comes out of beta I might concider.

Boofo
04-12-2008, 02:28 AM
Boofo can you help me out by removing the correct code and posting the xml please... I know I should upgrade but with my site being extremely hacked and lots of members along with the site running good I am just no ready, maybe when version 3.7 comes out of beta I might concider.

Try this:

bada_bing
04-14-2008, 07:07 PM
Try this:

You da man Boofo I will try it now..







Excellent it worked!!!!!!!!!!!!!!!!!!!!!

bada_bing
04-14-2008, 07:48 PM
Boofo

Thanks for your help I wanted to ask you another question, I wanted to exclude certain forums for example my sponsor forums from this double post hack. I have excluded the Mods by adding "!can_moderate()" in the Additional Conditions area of the hack in admincp. How and where can I exclude certain forums ?

thank you...

Alfa1
04-14-2008, 09:48 PM
I would really like to know as well.

Boofo
04-14-2008, 10:09 PM
Add this to the Additional Conditions:

in_array($threadinfo['forumid'], array(27,28)) AND can_moderate()


Adjusting it to your needs.

Alfa1
04-14-2008, 11:55 PM
Many thanks!!!

BTW: how do you exclude forums? I have a LOT of forums and typing all the forumID's is a lot more work then placing the forumIDs of the forums that I do not want to automerge. Here are the ID's:
125,142,152,156,164,165,166,174,176,190,192,196,20 9,211,212,213,214,215,216,217, 218,219,220,221,223,224,225,226,228,229,237,238,23 9,240,241,242,243,244,245,246, 247,248,249,250,251,252,253,254,255,256,257,258,25 9,260,261,262,263,264,265,266, 267,268,269,270,271,272,273,277,278,279,

Boofo
04-15-2008, 01:08 AM
Figure out if there are more you want to include or exclude and use the smallest amount. I know of no other way to do it.

Alfa1
04-15-2008, 01:52 AM
The forumID's above are by far the smallest amount. I would like to exclude them.
Is it possible to use a code to define not in array/ outside array?

Boofo
04-15-2008, 01:56 AM
Not that I know of.

zaimbat
04-15-2008, 08:46 AM
Installed without any problem on v3.6.9! It works perfectly :)

Xenon
04-15-2008, 02:22 PM
Alfa1: if those ids of forums are all subforums of a specific category, something like AND $foruminfo['parentid'] != categoryid should work as well and might save a lot of ids ;)

bada_bing
04-15-2008, 04:23 PM
Alfa1: if those ids of forums are all subforums of a specific category, something like AND $foruminfo['parentid'] != categoryid should work as well and might save a lot of ids ;)

So if all my forums I want to exlude are subforums how can I exlude the main forum which also include all the subforums below it?

Can you post the code do this with exampe of exluding forums 83,129 and also to exclude mods from this hack...

Thanks

bada_bing
04-16-2008, 02:30 AM
So if all my forums I want to exlude are subforums how can I exlude the main forum which also include all the subforums below it?

Can you post the code do this with exampe of exluding forums 83,129 and also to exclude mods from this hack...

Thanks

Any help with this Boofo?

Boofo
04-16-2008, 02:40 AM
!in_array($threadinfo['forumid'], array(83,129)) AND !can_moderate()

Alfa1
04-16-2008, 11:44 AM
Somehow this doesn't work:
!in_array($threadinfo['forumid'], array(125,142,152,156,164,165,166,174,176,190,192, 196,209,211,212,213,214,215,21 6,217, 218,219,220,221,223,224,225,226,228,229,237,238,23 9,240,241,242,243,244,245,246, 247,248,249,250,251,252,253,254,255,256,257,258,25 9,260,261,262,263,264,265,266, 267,268,269,270,271,272,273,277,278,279)) AND !can_moderate()

While on my development forum this does work:
!in_array($threadinfo['forumid'], array(6,8,9))

The forumID's are the ID's I want to exclude

Alfa1
04-16-2008, 11:58 AM
Please delete this post. I would really like to know if anyone knows the answer to the question above.

bada_bing
04-16-2008, 05:08 PM
!in_array($threadinfo['forumid'], array(83,129)) AND !can_moderate()

Boofo I have tried your listed code and it does not work, If I try and double post in either forum or subforum under forum id 83 or 129 it still merges in those forums???

bada_bing
04-16-2008, 05:22 PM
Awe never mind got it thanks I used this

!in_array($threadinfo['forumid'], array(83,129)) AND !can_moderate()

I was missing the )

bada_bing
04-16-2008, 05:40 PM
OK Another glitch as this works to exclude all subforms also uner the forumid with version 3.6.9 cant get it to work with 3.5.x as I have to add all the subforum ID's to exclude them???? Any reason why?

KURTZ
04-17-2008, 02:24 PM
After reading back the past 10 pages, it seems there is still no reply to making the merged text read:

--------------- Added 6 April 2008 at 7:17pm ---------------

Anyone managed to get that working?

unfortunately i think not ... maybe Bobby can give us a hand ...? :P

bada_bing
04-17-2008, 02:36 PM
OK Another glitch as this works to exclude all subforms also uner the forumid with version 3.6.9 cant get it to work with 3.5.x as I have to add all the subforum ID's to exclude them???? Any reason why?

Hey Boofo any ideas?

Alfa1
04-17-2008, 07:24 PM
After reading back the past 10 pages, it seems there is still no reply to making the merged text read:

--------------- Added 6 April 2008 at 7:17pm ---------------

Anyone managed to get that working?

No but we do have:

Alfa1 added 0 Minutes and 12 Seconds later...

BTW: I have this hack working now.

When activating this hack does it only process new posts or old ones as well?
Would rebuilding post or thread cache cause old double posts to be merged?

Boofo
04-17-2008, 08:44 PM
I think it only works on new posts after it is installed.

Alfa1
04-17-2008, 08:54 PM
Would be great to reduce DB size if it could be applied to old posts as well.

bada_bing
04-18-2008, 12:33 AM
Any help with my question to post 872 ?

Boofo
04-18-2008, 12:47 AM
Since I am no longer using 3.5.4, I can't help you there.

bada_bing
04-18-2008, 02:31 AM
Can someone please help me with this? I really need to exclude subforums

Noctavia
04-18-2008, 08:08 AM
After reading back the past 10 pages, it seems there is still no reply to making the merged text read:

--------------- Added 6 April 2008 at 7:17pm ---------------

Anyone managed to get that working?unfortunately i think not ... maybe Bobby can give us a hand ...? :P

*Is ever so hopeful someone can help out* Seeing "added 1084 minute and 26 seconds later confuses a lot of people lol.

Thomas P
04-18-2008, 09:01 AM
This hack should definitely be revised - it's great work and demand is quite high.

:(

KURTZ
04-18-2008, 10:22 AM
Since I am no longer using 3.5.4, I can't help you there.

maybe you can create something like this for the 3.7.x ... :D

Alfa1
04-18-2008, 11:47 AM
It works for 3.7RC3.

Requested features:
- better time notation.
- process old posts as well.

jfrenaye
04-19-2008, 12:26 AM
I have installed it on 3.6.9 and it appears to do nothing for my forum. I left the 1440 minutes there, the separator text is blank and edit reason was the default. I did allow it to bump but it does not seem to be workign at all. ANy suggestions?

furst
04-19-2008, 01:14 AM
I'd like to have a hack like this one. Actually, it would be perfect if it was exactly like what vb.org has.

Jase2
04-19-2008, 10:37 AM
I'm going to release something similar to what vb has for version 3.7 -- when I get time. :)

furst
04-19-2008, 06:43 PM
I'm going to release something similar to what vb has for version 3.7 -- when I get time. :)
Wishlist:
threads should be bumped - sometimes I go back to a thread after a long while because I have something to add, but if I'm the last person to have posted in it, the automerge prevents the thread from being bumped to the top, so my addition goes unnoticed.
time limit after which posts do not get merged - this is just one of the possible solutions to the problem outlined in #1.
no need for a page reload like we have in the current version. vb.org does this correctly.
better time notation (like vb's).
blogs, photo albums, visitor comments compatibility.Not the most impressive wishlist, but I'll add to it if I think of anything else which would be useful in my opinion.

Paul M
04-19-2008, 07:36 PM
This mod already does 1 & 2.

Thomas P
04-22-2008, 05:33 AM
Nr. 3 is acceptable with the current hack as it uses AJAX to display, if the post will be merged.
Think about the # post link, which won't work...

I second Nr. 5 though

Paul M
04-22-2008, 09:29 AM
To do no.3 (like vb.org and Cable Forum) requires files edits to the ajax javascript.

(Which also means you must use the non compressed versions, not the default compressed versions).

The time notation here uses custom bb tags, which require file edits to the appropriate class.

Alfa1
04-22-2008, 11:22 AM
Could you please provide instructions for improved time notation?
Is there a way to have this hack process old posts as well?

furst
04-23-2008, 03:47 AM
Nr. 3 is acceptable with the current hack as it uses AJAXThe current solution is okay, but the way vb.org does it is just a lot smoother. If there were to be a big update to this product, I would like for it to do things the way they're done on vb.org, superficially at least.

Destined2bGreat
04-25-2008, 01:28 PM
I keep clicking the download button but nothing is happening it just shows the thing load at the bottom but nothing pops up

Phalynx
04-25-2008, 11:21 PM
A working version for vB3.7 RC4 would be great.

Sworm
04-26-2008, 12:35 PM
A working version for vB3.7 RC4 would be great.



For Admin bypass?
Is possible?

KURTZ
04-27-2008, 06:56 PM
I'm going to release something similar to what vb has for version 3.7 -- when I get time. :)

you're 'da man' Jason :D

For Admin bypass?
Is possible?

check the attached file .. ;)

Boofo
04-27-2008, 07:00 PM
What have you added to it or changed in it?

redlabour
05-01-2008, 12:59 PM
Is anyone able to start a real 3.7 Port?

Boofo
05-01-2008, 01:03 PM
It works fine on 3.7.

Black Tiger
05-01-2008, 01:44 PM
On my 3.7 gold it's working fine too.

KURTZ
05-01-2008, 01:55 PM
What have you added to it or changed in it?

AND !in_array($vbulletin->userinfo['usergroupid'], array(5,6,7))

Boofo
05-01-2008, 02:17 PM
AND !in_array($vbulletin->userinfo['usergroupid'], array(5,6,7))


You can add that to the Additional Condition (experts only) setting instead.

dinodonk
05-03-2008, 01:42 AM
Awe never mind got it thanks I used this

!in_array($threadinfo['forumid'], array(83,129)) AND !can_moderate()

I was missing the )
i think you should use "OR" ???

Black Tiger
05-03-2008, 11:44 AM
I onlyl have !can_moderate in there, nothing else, is that wrong then?

What does this part do?:
!in_array($threadinfo['forumid'], array(83,129))

vithorius
05-05-2008, 01:20 PM
Hi there! EXCELLENT MOD! :up:

How is this Mod working on 3.6.8? :confused:

And how about 3.7? :confused:


Thank you so very much! :up:

obmob
05-05-2008, 03:02 PM
didn't worked in 3.6.8, at least not for me... never tried it in 3.7.
3.7 has some new spam features, but don't know if they deal with doubleposting.

Black Tiger
05-05-2008, 03:40 PM
You must have done something wrong the, or some other mod/hack is conflicting with this one.
I tried this mod on 2 forums, 1 with 3.6.8, and later 3.6.9 and now 3.6.10 and it works fine.
The other forums is the 3.7.x from beta 3 to gold now, and working fine too.

redlabour
05-05-2008, 04:54 PM
You must have done something wrong the, or some other mod/hack is conflicting with this one.
I tried this mod on 2 forums, 1 with 3.6.8, and later 3.6.9 and now 3.6.10 and it works fine.
The other forums is the 3.7.x from beta 3 to gold now, and working fine too.

Correct!

vithorius
05-06-2008, 07:45 AM
Ok, it is working for me too on 3.6.8!

I use the MODDED version of this Mod that KURTZ posted on reply nr 895 (https://vborg.vbsupport.ru/showthread.php?p=1500882#post1500882) as ADMINS are NOT affected by the Mod!


BUT...! (there is always a 'but'...!)


There is this MAIN problem for international users (I run a portuguese board)

One of the MOST IMPORTANT phrases on this Mod has no capabilities for translation inside vBulletin Phrasing system:

If you are running an international board (and you need to translate into your own language) just open the file:

"product-xenon_prevdoublepost.xml"

or

"product-xenon_prevdoublepost_modded.xml"

BEFORE you install this mod and TRANSLATE the following text (bolded) into your language:


------- original piece of code to TRANSLATE -------

$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'];

------- /original piece of code to TRANSLATE -------


Hope it helps!

Hornstar
05-08-2008, 08:59 AM
Just wondering if the way that vbulletin.org does it has been posted yet?

Black Tiger
05-12-2008, 01:27 PM
Not to my knowledge, I would also like to know how it's done here at vb.org.:)
Meaning date and time rather then minutes and seconds.

Paul M
05-12-2008, 03:28 PM
Not to my knowledge, I would also like to know how it's done here at vb.org.:)
Meaning date and time rather then minutes and seconds.
See post #889

Boofo
05-12-2008, 06:08 PM
Paul, did you know that it shows the unix timestamp in email notifications instead of the date and time?

Paul M
05-12-2008, 06:41 PM
Actually yes I did, bbcodes dont get converted in emails, so you get the original timestamps. I believe there is a way to suppress them, but Ive never really looked into it - as its a minor irritation. :)

Black Tiger
05-12-2008, 07:24 PM
See post #889
Thanks Paul, I already found that one with a search, but the only thing in there is this:
To do no.3 (like vb.org and Cable Forum) requires files edits to the ajax javascript.
And I don't have a clue how or where to do that, I'm not a coder and I don't understand javascript and only know little about php.
Could you give me a "find this" and "replace with this" explanation and the name of the file or template where to change things please?

geevest.com
05-13-2008, 09:35 AM
its good.

Koushukei
05-16-2008, 09:48 PM
When I installed this, it was not auto enabled. This could be why 3.7.0 gold users think it does not work. It does work. Be sure to check your Product Manager and manualyl enable it.

Zelda-King
05-20-2008, 04:26 AM
Er, no. I've been using this since 3.5 and it doesn't seem to be doing it any more on 3.7 Gold. Not even if I disable then re-enable.

Update: Never mind. I tried redownloading, uninstalling and reinstalling. It works now but it's a bit strange until you refresh the page.

Black Tiger
05-20-2008, 12:21 PM
Maybe another mod is conflicting with it some how Zelda-King?
I've got it running on 3.7 Gold and not one single problem.

@Paul (or anybody else): any docs about the timestamp change please? I'm a noob with php.

Zelda-King
05-20-2008, 07:32 PM
Maybe another mod is conflicting with it some how...Possibly. I've tried it with all other products disabled nevertheless. At the end of the day it does the job. It just doesn't AJAX correctly for me any more.

mariocaz
05-21-2008, 09:00 PM
Thanks Paul, I already found that one with a search, but the only thing in there is this:

And I don't have a clue how or where to do that, I'm not a coder and I don't understand javascript and only know little about php.
Could you give me a "find this" and "replace with this" explanation and the name of the file or template where to change things please?

Paul Please also I need help in this, because really I want to have your great Mod like the one that is installed here in VBulletin.org

Please help us!!! :)

akee
05-22-2008, 10:29 AM
hi!

i try it on 3.7.0, but doesn't work. does somebody fix it for 3.7.0? i need this hack.
thanks

Black Tiger
05-22-2008, 10:40 AM
Akee: Did you check in your plugin manager if the hack is enabled?
I have it running on 3.7.0 without any fixes needed.

akee
05-22-2008, 11:03 AM
yes, it is enabled, but i try it again...

i'm sorry. this work.

thanks

Gio Takahashi
05-22-2008, 11:21 AM
Awesome. This works for 3.7.0. Is there any way to have it add "Double Post" each time it merge posts?

akee
05-22-2008, 11:53 AM
yes - admincp - setup (maybe not setup, but i see on hungarien version). and find you this setting

Gio Takahashi
05-24-2008, 01:33 AM
you have to be more specific, what did you mean by setup? where exactly?

Nevermind. found it.

Keyser S?ze
05-24-2008, 09:10 AM
at the top, vbulletin options, long list and its near the bottom

Awesome. This works for 3.7.0. Is there any way to have it add "Double Post" each time it merge posts?

what i did i, i added this

-edit-

hiscl
05-24-2008, 12:25 PM
whats is the final version for 3.7

sorry for me english XD

maidos
05-28-2008, 05:25 PM
for each automerge wondeirng if we can have a line like this ____________ so we can know which got merged

flussmitteldj
05-29-2008, 12:00 PM
whats is the final version for 3.7

sorry for me english XD

When does the 3.7.0 version come?

Ug4t0R
05-29-2008, 04:04 PM
for each automerge wondeirng if we can have a line like this ____________ so we can know which got merged

Nice idea

J98680Bxxxxx
05-30-2008, 07:53 AM
for each automerge wondeirng if we can have a line like this ____________ so we can know which got merged

You can specify this in the "Post Separator" option:
ACP -> vB Options -> Doublepost Preventing -> (Post Separator) :up:

Black Tiger
05-30-2008, 12:44 PM
Nobody any clue on how to make it so it works like here on vb.org? (als see post #913 and 914)?

jim6763nva
06-04-2008, 12:31 PM
I just installed this and can't seem to get it to work on vb 371.

EDIT: disregard this.. I finally got it working. For some strange reason it wasn't enabled after install.

By the way are there any codes to add to the separator line to get it to appear like the one here on vb.org?

se_p800
06-04-2008, 03:51 PM
Does this run on 3.7.1 well?

jim6763nva
06-05-2008, 07:01 AM
Does this run on 3.7.1 well?

I just installed this yesterday on 3.7.1 and the only issue I have had was that I had to enable the plugin after install.

webuser99
06-06-2008, 01:58 AM
I cant get it working.. and it shows a line thru the plugin text on the manager page.. any ideas?(3.7.1)

webuser99
06-06-2008, 02:01 AM
Lol.. it wasnt enabled. WORKS!

webuser99
06-06-2008, 02:01 AM
They might want to consider enabling it on this forum! ;)

spankaveli
06-08-2008, 05:26 AM
working fine on my 3.7 . thanks!

Laski
06-12-2008, 02:25 AM
¿How can I deactivate the plug-in in a specific thread?

karnevil
06-15-2008, 02:15 PM
works fine on my 3.7

Raptor
06-20-2008, 05:00 PM
Nobody any clue on how to make it so it works like here on vb.org? (als see post #913 and 914)?

id like to know this too

Raptor
06-20-2008, 05:01 PM
double post test

Raptor
06-20-2008, 05:12 PM
i find the posts only merge when using normal reply and not a quick reply

using vb 3.7.1

Paul M
06-20-2008, 10:50 PM
You cant test it in this forum. Modification forums are exempt at vb.org.

silly rabbit
06-21-2008, 09:25 PM
Ahhh . . . I finally got this working properly . . . er, I mean the way I like it!

Thank's Xenon!

I used any avail BB code "dp"""/dp" in the hacks "Post Separator" options field, made sure "Remove Tag If Empty" said no while creating it and replaced it with . . .
<br /><br /><table class="tborder" cellpadding="2" cellspacing="1" border="0" width="100%" align="center">
<tr><td class="thead"><div style="float: right" class="normal"></div>
<i><b>< - - - - - - - [a doublepost] - - - - - - - ></b></i></td>
</tr></table>
. . . which still needs fixing, dressing up. Will display regardless of HTML permissions.

Also, I created a simple "yes" "no" User Profile Field so anybody, especially me, could turn it off if they should so choose. To accomplish that go to the Plugin Manager and edit Main Doublepost Prevent Engine wrapping everything except the first lines thus:
// ########### Xenon's prevent doublepost modification #########
$vbulletin->GPC['xen_isdoublepost'] = false;
if ($vbulletin->userinfo['field9'] == 'yes')
{
code
code
more code
. . . . .
} // at very bottom of script.

Done! That's my 9 mind you! Sounds simple but took me 1/2 the day!

Cheers Rabbit

ALil'Hope
06-23-2008, 05:32 PM
Working great on 3.7.1 PL2.

BANDiT600
06-23-2008, 06:11 PM
Working great on 3.7.1 PL2.

Doesn't work for me... Same version 3.7.1 PL2

* BANDiT600 Plugin were disabled...

TimberFloorAu
06-27-2008, 09:02 AM
bandit: goto add plugins/plugin manager locate the plugin, and enable it.

Has anyone got time stamp working on 3.7.x ?

Ive read every loody page of this mod, cant find out how. As most posts span different beta stages, and templates prior to it becoming a mod

Ozzy

BANDiT600
06-27-2008, 08:38 PM
AND !in_array($vbulletin->userinfo['usergroupid'], array(5,6,7))
Doesn't work for me in 3.7.2... :( What should be there to exclude Administators???

tsengvn08
06-30-2008, 04:21 PM
work great with me, 3.7.2 ;)

Dragon Company
07-01-2008, 09:20 AM
work great with me, 3.7.2 ;)
Me too on 3.7.2 :)

Hannan
07-06-2008, 11:30 PM
It's nice!
anyone knows how can I do like this:

--------------- Added 05 Jul 2008 at 05:28 ---------------
I mean with time!
thanks

vietdjclub
07-07-2008, 05:59 AM
It's nice!
anyone knows how can I do like this:

I mean with time!
thanks

many people ask this question but it' seem that nobody want to help. but here is the way

just find

$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'];


replace with
$doublepost['message'] = $doublepost['pagetext'] . "\n" . '-----Auto added double post '.date("j/n/Y"). ' at '.Date("h:i:s").'-----'.$vbulletin->options['xen_dp_spacer'] . "\n" . $post['message'];

if you want to use 24-hour format then just change h-->H

h:12-hour format of an hour with leading zeros
H:24-hour format of an hour with leading zeros


that all

Hannan
07-07-2008, 10:08 AM
Thank u dude

silly rabbit
07-07-2008, 11:37 PM
Thank u dude

thx too vietdjclub. Have to figure out how to incorp into my post separator via BB code now . . .

As long as we're posting the time wouldn't be a bad idea to preserve original time either with the "real edit" option set. (no bump)

wabbit

Subah
07-08-2008, 12:28 AM
I just have one problem with this mod , in the setting i write the reason of the edit but it is not shows !! is it only show the time of the edit without the title of Reason for Editing !
why ?

24hourForum.com
07-08-2008, 02:48 AM
is this availabel for 3.7.x

pooffck1
07-09-2008, 06:25 PM
is this availabel for 3.7.x

it works with 3.7.x.

and my second question

https://vborg.vbsupport.ru/attachment.php?attachmentid=80829&d=1211053221

how can i make it do that? i mean the time and the date? please help out

____________________

https://vborg.vbsupport.ru/showpost.php?p=1568798&postcount=955 <<this post, i dont know where to place that :(

vietdjclub
07-10-2008, 02:35 AM
it works with 3.7.x.

and my second question

https://vborg.vbsupport.ru/attachment.php?attachmentid=80829&d=1211053221

how can i make it do that? i mean the time and the date? please help out

____________________

https://vborg.vbsupport.ru/showpost.php?p=1568798&postcount=955 <<this post, i dont know where to place that :(

to make it. you must login to admincp-->Plugins & Products-->Plugins manager-->find and open Main Doublepost Prevent Engine plugin

find
$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'];

replace with
$doublepost['message'] = $doublepost['pagetext'] . "\n" . '-----Added '.date("j M Y"). ' at '.Date("h:i:s").'-----'.$vbulletin->options['xen_dp_spacer'] . "\n" . $post['message'];

done

result with show
https://vborg.vbsupport.ru/attachment.php?attachmentid=80829&d=1211053221

pooffck1
07-10-2008, 11:05 AM
Sorry but this isnt working i mean i cant find the things that i need to change

this is what the Plugin PHP Code looks like..... and i am in the Main Doublepost Prevent Engine

// ########### 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', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$dpdataman->set_existing($doublepost);
$doublepost['message'] = $doublepost['pagetext'] . "\n" . $vbulletin->options['xen_dp_spacer'] . "\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', $vbulletin, ERRTYPE_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']);
}
}
}

vietdjclub
07-10-2008, 03:10 PM
just replace code
(// we truely have a doublepost, now check if the merged post still fits the rules!)
...
...
$doublepost['message'] = $doublepost['pagetext'] . "\n" . $vbulletin->options['xen_dp_spacer'] . "\n" . $post['message'];

with
$doublepost['message'] = $doublepost['pagetext'] . "\n" . '-----Added '.date("j/n/Y"). ' at '.Date("h : i : s").'-----'.$vbulletin->options['xen_dp_spacer'] . "\n" . $post['message'];

pooffck1
07-11-2008, 09:45 AM
Example

all updated :)
------------Added 11/7/2008 at 03:44:41------------
Still need more members please :(

It works fantistically but is tehre a chance to break it

__________________________________________________ ______

example i want to achieve

all updated :)
<BR>
------------Added 11/7/2008 at 03:44:41------------
<BR>
Still need more members please :(

vietdjclub
07-11-2008, 10:02 AM
$doublepost['message'] = $doublepost['pagetext'] . "\n\n\n" . '-----Added '.date("j/n/Y"). ' at '.Date("h : i : s").'-----'.$vbulletin->options['xen_dp_spacer'] . "\n\n\n" . $post['message'];

pooffck1
07-11-2008, 01:01 PM
$doublepost['message'] = $doublepost['pagetext'] . "\n\n\n" . '-----Added '.date("j/n/Y"). ' at '.Date("h : i : s").'-----'.$vbulletin->options['xen_dp_spacer'] . "\n\n\n" . $post['message'];

Fantistic thanks for your help!

squishi
07-18-2008, 06:56 AM
This product does not work for me in 3.7.2. PL1. Posts are not merged. Instead, they show up as new posts with a title "Doublepost will be merged" and reason: "utomerged Doublepost".

Paul M
07-18-2008, 07:00 AM
Thats how it works if you use quick reply, you have to refresh the page to see the merged post.

EagleNick
07-19-2008, 07:38 PM
Thanks so much for the codes, vietdjclub :)

For some reason, the time is one hour off... why is that?
It's an hour behind my forum time.

(My forum time said 4:30, but the post said the text was added at 3:30)

EagleNick
07-20-2008, 01:45 AM
Also, can I place
<if condition="$post['usergroupid'] != 6">into the additional condition box to exclude Administrators' posts from being merged?

Black Tiger
07-20-2008, 01:33 PM
@EagleNick:
You can go to vbulletin options -> Doublepost preventing, then add the following in the "Additional Conditions" box:
!can_moderate()
This will prevent the mod from working for admins and moderators.

@Vietdjclub: Thanks many times, I was looking for that code too for some time!

EagleNick
07-20-2008, 02:56 PM
@EagleNick:
You can go to vbulletin options -> Doublepost preventing, then add the following in the "Additional Conditions" box:
!can_moderate()This will prevent the mod from working for admins and moderators.

@Vietdjclub: Thanks many times, I was looking for that code too for some time!
I saw that there in the ACP.
However, I am curious to know if there is the ability to exclude only administrators.

But if the way you mentioned is the only way, then that's fine ;)

MortysTW
07-25-2008, 11:43 PM
3.7.2 PL2

This mod worked fine until I've recently upgraded. Automerging doesn't seem to work with Quick Reply, yet its always worked with Quick Reply until this upgrade to 3.7.2 PL2 from 3.6.x

Any ideas?

EagleNick
07-26-2008, 01:17 AM
Works fine for me. (Also on 3.7.27PL1)

Maybe you should uninstall, then re-install.

But what exactly happens that makes you say it doesn't work?

MortysTW
07-26-2008, 12:10 PM
I've done the uninstall and reinstall.

The event that takes place is that you make a typical "Quick Reply" then if you do another "quick reply" in less than the preset flood time, instead of saying "Your post will be merged" or whatever it used to say, it says something about already posting and has a text link that says OKAY just above the Quick Reply box. Regardless of me clicking the OKAY or me ignoring everything and moving on with the site, when you view the thread again, it shows my 2 posts merged into one as it should be. BUT, it also posts that 2nd quick reply I made 2 more times. Meaning I end up with three separate line item posts added to the thread. 1 of the merged and 2 of the "2nd" reply.

Its very strange. I'm at work right now, but I'll try it again from home and take a screen capture and provide a link to show you. (Work network blocks my site)

Appreciate the help. I love this add-on. Was upset to see I couldn't get it working.

MortysTW
07-27-2008, 04:15 PM
No luck. Here's my testing thread.
http://www.mortystwistedworld.com/forums/testing-grounds/21616-double-post-test-again.html#post194739

Its merging, but also posting that 2nd post as its own unique post. So basically I'm getting duplicates. A copy added to the previous post, and then that post itself.

TheInsaneManiac
08-03-2008, 01:47 PM
How do I change the time to the forums time?

Keyser S?ze
08-10-2008, 02:25 PM
i used this code to add a time stamp when someone adds a double post, but instead it gave me an error msg saying this post is a duplicayr og another...

then it took me to it and i had 2 posts not merged

/ ########### 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', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$dpdataman->set_existing($doublepost);
$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'];

// 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', $vbulletin, ERRTYPE_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']);
}
}
}

Blind Guardian
08-14-2008, 05:03 PM
I'm having some problems with adding custom conditionals. The plugin works fine, and auto-merges everything that it should, but I have a few forums that I would like to disable auto-merge in.

Before I upgraded to 3.7.2, I'd been able to just add those forums to the custom conditional as:

!in_array($vbulletin->forum['forumid'], array(###, ###))

But that no longer seems to work. I've tried doing it the long way too, but that doesn't seem to work either.

$vbulletin->forum['forumid'] != ### AND $vbulletin->forum['forumid'] != ###

Is it still possible to prevent auto-merging per forum?

Edit: Thought -- Do I now need to manually pull the forumid out of the database through the plugin code, rather than just in the additional conditions option box?

Darksidehackers
08-16-2008, 12:43 AM
I seem to get a problem with it auto merging on 3.7.2 no PL it merges the post but doesn't delete the doublepost instead it does something like this..

https://vborg.vbsupport.ru/external/2008/08/27.png

And yes i have refreshed the page and all..

CarterMarkham
08-28-2008, 01:45 AM
Can someone tell me how to fix the time, its off by 1 hour...

CtrlAltDel
09-09-2008, 02:44 AM
why doesnt someone just repackage all the changes for the current version?

Keyser S?ze
09-09-2008, 04:25 AM
why doesnt someone just repackage all the changes for the current version?

very good question

wat3v3r
09-12-2008, 04:53 AM
yea if someone can up a fixed working version for vb3.7.3 would be nice

troybtj
09-18-2008, 06:53 PM
I installed this with minimal tweaks in 3.7.3PL1, total time was under 5 minutes, I didn't write down exact steps, it was pretty self-explanatory from behavior.

I believe this post covers what I changed: https://vborg.vbsupport.ru/showpost.php?p=1571985&postcount=963

(1 line)

barcena
09-27-2008, 04:59 AM
I will like to know if this hack works based on IP's or on usernames or both, meaning I do allow guests to post on my site and no matter how manny times they posted (even three posts one after another) they won't be merged.

I will appreciated any answer.

Thanks.

Keyser S?ze
09-27-2008, 03:19 PM
based on user names

barcena
09-27-2008, 06:02 PM
Thanks!. Then i'll have to work a little bit more ;) it will be great if the mod also merged by IP's but it is a great mod as it is, it took half time of me merging posts out.

Thank you very much for your answer.

xxxZeOxxx
09-27-2008, 10:24 PM
Nvm...

-=Leb=-
10-07-2008, 10:19 PM
It sounds complicated to me. Why dont you guys update this version instead of picking and collecting the codes from right to left?

I hope this hack get updated to 3.7.3 and above that will be awesome for non experienced member like me lol :P

Keyser S?ze
10-08-2008, 08:02 AM
is the guy who made this dead? if not update this pls, or release it to someone else

Paul M
10-08-2008, 02:20 PM
AFAIK, Xenon is alive and well.

AzzidReign
10-08-2008, 03:37 PM
It's working fine for me and I'm using the most updated version of vb.

Keyser S?ze
10-08-2008, 05:15 PM
no, im not saying it doesnt work in 373pl1, it does, but all thru this thread are little upgrades and tweaks

maybe im just a greedy bastard but id like to see this updated to include some

djbaxter
10-08-2008, 05:25 PM
no, im not saying it doesnt work in 373pl1, it does, but all thru this thread are little upgrades and tweaks

maybe im just a greedy bastard but id like to see this updated to include some

The tweaks are there to add for those who want them. Personally, I like the way it is now so I have no interest in applying the tweaks.

-=Leb=-
10-08-2008, 10:12 PM
lol i'm glad he is still safe :)

-=Leb=-
10-08-2008, 10:12 PM
We just need fresh meat lol

AzzidReign
10-09-2008, 09:38 AM
no, im not saying it doesnt work in 373pl1, it does, but all thru this thread are little upgrades and tweaks

maybe im just a greedy bastard but id like to see this updated to include some

You can easily upgrade if you'd like...just ask for permission to see if he minds you doing that but I'm perfectly happy with the way it is.

Keyser S?ze
10-09-2008, 07:44 PM
You can easily upgrade if you'd like...just ask for permission to see if he minds you doing that but I'm perfectly happy with the way it is.

im not that skilled

-=Leb=-
10-11-2008, 09:39 AM
I have a suggetion, how about if we email xenon? we can ask him if he could update the hack.

CarterMarkham
10-12-2008, 11:16 AM
I'd like to get the time thing fixed...

Keyser S?ze
10-13-2008, 02:05 AM
I have a suggetion, how about if we email xenon? we can ask him if he could update the hack.


or allow someone else too til hes got more time

Pirat3
10-13-2008, 08:09 PM
Does this mod work on vb 3.7?