vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Prevent Doubleposting (https://vborg.vbsupport.ru/showthread.php?t=96602)

Xenon 09-19-2005 10:00 PM

Prevent Doubleposting
 
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

Boofo 09-20-2005 11:15 AM

No hook for this yet? ;)

Well, I'll give it a shot. Just curious though, what it the "not crucial" bug? ;)

EDIT: How do we allow Admins to bypass it?

Andreas 09-20-2005 11:16 AM

I somewhat doubt anyone except vBorg has functions ismod() and is_hack_forum() ;)

Xenon 09-20-2005 11:21 AM

damn ^^

Boofo 09-20-2005 11:22 AM

Maybe I should wait until those are taken out? ;)

Xenon 09-20-2005 11:23 AM

already done ;)

well you see which boar i used as testboard ^^

Xenon 09-20-2005 11:23 AM

Quote:

Originally Posted by Boofo
Just curious though, what it the "not crucial" bug?

bypassing the attachment limit per post

Boofo 09-20-2005 11:29 AM

Ahhh, ok. That can wait. What about the admin bypass? ;)

Paul M 09-20-2005 11:34 AM

Quote:

Originally Posted by KirbyDE
I somewhat doubt anyone except vBorg has functions ismod() and is_hack_forum() ;)

LOL.

Dan 09-20-2005 11:41 AM

Yay :D I'll use this as soon as some of the other hacks are ported over.

[high]* Dan clicks install[/high]

Andreas 09-20-2005 11:45 AM

Hmm, I think i'll play around a bit with this when I got time ... want this a Plugin only :)

nexialys 09-20-2005 11:48 AM

oh, on my side i have added :
$vbulletin->options['doublepost_automerge_timespan'] = number of minutes prefered
$vbphrase[posting_doublepost_msg] = Automerge Double Posting

... good to have if you don't like to edit your hacks all the time!

permission would be good too... "bypass per usergroup.." ;) ... and per forum...

anyway, i'm god, i can do that myself.. lol

Boofo 09-20-2005 11:54 AM

Quote:

Originally Posted by nexialys
oh, on my side i have added :
$vbulletin->options['doublepost_automerge_timespan'] = number of minutes prefered
$vbphrase[posting_doublepost_msg] = Automerge Double Posting

... good to have if you don't like to edit your hacks all the time!

permission would be good too... "bypass per usergroup.." ;) ... and per forum...

anyway, i'm god, i can do that myself.. lol

When you get the bypass for admins and mods please let me know. I have this line but I don't think it's right for 3.5. ;)

PHP Code:

 AND !in_array($bbuserinfo['usergroupid'], array(5,6,7)) 

Kirby, if you get it going as a plug-in, please let me know. ;)

Snake 09-20-2005 12:03 PM

Yay I have been waiting for this thanks man! :D

Xenon 09-20-2005 12:05 PM

@Bob: it's

PHP Code:

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

;)

and right now it is not possible as plugin only without adding a bunch of code, and i admit i was too lazy to do so ;)

Boofo 09-20-2005 12:15 PM

Thank you, sir. ;)

You got the right idea, Stefan. Make the boar you used as a testboard do the plug-in. LOL

nexialys 09-20-2005 12:20 PM

ok, i'll be VERY generous here, and release a hack already for this tool...

a Per Forum Activation of the Automerge...

i add the prod in the html tag here... to set Per Forum if the Automerge is active or not, and here is the modification for the hack itself:

in the hack, FIND:
PHP Code:

    if ($type != 'thread' 

and REPLACE BY:
PHP Code:

if ($foruminfo['force_automerge'] AND $type != 'thread' 

HTML Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="force_automerge" title="Force Automerge of Doubleposts" description="Force Automerge of Doubleposts" version="1.0.0" active="1">
        <codes>
                <code version="1.0.1">
                        <installcode><![CDATA[$db->query_write("ALTER TABLE " . TABLE_PREFIX . "forum ADD force_automerge SMALLINT( 3 ) UNSIGNED NOT NULL DEFAULT '1'");
$db->query_write("UPDATE " . TABLE_PREFIX . "forum SET force_automerge = 1");]]></installcode>
                        <uninstallcode><![CDATA[$db->query_write("ALTER TABLE " . TABLE_PREFIX . "forum DROP force_automerge");]]></uninstallcode>
                </code>
        </codes>
        <templates>
        </templates>
        <plugins>
                </plugin>
                <plugin active="1">
                        <title>Force Automerge of Doubleposts</title>
                        <hookname>forumadmin_edit_form</hookname>
                        <phpcode><![CDATA[print_yes_no_row($vbphrase['force_automerge_in_this_forum'], 'forum[force_automerge]', $forum['force_automerge']);]]></phpcode>
                </plugin>
                <plugin active="1">
                        <title>Force Automerge of Doubleposts</title>
                        <hookname>forumdata_start</hookname>
                        <phpcode><![CDATA[$this->validfields['force_automerge'] = array(TYPE_INT, REQ_NO);]]></phpcode>
                </plugin>
        </plugins>
        <phrases>
                <phrasetype name="Control Panel Global" fieldname="cpglobal">
                        <phrase name="force_automerge_in_this_forum"><![CDATA[Force Automerge of Doubleposts in this Forum?]]></phrase>
                </phrasetype>
        </phrases>
        <options>
        </options>
</product>

so Xenon, you know what to do with this... ;)

Boofo 09-20-2005 12:23 PM

This is what I get when I click on your xml link. What gives, buddy? LOL



Quote:

The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. End tag 'plugin' does not match the start tag 'plugins'. Error processing resource 'https://vborg.vbsupport.ru/attachme...

</plugin>----^




nexialys 09-20-2005 12:29 PM

Quote:

Originally Posted by Boofo
This is what I get when I click on your xml link. What gives, buddy? LOL

bah, no biggy, some don't like xml files.. lol

post updated...

Boofo 09-20-2005 12:33 PM

Quote:

Originally Posted by nexialys
bah, no biggy, some don't like xml files.. lol

post updated...

The file saved fine as a "save target as" right click. Just messing with 'ya. ;)

Boofo 09-20-2005 12:35 PM

Quote:

Originally Posted by nexialys
bah, no biggy, some don't like xml files.. lol

post updated...

Is this set on or off for each forum by default?

nexialys 09-20-2005 12:36 PM

Quote:

Originally Posted by Boofo
Is this set on or off for each forum by default?

by default it is a "ON" setting, like stated in the SQL query.. DEFAULT '1' you can change that before installing btw, or do it manually!

Boofo 09-20-2005 12:40 PM

I've had some of those Default 1's turn out to be off before. That's why I was checking. ;)

It should be on by default, so we are all set then. Although I would never see a reason to turn it off for a forum, but maybe that's just me. ;)

Xenon 09-20-2005 12:47 PM

lool, an addon for a betaversion of a modification of a software which is in RC state ^^

thx nexialsys :)

