The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Prevent Doubleposting Details »» | |||||||||||||||||||||||||
When a User posts into a thread where he already has the lastpost, no new post will be added. The lastpost of him will be edited and the new text is put after his first message.
This will be done until the old post is older than 24 hours (you can change this timespan yourself) Nothing more to say about that, it's the quite same as my vb3.0 version. This Mod should run with 3.6 as well ** Please make sure you ENABLE this product after you install it - it is disabled by default. ** For vb 3.8 there are two alternative updates ; https://vborg.vbsupport.ru/showthread.php?t=203705 https://vborg.vbsupport.ru/showthread.php?t=204177 Show Your Support
|
Благодарность от: | ||
inphoenix |
Comments |
#452
|
||||
|
||||
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
|
#453
|
|||
|
|||
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(); } 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? |
#454
|
|||
|
|||
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 |
#455
|
||||
|
||||
sounds like a corrupted xml file, redownload it again might help
|
#456
|
|||
|
|||
Quote:
and I was unable to find an auto refresh function that I could incorporate into the plugin system. |
#457
|
|||
|
|||
Hi Xenon,
Does this hack work with v3.5.4 ? - v |
#458
|
|||
|
|||
Quote:
|
#459
|
||||
|
||||
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 |
#460
|
|||
|
|||
Quote:
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 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? |
#461
|
||||
|
||||
well, nope, as i said, my tests didn'T work out well, thats why i did it the "ghost post" way
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|