nexialys 09-20-2005 12:56 PM

Quote:

Originally Posted by Xenon
lool, an addon for a betaversion of a modification of a software which is in RC state

i can even make a branch of it, to follow the path.. lol

Yorixz 09-20-2005 05:44 PM

Well, I'll be the first to complain I guess ;) When someone uses the Quick Reply box with AJAX you see the "Please wait.." text for a second or what and then nothing happens; no refresh or anything so you don't see the text being added - which will cause more double posting (tries) most likely ;)

Jedi Blaze 09-20-2005 05:57 PM

Quote:

Originally Posted by KirbyDE
I somewhat doubt anyone except vBorg has functions ismod() and is_hack_forum() ;)

The board I admin at has the function isbbstaff()

To stay on topic, glad to see this ported. ^^

Xenon 09-20-2005 07:04 PM

Quote:

Originally Posted by Yorixz
Well, I'll be the first to complain I guess ;) When someone uses the Quick Reply box with AJAX you see the "Please wait.." text for a second or what and then nothing happens; no refresh or anything so you don't see the text being added - which will cause more double posting (tries) most likely ;)

not that i like AJAX very much ^^

right now it dosn't work on the vb.org testboard, but i'll look at it when i enable it :)

007 09-20-2005 07:21 PM

Have been excited for this one. Thansk for getting it going Xenon! :)

I will probably wait to see if it can be done as a plugin though, or at least until some AJAX and other bugs are sorted. :)

*rests finger over the install button and rubs, but doesn't quite press yet*

lol

Jenta 09-20-2005 09:55 PM

kind of a show stopper if the behaviour exibited using quick reply is as stated

dont think theres a way around it. stuff like edited by is a known limitation of ajax that requires a page refresh

utw-Mephisto 09-20-2005 11:28 PM

Quote:

Originally Posted by Yorixz
Well, I'll be the first to complain I guess ;) When someone uses the Quick Reply box with AJAX you see the "Please wait.." text for a second or what and then nothing happens; no refresh or anything so you don't see the text being added - which will cause more double posting (tries) most likely ;)

Me 2 :D

Xenon 09-21-2005 12:18 AM

yeah, i have to look at the ajaxprocess, so it updates the last post instead of just doing nothing until a reload.

the hack itself works as designed, just Ajax doesn'T ^^

nexialys 09-21-2005 12:43 AM

for the ajax thing, it's kinda tricky... the quick-reply have to be interacting with the Edit ajax of the last post if you are the author of that one, so if you post from the quick-reply, it will be connected to the EDIT of the last post you've made instead of posting a new one with the quick-reply ajax...

the problem with that situation, or at least the logic behind a problem, is that if someone else posts when you use the quick-reply, your post will be merged with your last post, even if someone posted between the two... logic applyed tell that it's not a problem, because if you use the quick-reply, you don't know if someone else reply afterward, so you don't actually reply to that last one...

someone is lost here?!

;)

Xenon 09-22-2005 01:07 PM

i'll see with what i can come up :)

007 09-23-2005 07:28 AM

vBulletin should just have a function built in to autoban doubleposters. That would make everything so much easier for us all! lol

nexialys 09-23-2005 03:43 PM

autoban doubleposters ?!... i think you did not quite understood the goal of this hack... but anyway...

Yorixz 09-28-2005 03:54 PM

Quote:

Originally Posted by Xenon
yeah, i have to look at the ajaxprocess, so it updates the last post instead of just doing nothing until a reload.

the hack itself works as designed, just Ajax doesn'T ^^

A real admin; always blame the software ;)

Electronic Punk 09-29-2005 11:46 AM

Definatly keeping an eye on this one :)

garrynewman 09-29-2005 09:08 PM

I fixed the AJAX process by adding..

Code:

                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$id";
                eval(print_standard_redirect('redirect_automerged', true, true));

at the bottom of the "if ($isdoublepost)" before the "} else".

You need to add a new phrase "redirect_automerged" too.


edit: It works but is printing the message twice.

MentaL 09-30-2005 12:46 PM

Working for gold?


All times are GMT. The time now is 06:28 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04496 seconds
  • Memory Usage 1,838KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (4)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete