PDA

View Full Version : Prevent Doubleposting


Pages : [1] 2 3 4 5

Xenon
09-19-2005, 10:00 PM
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
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
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.

* Dan clicks install

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
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. ;)

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

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: if ($type != 'thread'
and REPLACE BY:if ($foruminfo['force_automerge'] AND $type != 'thread'

<?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



The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh (javascript:location.reload()) 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
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
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
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
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
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
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
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
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
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..

$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?

Snake
09-30-2005, 01:23 PM
Perhaps. But it's worth a try.

VaaKo
10-01-2005, 06:39 PM
I'm having a problem
when I write a new post, I cannot see it merged until I refresh
I cannot see the message at all until I refresh

Kirk Y
10-01-2005, 07:59 PM
We know... if you'd read earlier posts the AJAX isn't cooperating with this. Xenon is on holiday... so there won't be an update until he gets back. (Whenever that is...)

Mr Peabody
10-01-2005, 08:32 PM
Cheers for the hack, best thing since sliced bread :)

ozmazdaclub
10-03-2005, 09:47 PM
Has the attachment been modified to include the fixes?

Fenriz
10-04-2005, 10:16 AM
I'm having a problem
when I write a new post, I cannot see it merged until I refresh
I cannot see the message at all until I refresh
Ja, the same problem. Waiting for Xenon!

JohnBee
10-05-2005, 12:55 AM
Also waiting for ajax compatibility fix :D - loved this mod under 3.0.x

ProperMethodz
10-05-2005, 03:09 AM
I fixed the AJAX process by adding..

$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.
ahem coders... :)

Installed.

I'm no coder.. barely an admin. I really want to get into this coding stuff.. :) It's fun. OK..

So, I'd like to find a way to make a 24 hour limit on it in order to allow for thread bumping. But, I'd like to tag along for the ride on how it was found and how you code it. :)

Granted that some threads should be deleted, I think that some just go missed.

csidlernet
10-05-2005, 03:12 AM
/me installs

ProperMethodz
10-05-2005, 07:07 AM
* csidlernet installs
lol... we've been following each other around this site all day. Our sites are going to have all the same hacks :)

CBE
10-05-2005, 12:49 PM
when i post two replies ... it merged them .. but i must make REFRESH to show the post after megeing,,,,

what shall I go ??

JohnBee
10-05-2005, 01:07 PM
There are many references to this throughout the thread, the hack is not 100% functional atm. I uninstalled it until an offixial fix is issued.

Xenon
10-05-2005, 05:03 PM
as you can see this hack has the beta flag still activated ;)

i will include the AJAX fix when i tested it myself, i think during this week i will be able to do so (as i have to fix it until the upgrade of vb.org it has #2 on my to do list :))

JohnBee
10-05-2005, 05:10 PM
Great news! looking forward to it, I love this mod, my forum has learned to live with it and since 3.5 complaining that can't abuse the quick reply feature :p

thanks for your hard work on this MOD btw

ozmazdaclub
10-07-2005, 07:09 AM
waiting on the fixed one Xenon...Take your time... ive lived without it for now so a few more days/weeks won't hurt...

Xenon
10-07-2005, 10:46 AM
i hope it won't take months ;)

ozmazdaclub
10-10-2005, 09:35 AM
Any news/updates Xenon?

Xenon
10-10-2005, 10:59 AM
nah, the AJAX isn't doing what it should.

right now i found a possibility to dublicate posts, not that i wanted to achieve that ^^
disabling Ajax would help ^^

hotrod1
10-10-2005, 02:12 PM
Nice feature, thanks a bunch!

mtha
10-11-2005, 12:04 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...


how about just not letting people to "quick reply" if the last post belong to him/ so you can get rid of the AJAX problem :)


I have an idea https://vborg.vbsupport.ru/

If someone post in the same thread in last X minutes (or the last post belong to him), the reply button will be disabled or link to editpost, that editing the last post that he made in the thread?

---------

and amazingly, it can easily be done by editing template.

a few ($threadinfo['lastposter'] != $bbuserinfo['username']) condition on reply link/quick reply will do the job https://vborg.vbsupport.ru/



?question?

can we extend the condition, so that only posts sorter than xx lines or xx characters, are merged. Longer posts are stays seperated :)

Xenon
10-11-2005, 10:59 AM
can we extend the condition, so that only posts sorter than xx lines or xx characters, are merged. Longer posts are stays seperated

those things can be added easily

you just have to manipulate the if condition when a post is considered as doublepost just add a AND strlen($post[message]) <= 30 and just posts shorter than 30 chars will be merged.

Boofo
10-11-2005, 11:12 AM
What post length would be a good length to set this at?

Xenon
10-11-2005, 11:40 AM
hmm, personally i'd say up to 5 lines around 400 chars would be a good lenghth, but that depends on personal views..

Boofo
10-11-2005, 12:21 PM
hmm, personally i'd say up to 5 lines around 400 chars would be a good lenghth, but that depends on personal views..

So it would look like this with that added, right?

if ($type != 'thread'
AND !in_array($vbulletin->userinfo['usergroupid'], array(5,6,7))
AND $threadinfo['lastpost'] > TIMENOW - $dp_settings['timespan']
AND $threadinfo['lastposter'] == $vbulletin->userinfo['username'])
AND strlen($post['message']) <= 400
{

Xenon
10-11-2005, 02:30 PM
apart from wrong placed brackets, yes ;)

Boofo
10-11-2005, 02:39 PM
You mean like this?

if ($type != 'thread'
AND !in_array($vbulletin->userinfo['usergroupid'], array(5,6,7))
AND $threadinfo['lastpost'] > TIMENOW - $dp_settings['timespan']
AND $threadinfo['lastposter'] == $vbulletin->userinfo['username']
AND strlen($post['message']) <= 400)
{

Xenon
10-11-2005, 03:46 PM
yep :)

Boofo
10-11-2005, 03:58 PM
Thank you, sir. ;)

If you can figure out a way to do a plug-in on this (product), I could make settings for the usergroups and string length. ;)

mtha
10-11-2005, 04:53 PM
look like boofo got right into the idea.

Thank you very much Xenon



AND strlen($post['message']) <= 400)


Boofo, use


$dp_settings = array(
'timespan' => 3600 * 24,// how many seconds after the last post the new post is defined as doublepost
'spacer' => "\n\n", // What should be between the old post and the new one (default: two empty lines)
'editedbymsg' => 'Automerged Doublepost', // If left blank no edited by will appear
'maxchars' => 400, // Max chars where post is merged.
);


and


AND strlen($post['message']) <= $dp_settings['maxchars'] )




well, should you exclude Unregistered Users from the post, or checking IPs for those unregistered too? otherwise, you wont know "which unregistered user" post what :)

Xenon
10-12-2005, 11:06 AM
Unregistred users use usernames as well afaik, they are just not registred.

Boofo
10-12-2005, 02:22 PM
look like boofo got right into the idea.

Thank you very much Xenon



AND strlen($post['message']) <= 400)


Boofo, use


$dp_settings = array(
'timespan' => 3600 * 24,// how many seconds after the last post the new post is defined as doublepost
'spacer' => "\n\n", // What should be between the old post and the new one (default: two empty lines)
'editedbymsg' => 'Automerged Doublepost', // If left blank no edited by will appear
'maxchars' => 400, // Max chars where post is merged.
);


and


AND strlen($post['message']) <= $dp_settings['maxchars'] )


Good idea, thanks! ;)

mtha
10-12-2005, 05:34 PM
Unregistred users use usernames as well afaik, they are just not registred.

It doesnt really matter to me much, but there is a case when "guest" dont change username, it will use default one "Unregistered User" as username.
Other can post with the same default "Unregistered User" too, right?

Xenon
10-13-2005, 11:39 AM
yep, you are right..

hmm, is it worth to add an extra check there?
i mean, how many boards allow unregistred users to post at all?

Devii
10-13-2005, 09:01 PM
*hopes this is a plugin soon* I miss it so.

Snake
10-13-2005, 09:20 PM
Yeah me too, I can't wait for it. :D

mtha
10-13-2005, 10:23 PM
yep, you are right..

hmm, is it worth to add an extra check there?
i mean, how many boards allow unregistred users to post at all?

:) yeah, it's not really worth it,

just as an additional to Boofo query above, I use:

should it be harder or something? i

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


for me, I have some box for troubleshooting, and sometime, member (or guest) keep posting alot of questions in there :).


anyway, it's optional.

Xenon
10-15-2005, 10:01 AM
that's ok so.

you might also consider to disalbe it on some forums maybe..
like vb.org disabled it on the release forums..

ozmazdaclub
10-15-2005, 11:01 PM
is this no auto updating the last post using ajax or is it still broken... if fixed are the instructions updated?

JohnBee
10-16-2005, 12:17 AM
I cannot confirm that the ajax is fixed either, I really enjoyed this hack when it was on 3.0.x I hope they get fixed soon! :D

Boofo
10-16-2005, 08:27 AM
that's ok so.

you might also consider to disalbe it on some forums maybe..
like vb.org disabled it on the release forums..

How would you disable it in certain forums?

Xenon
10-18-2005, 10:45 AM
just manipulating the conditions ;)

nope, the damn ajax still doesn't do what it should...

talkhost
10-18-2005, 03:04 PM
This mod would be really useful for my forum. I hope it's released as a plugin soon..

Snake
10-18-2005, 06:09 PM
just manipulating the conditions ;)

nope, the damn ajax still doesn't do what it should...

Don't give up yet. I know you can do it easily. :D

nnjj.net
10-24-2005, 08:32 PM
is it working on 3.5 Gold?

Xenon
10-24-2005, 09:01 PM
apart from two little bugs mentioned before for RC3 as well, yes it works

ozmazdaclub
10-24-2005, 09:01 PM
any idea on when the bugs will be resolved?

Xenon
10-24-2005, 09:19 PM
nope, i am too busy with rl to work on any hacks these days

nnjj.net
10-24-2005, 10:05 PM
so, we will wait I think for new version of this hack :)

sbp
10-25-2005, 11:21 AM
Thank you Xenon. http://sbp777.homestead.com/files/beerchug.gif

Ranma2k
10-26-2005, 08:58 AM
nope, i am too busy with rl to work on any hacks these days

Can't we help you in any way ..
i'm trying to fix some issues with in my board and i'm playing around with it :)

Xenon
10-26-2005, 10:56 PM
i won't say no to any help ;)

RL is my priority these days, but if i find time i will hack, but most of the free time is going into behind the scenes work as well ;)

coding is a luxus ;)

Snake
10-27-2005, 06:50 PM
What about in weekends? I'm pretty sure you've got enough time to fix every bug in the hack on weekends.

Xenon
10-27-2005, 08:51 PM
i have to prepare a lot of things in the weekends.

and sometime i want to have free time as well ;)

as said, the hack right now works, just ajax doesn't so it's not such a big deal waiting, isn't it?

Greebo
10-31-2005, 02:05 PM
Just installed - works great. The QR not refreshing (Ajax) is a minor nit at best. :)

Whenever you can get it fixed, as long as you update the hack info so I get an email about it, I'm cool. I can totally understand the need for free time. Don't let the pushy "give up your life to serve MY needs" types get you down. :)

nnjj.net
11-01-2005, 02:54 PM
its not working well with 3.5 Gold with the Quick Reply.
it doesn't show the replay unless you refresh all the page when using the Quick Reply

hope to find a soultion for that

thanks a lot

nnjj.net
11-01-2005, 02:55 PM
also if there is any chance to have it as Product well ve great

GamerJunk.net
11-01-2005, 06:00 PM
VBulletin.org isn't updated to 3.5? Cuz the quick reply works fine on here

Good hack, installed, hope you can get that AJAX part fixed but other wise I love it!

Xenon
11-01-2005, 07:18 PM
nope, vb.org has not yet upgraded

Snake
11-02-2005, 06:59 AM
...and will be upgraded soon.

Xenon
11-02-2005, 07:35 PM
i hope ^^

ggiersdorf
11-02-2005, 10:01 PM
Any fix for the quick reply box yet?!

VBUsers
11-03-2005, 06:31 AM
xenon should i install this on 3.5.1 or wait for you to update this hack. i really need it for my site.

Xenon
11-03-2005, 10:19 AM
i'd suggest to install this.

an easy help would be to turn off QR's Ajax which should be possible in 3.5.1.

as said the hack itself is working, it's just the integration of Ajax which doesn't

VBUsers
11-06-2005, 11:05 PM
thanks xenon works like a charm

jribz
11-07-2005, 02:13 AM
Installing, thanks.

AZone
11-08-2005, 01:21 PM
Hi! Thank you for this hack!
I have a question: after doubleposting message is edited, and remains marked as old message. I remember this hack for vb 3.0.x - there message was remarked as new after double post was posted. Can this issue be solved?

VBUsers
11-08-2005, 04:05 PM
Hi! Thank you for this hack!
I have a question: after doubleposting message is edited, and remains marked as old message. I remember this hack for vb 3.0.x - there message was remarked as new after double post was posted. Can this issue be solved?


+1 ill take this as well

Xenon
11-08-2005, 08:26 PM
i may readd this to a later version when i have the time to work on the hack again

keymistress
11-14-2005, 05:16 AM
installed and it works great but i'm also looking forward to getting it work for 3.5.1's quick reply... ;)

Vizionz
11-17-2005, 06:49 AM
this is the hack i needed :) that ajax refresh kinda sucks though but oh well this will work for now :) thanks for doing it up

iamnofear
11-17-2005, 10:06 PM
it can't prevent 2 post if user click "post" 2 times quickly

Bounce
11-17-2005, 11:42 PM
Installed and working , notice the 2 bugs but still does what its ment too.

just posted 5 times rapid and all automerged

Thanks

Xenon
11-18-2005, 04:29 PM
it can't prevent 2 post if user click "post" 2 times quickly

erm?
it has nothing to do how fast you click the post button, it will always merge the two posts, except, you have a really slow server, and the db changes are not yet done, until the new post is made, but then you have bigger problems than two not merged posts.

you should consider a server change then.

Exernon
11-21-2005, 02:40 PM
It doesn't auto-refresh the post.

Cyricx
11-21-2005, 03:26 PM
Hmmm, that could be a work around for the ajax couldn't it?

If its in the double posting function have it force a refresh when its done? Which would skip the whole ajax thing.

Then when its not doing the merge ajax would work normally.

Dead End Society
11-21-2005, 03:46 PM
I need this hack to work with ajax man....it's a pain moderating a busy forum without it.

Xenon
11-21-2005, 08:49 PM
that could be a work around for the ajax couldn't it?

yep, but my last tries that way leaded to double merging, , not really an idea why, but it was that way ^^

Snake
11-22-2005, 11:08 AM
Xenon it has been months now and you still haven't fixed the AJAX issue. What's the problem man?

Xenon
11-22-2005, 03:45 PM
Time?

i have more important things to do, then breaking my head on that problem

Exernon
11-23-2005, 01:06 AM
Maybe this is why this hack ain't supported...

^_^

Cyricx
11-23-2005, 03:29 PM
double merging, you mean like it duplicated what you were merging into the post and put it twice?

Xenon
11-24-2005, 05:07 PM
exactly

i found it a bit funny ^^

Paul M
11-25-2005, 07:57 AM
Hmm, well I installed this on my test forum last night, and yes, it has (had) two problems ;

1. The post dateline is not updated on a merge, so it doesn't get seen as unread.

2. The one everyone complains about - no ajax refresh (unless you alter the time stamp, then you get two versions of the same post).


So, since I wanted this on our forum I have fixed both locally - this is what I have done.


1. To fix the timestamp ;

Find ;

// set info

Add below it ;

$dataman2->set('dateline', TIMENOW);

2. To fix the ajax issue, use this nasty hack ;

Find ;

if ($isdoublepost)
{
$id = $doublepost['postid'];
$dataman->save();

//now add edited by
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']) . "')
");
}
}


Replace with ;

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));
}


Seems to work okay for me, feel free to try it. :)

Boofo
11-25-2005, 08:15 AM
Paul, then how will you know when the first post was written? ;)

Paul M
11-25-2005, 08:25 AM
You won't (unless perhaps you add it into the seperator). I don't really care as we only use a 1 hour limit for double posts anyway. If it bothers you then simply don't do step 1 - your choice. :)

keymistress
11-25-2005, 08:32 AM
does this script work on version 3.5.1?
before your hack i tried on 3.5 and it's ok but it doesn't seem to be working for 3.5.1...
or maybe it's just me...

Boofo
11-25-2005, 08:33 AM
You won't (unless perhaps you add it into the seperator). I don't really care as we only use a 1 hour limit for double posts anyway. If it bothers you then simply don't do step 1 - your choice. :)

All I did was ask a question, not complain.

Paul M
11-25-2005, 08:38 AM
All I did was ask a question, not complain.All I did was answer it. :p

moonclamp
11-25-2005, 09:22 AM
All I did was answer it. :p

Why did you call that a 'nasty' hack if it works?

Is there potential for problems?

Snake
11-25-2005, 12:25 PM
Why did you call that a 'nasty' hack if it works?

Is there potential for problems?

I was going to ask the same thing lol.

Boofo
11-25-2005, 12:31 PM
All I did was answer it. :p

This is the part I was referring to:

If it bothers you then simply don't do step 1

;)

Paul M
11-25-2005, 03:45 PM
Why did you call that a 'nasty' hack if it works?

Is there potential for problems?There are no problems with it, it's just a phrase. :)

The 'fix' is really just a workaround to bypass ajax rather than a proper fix using ajax.

Boofo
11-25-2005, 03:57 PM
Hmm, well I installed this on my test forum last night, and yes, it has (had) two problems ;

1. The post dateline is not updated on a merge, so it doesn't get seen as unread.

2. The one everyone complains about - no ajax refresh (unless you alter the time stamp, then you get two versions of the same post).


So, since I wanted this on our forum I have fixed both locally - this is what I have done.


1. To fix the timestamp ;

Find ;

// set info

Add below it ;

$dataman2->set('dateline', TIMENOW);

2. To fix the ajax issue, use this nasty hack ;

Find ;

if ($isdoublepost)
{
$id = $doublepost['postid'];
$dataman->save();

//now add edited by
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']) . "')
");
}
}


Replace with ;

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));
}


Seems to work okay for me, feel free to try it. :)

Shouldn't that be:

$dataman2->set_info('dateline', TIMENOW);[/

Paul M
11-25-2005, 04:16 PM
I don't believe so.

The line probably should't be with the other set_info lines, that just happens to be where I stuck it. :)

Boofo
11-25-2005, 04:26 PM
I don't believe so.

The line probably should't be with the other set_info lines, that just happens to be where I stuck it. :)

Ok, good enough for me. Installed. ;)

Snake
11-25-2005, 04:33 PM
So Paul, this should fix the AJAX issue that we all are having, right?

Xenon
11-25-2005, 05:28 PM
@Paul: the first thing is not a problem, it's designed that way ;)

the change of the dateline was optional in the 3.0 version, but not in the original version, as it allows bumping...

Paul M
11-25-2005, 05:59 PM
@Paul: the first thing is not a problem, it's designed that way ;)It's a problem to me, and a few others from reading the thread. We don't use it for "anti bumping", we just hate it when people double/treble post in quick sucession. The 'fix' is optional of course. :)

@Aftermath - Yes, it gets round it.

moonclamp
11-25-2005, 07:46 PM
There are no problems with it, it's just a phrase. :)

The 'fix' is really just a workaround to bypass ajax rather than a proper fix using ajax.

But will ajax still work on the initial post?

Paul M
11-25-2005, 07:56 PM
Yes.

xxskullxx
11-25-2005, 08:09 PM
Thank you Paul for the update. I will try this out now. :)

Snake
11-26-2005, 10:46 AM
Coolio. I will definitely try this out tonight.

dan35
11-26-2005, 10:57 PM
Hmm, well I installed this on my test forum last night, and yes, it has (had) two problems ;

1. The post dateline is not updated on a merge, so it doesn't get seen as unread.

2. The one everyone complains about - no ajax refresh (unless you alter the time stamp, then you get two versions of the same post).


So, since I wanted this on our forum I have fixed both locally - this is what I have done.


1. To fix the timestamp ;

Find ;

// set info

Add below it ;

$dataman2->set('dateline', TIMENOW);

2. To fix the ajax issue, use this nasty hack ;

Find ;

if ($isdoublepost)
{
$id = $doublepost['postid'];
$dataman->save();

//now add edited by
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']) . "')
");
}
}


Replace with ;

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));
}


Seems to work okay for me, feel free to try it. :)


After using this, I can't post any new thread. Submit new thread, it just pops up a blank page.

Paul M
11-26-2005, 11:38 PM
After using this, I can't post any new thread. Submit new thread, it just pops up a blank page.Well the answer is simple enough, if it don't work for you don't use it.

FYI, It works for me, on two 3.5.1 systems, and no one else seems to have a problem .....

EasyTarget
11-28-2005, 07:54 AM
nm.. learned it in the readme :D
great hack

xxskullxx
11-28-2005, 10:49 AM
@ Paul M:

When I add $dataman2->set('dateline', TIMENOW);
I get this error:
Fatal error: Call to a member function on a non-object in c:\appserv\www\ng\forums\includes\functions_newpos t.php on line 271Adding everything else works fine.

3.5.1

Boofo
11-28-2005, 10:51 AM
@ Paul M:

When I add $dataman2->set('dateline', TIMENOW);
I get this error:
Adding everything else works fine.

Are you running RC2 by chance? ;)

xxskullxx
11-28-2005, 10:53 AM
Sorry just edited my post. Running 3.5.1. I haven't updated my profile in awhile, lol.

Boofo
11-28-2005, 10:55 AM
Sorry just edited my post. Running 3.5.1. I haven't updated my profile in awhile, lol.

Well, it worked fine for me on RC3, although I just took it out and skipped that part of the instrctions Paul gave. Since mine is set at an hour, updating the post time doesn't really make that much sense to me, anyway. ;)

utw-Mephisto
12-01-2005, 10:54 PM
Hmm, well I installed this on my test forum last night, and yes, it has (had) two problems ;

1. The post dateline is not updated on a merge, so it doesn't get seen as unread.

2. The one everyone complains about - no ajax refresh (unless you alter the time stamp, then you get two versions of the same post).


So, since I wanted this on our forum I have fixed both locally - this is what I have done.


1. To fix the timestamp ;

Find ;

// set info

Add below it ;

$dataman2->set('dateline', TIMENOW);

2. To fix the ajax issue, use this nasty hack ;

Find ;

if ($isdoublepost)
{
$id = $doublepost['postid'];
$dataman->save();

//now add edited by
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']) . "')
");
}
}


Replace with ;

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));
}


Seems to work okay for me, feel free to try it. :)


http://ut2004.titaninternet.co.uk/vbb/images/smilies/icon_woohoo.gif

utw-Mephisto
12-02-2005, 08:09 AM
One addition : bbcodes don't work ...

http://www.ut2007world.com/showpost.php?p=20643&postcount=4

dan35
12-04-2005, 12:03 AM
Well the answer is simple enough, if it don't work for you don't use it.

FYI, It works for me, on two 3.5.1 systems, and no one else seems to have a problem .....


A big thank you for your help in getting my problem solved!

If everyone got the same problem, just do step 2, ignore step 1 ;)

Delphiprogrammi
12-04-2005, 01:55 PM
hi people,

Can't get this to work i always get this error


Fatal error: Undefined class name 'vbulletinhook' in functions_newpost.php


that errors keeps on appaering even if i restore the original functions_newpost.php file i can't find the cause ...

Andreas
12-05-2005, 08:34 AM
For those interested, here is an experimental Plugin.

Delphiprogrammi
12-05-2005, 09:38 AM
hi people,

Can't get this to work i always get this error



that errors keeps on appaering even if i restore the original functions_newpost.php file i can't find the cause ...

i'm an idiot i'm testing 3.5.x code on vb 3.0.7 pffff :devious: my testboard stil vb 3.0.7 updating it ..

Paul M
12-05-2005, 10:03 AM
For those interested, here is an experimental Plugin.
Tested, but I get the following error on a double post ;

Database error in vBulletin 3.5.1:

Invalid SQL:

SELECT MAX(dateline) AS dateline
FROM post AS post
WHERE threadid = 192
AND dateline <
AND visible = 1;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND visible = 1' at line 5
Error Number : 1064
Date : Monday, December 5th 2005 @ 12:01:57 PM
Script : http://www.cableforum.info/board/newreply.php
Referrer : http://www.cableforum.info/board/showthread.php?t=192
IP Address : xx.xx.xx.xx
Username : Paul M
Classname : vb_database

Also, the new post is merged into the existing post twice.

Andreas
12-05-2005, 10:33 AM
Hmm, I can't reproduce such problems on my board.

But I think the SQL error is releated to thread/forum subscriptions, as the Datamanager won't return the postid.

Edit: Reproduced.

Actually, the database error causes the double merge:

The QR AJAX JS gets the database error and attempts a repost.

Paul M
12-05-2005, 11:36 AM
Yep - it works - not quite as I (persoanally) want it to, but it does work. :)

I've added the dateline update on a double post (maybe that should be an option).

The main thing I dislike is that it doesn't reload the post automatically - you have to click on the QR 'error' message (there seems to be redirect code in it, not sure why it's not called - a bug maybe ?).

redspider
12-05-2005, 11:46 AM
Yep - it works - not quite as I (persoanally) want it to, but it does work. :)

I've added the dateline update on a double post (maybe that should be an option).

The main thing I dislike is that it doesn't reload the post automatically - you have to click on the QR 'error' message (there seems to be redirect code in it, not sure why it's not called - a bug maybe ?).
I try it and is doing the same thing for me .

Andreas
12-05-2005, 11:59 AM
The redirect Code is called, the JS XML Handler catches it, detects the "error" message and displays it.

Unfortunately, there is no way to automatically reload the page - JS won't be executed and a meta refresh can only occur in the head-section of a HTML document.

An alternative would be to generate a postbit and display it, but then you would have the post displayed 2 times: The post that was already there and the merged post as a new post.

Replacing the existing post via AJAX ist not possible without changes to the JS files.

Snake
12-05-2005, 12:25 PM
Andreas what's your attached file for? A fix to the AJAX issue or what?

Andreas
12-05-2005, 12:38 PM
<a href="https://vborg.vbsupport.ru/showpost.php?p=840714&postcount=154" target="_blank">https://vborg.vbsupport.ru/showp...&postcount=154</a>

Paul M
12-05-2005, 12:41 PM
An alternative would be to generate a postbit and display it, but then you would have the post displayed 2 times: The post that was already there and the merged post as a new post.Yeah, I had exactly the same thing with the file edit version, which is why I added the re-direct. Two versions of the same post is not good.

Replacing the existing post via AJAX ist not possible without changes to the JS files.Hmm, Pity - post editing does it, so I guess it's possible - maybe something could be added to 3.5.2 to allow the replacement of existing posts.

In the meantime I'm going to keep this to one side, for reference, and stick with my current version. Thanks. :)

Andreas
12-05-2005, 12:43 PM
Sure it is possible, as vB_Quick_Edit uses another handler.

But as said, it would require file edits, and I don't want to make file edits.

Paul M
12-05-2005, 12:46 PM
But as said, it would require file edits, and I don't want to make file edits.Sure, hence my suggestion for something in 3.5.2 :)

Team sockopen
12-05-2005, 02:13 PM
Im used ot file edits and if it works id rather make them.

I instaleld it and running perfect simple yet most effective hack for vB =)

KBV
12-08-2005, 02:35 PM
Andreas, great experimental. One sugestion, would it be possible to add another link saying something like "Merge this post with your last post." and when the user clicks it, it merges the message with the post above (his ofcourse)?

eNforce
12-08-2005, 03:14 PM
Andreas- your experimental plugin for me does not add the merged post on another line, but instead adds it on the same line as the previous post. See here (http://www.areyouserios.com/showpost.php?p=13740&postcount=1)

Andreas
12-08-2005, 03:24 PM
Add a newline escape-code (\n) to the spacer

Ragnarok
12-09-2005, 01:49 AM
I'm a terrible n00b to this whole system, where would I add the code and what exactly do I add? :o

An excellent idea, anyway, love to have it ^^

Otikeu
12-09-2005, 03:19 AM
I'm a terrible n00b to this whole system, where would I add the code and what exactly do I add? :o

An excellent idea, anyway, love to have it ^^

Um, you download the .txt of course, all mods are usually in the downloadable form.

Ragnarok
12-09-2005, 05:03 AM
I was asking about Andreas' plugin, actually. Coming from phpBB I have quite a bit of experience with editting files. :p Should have clarified more.

Where in the plugin script do I add the newline escape code and what is that code?

Delphiprogrammi
12-09-2005, 07:09 AM
I was asking about Andreas' plugin, actually. Coming from phpBB I have quite a bit of experience with editting files. :p Should have clarified more.

Where in the plugin script do I add the newline escape code and what is that code?

you need to import that as a plugin in your vbulletin admincp plugin manager download the plugin *.xml and import into the plugin system => done

Boofo
12-09-2005, 07:19 AM
you need to import that as a plugin in your vbulletin admincp plugin manager download the plugin *.xml and import into the plugin system => done

He's asking where in the xml to edit something, not how to install it. ;)

Andreas
12-09-2005, 07:20 AM
Nowhere.
=> vBulletin Settings

Boofo
12-09-2005, 07:24 AM
Nowhere.
=> vBulletin Settings

Is there also a setting or way to allow Admins or staff to bypass this?

Ragnarok
12-09-2005, 08:37 AM
Nowhere.
=> vBulletin Settings
Awesome. Installed and working perfectly ^^ Thanks!

KBV
12-09-2005, 02:06 PM
Forget my request. :P I didn't see the post merge because of the lack of space between the edit and the original post. ^^

lanc3lot
12-11-2005, 05:36 PM
Is there also a setting or way to allow Admins or staff to bypass this?

I am intrested on this too...also when it merges the posts, will be good to keep the time of the last post (now it keeps the time of the first one)

Thnx, cheers:)

utw-Mephisto
12-14-2005, 04:30 PM
EDIT : never mind

biggazillakilla
12-17-2005, 05:59 AM
Yes, great hack, but it would be wonderful if the main post could autorefresh after posting with the quick-reply. I've just installed it, and I'm afraid that some users will get confused (I know I was when I didn't see my post anywhere).

I just checked the ACP of 3.51, and it doesn't have the option to disable AJAX only for the quick-reply--it's for all AJAX, no AJAX, or "problematic" AJAX features.

Thanks for the hack.

biggazillakilla
12-17-2005, 06:09 AM
I just tested the quick reply automerge function here on vB.org, and it's working the way everybody's asking.

Okay, I'm heading off to search to see if I've missed something...

Paul M
12-17-2005, 07:25 AM
Yes, great hack, but it would be wonderful if the main post could autorefresh after posting with the quick-reply. I've just installed it, and I'm afraid that some users will get confused (I know I was when I didn't see my post anywhere).

I just checked the ACP of 3.51, and it doesn't have the option to disable AJAX only for the quick-reply--it's for all AJAX, no AJAX, or "problematic" AJAX features.

Thanks for the hack.Did you try the fix I posted a few pages back ?

mkdevo
12-17-2005, 12:11 PM
@ Paul M:

When I add $dataman2->set('dateline', TIMENOW);
I get this error:
:
Fatal error: Call to a member function on a non-object in c:\appserv\www\ng\forums\includes\functions_newpos t.php on line 271

Adding everything else works fine.

3.5.1

i'm getting the same error above on 3.5.2.. wish i could get that timestamp updated..

mkdevo
12-17-2005, 01:52 PM
This will be done until the old post is older than 1 hour (you can change this timespan yourself)

it should also be noted that the original text file here has it set for 24 hours, not 1 hour.

biggazillakilla
12-18-2005, 01:46 AM
Did you try the fix I posted a few pages back ?Just tracked that down. So your fix basically disables AJAX for the quick reply? Did I understand that correctly? My concern is that I'd like the users to see some of the upgrades, not just the admins/mods.

Mudvayne
12-18-2005, 01:52 AM
clicked install but install kirby's product coz tht seems pretty fine workin..
Xenon dont u think u attach kirby's product on the 1st post of sures.. hehe just becoz i hav to read 157 post to find kirby's solution :P

biggazillakilla
12-18-2005, 02:10 AM
clicked install but install kirby's product coz tht seems pretty fine workin..
Xenon dont u think u attach kirby's product on the 1st post of sures.. hehe just becoz i hav to read 157 post to find kirby's solution :PWow, that message is really hard to understand.

You are asking Xenon to link to Kirby's hack, but you don't link to it? Can you at least link to what you ask someone else to link to?

Paul M
12-18-2005, 02:55 AM
Just tracked that down. So your fix basically disables AJAX for the quick reply? Did I understand that correctly? Not, not correct - Quick Reply works with AJAX as normal for any post that is not a "double post". What the fix does is refresh the page when a double post merge happens.

i'm getting the same error above on 3.5.2.. wish i could get that timestamp updated..If I could reproduce it then I could probably fix it - I just don't get that error on our test or live forums. Maybe someone has a test forum I could have access to that does have the error, so I can try and pinpoint the problem ?

MentaL
12-19-2005, 12:38 AM
hack works fine except on quick reply , i have to refresh to view the post .. how do i solve this?

thanks.

JohnBee
12-19-2005, 08:17 AM
Can someone help me apply this feature to this MOD?

Taken previously from the "3.0.x Prevent Double Posting"
In your includes/functions_newpost.php, find the following:
// we are here, so we may have a doublepost -> do more exact checkings
$doublepost = $DB_site->query_first("
SELECT postid, pagetext, post.title, post.userid, post.attach
and replace by:
// we are here, so we may have a doublepost -> do more exact checkings
$doublepost = $DB_site->query_first("
SELECT postid, pagetext, post.title, post.userid, post.attach, post.dateline AS dateline

Then find:
$post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . $post['message'];

and replace by:
$post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . "$bbuserinfo[username] posted " . ((TIMENOW - $doublepost[dateline]) / 60) . " minutes later:\n" . $post['message'];

I compared the code but I just can't seem to figure out how to apply these changes. Basically I want output simillar to this.

JohnBee added 9 Minutes later...

Instead of the standard merge. All other things work very nicely btw!

JohnBee
12-19-2005, 08:43 AM
Okay update, I got the time etc. to display but I cannot get the username to appear, anyone know why:
"$bbuserinfo[username] posted "
Doesnt work?

Paul M
12-19-2005, 09:48 AM
$bbuserinfo is now $vbulletin->userinfo :)

Paul M
12-19-2005, 09:49 AM
hack works fine except on quick reply , i have to refresh to view the post .. how do i solve this?.by actually reading the posts above yours .........

Rickie3
12-19-2005, 10:00 AM
thanyou so much for this hack,the double posting was getting out of hand on my board
*installed*

MentaL
12-19-2005, 10:00 AM
Not, not correct - Quick Reply works with AJAX as normal for any post that is not a "double post". What the fix does is refresh the page when a double post merge happens.

If I could reproduce it then I could probably fix it - I just don't get that error on our test or live forums. Maybe someone has a test forum I could have access to that does have the error, so I can try and pinpoint the problem ?

http://forum.ragezone.com

sign up and double post somewhere, i dont get an error but the page does not update unless refreshed.

by actually reading the posts above yours ......... silly me

Rickie3
12-19-2005, 10:16 AM
http://forum.ragezone.com

sign up and double post somewhere, i dont get an error but the page does not update unless refreshed.

silly me
i think this is what he means
https://vborg.vbsupport.ru/showpost.php?p=830152&postcount=123

@me puts glasses on and reads posts

AWI
12-19-2005, 10:30 AM
Nice hack, thanks :nervous:

Mudvayne
12-19-2005, 02:03 PM
Wow, that message is really hard to understand.

You are asking Xenon to link to Kirby's hack, but you don't link to it? Can you at least link to what you ask someone else to link to?

:).. https://vborg.vbsupport.ru/showpost.php?p=840753&postcount=157
u don hav to modify any code.. just upload the product.. kieby post it in this thread.. & i'm using it now.. working fine.. & abt linking? either xenon can link kirby's auto marged post product.xml.. or kirby should open a new thread.. coz it 'll b easy to find it.. infact u don hav to read 157 post :banana:

Note: sorry my english :nervous:

Paul M
12-19-2005, 02:21 PM
http://forum.ragezone.com

sign up and double post somewhere, i dont get an error but the page does not update unless refreshed.
I was referring to the timestamp update error in the fix I use. I don't get one, some people seem to.

lanc3lot
12-19-2005, 02:28 PM
And what are the changes on this one u pointed out Shuvo?

Mudvayne
12-19-2005, 05:43 PM
And what are the changes on this one u pointed out Shuvo?

i dont get u :s

i told tht xenon's hack need code modification.. Kirby's dont.. Thats the point.. & i prefer importing product than modify code.. newayz drop it..

biggazillakilla
12-19-2005, 07:18 PM
:).. https://vborg.vbsupport.ru/showpost.php?p=840753&postcount=157
u don hav to modify any code.. just upload the product.. kieby post it in this thread.. & i'm using it now.. working fine.. Thanks for the link. :)

I'm using Xenon's code (which requires editing files), but if there's a plugin, that would be much easier, especially since upgrades require overwriting the files.

Mudvayne
12-20-2005, 12:01 AM
u r welcome :D

lanc3lot
12-20-2005, 08:14 AM
Thanks for the link. :)

I'm using Xenon's code (which requires editing files), but if there's a plugin, that would be much easier, especially since upgrades require overwriting the files.


Ok now i got it:D

Thnx, its much better indeed

Sel
12-21-2005, 02:11 PM
I've installed the plugin created by Andreas, works great. Just got a couple of questions:

1, Is there a way to disable the 'double post' plugin for admins and mods?

2, Is it possible to set no 'Minimum Time before Double Post'. So a user can never double post? At the moment I've just set the limit to a really high number.

Thanks

eoc_Jason
12-29-2005, 06:22 PM
I'm working off the plugin by Andreas too, but trying to modify it some to force a page refresh if its a double post (if its from the quick reply box).

I'm having one issue if I do a double post via the advanced reply box, it refreshs then says "this forum is no longer accepting new posts" or something like that???

This would be great if it was a standard vB option, I think everyone gets annoyed by double-posters...

Update -

If I set the following in either of the postdata_xxx hooks, I can get the page to refresh after posting a quickreply (since ajax is enabled). However, the reply text shows up twice, and I have no idea why. I've peeled through the newreply.php, class_dm_threadpost.php, and functions_newpost.php files with no luck.


$this->registry->GPC['ajax'] = false;


Anyone have some help they want to give?

eoc_Jason
12-30-2005, 02:58 PM
Eureka, I fixed the problem. :) I think it might have had to do with the redirect code being outside of the if() statement, not sure.

I've modified the code so that it will do a page refresh regardless if it's via the quick reply box or advanced reply page. The trick was to set ajax to false, and also I moved the redirect code where it edits the reason. I also modifed it to check just based on userids instead of names, then ids again...

I also had it update the post time when a double post occurs, so that the thread shows as new to people.

NOTE: I've stripped some bits of code out from Andreas' plugin, like the time checking. So compare the code before implmenting to make sure you have the features you want.

EDIT - I've had to remove the code, found a little gitch... will repost once its fixed.

EDIT AGAIN - Well, after trying many things out, I finally determined there is really no way to do it without editing some files or (partially) disabling AJAX.

I did find one little bug in the product xml...

The plugin for postdata_postsave

It shows $vbulletin->url for the redirect, but since its inside a class, it should use $this->registry->url instead. I believe that was my problem with it showing "this forum is not accepting new posts" error when you try to double post via the advanced reply.

beansbaxter
12-31-2005, 05:05 AM
I am running 3.5.2 and it does not work with AJAX, very annoying. I really need/love this mod but I cant implement it unless this is fixed. I am clicking uninstall...

When can or should this be fixed???

Paul M
12-31-2005, 06:48 AM
Fixes are in the thread if you care to read back a bit.

Snake
12-31-2005, 01:08 PM
I guess he is too lazy to search for the link in this thread.

lanc3lot
01-03-2006, 09:32 AM
Has someone found a fix on "prevent automerging for admins" yet?

It will be very usefull this one.

Also, it will be good if the timestamp of the thread, being updated when someone double post and his posts automerged

Thnx in advance :)

Snake
01-03-2006, 11:32 AM
Paul has already implemented a fix for that. Do a search on this thread, it should be there somewhere. ;)

lanc3lot
01-03-2006, 04:22 PM
Hmm, well I installed this on my test forum last night, and yes, it has (had) two problems ;

1. The post dateline is not updated on a merge, so it doesn't get seen as unread.

2. The one everyone complains about - no ajax refresh (unless you alter the time stamp, then you get two versions of the same post).


So, since I wanted this on our forum I have fixed both locally - this is what I have done.


1. To fix the timestamp ;

Find ;

// set info

Add below it ;

$dataman2->set('dateline', TIMENOW);

2. To fix the ajax issue, use this nasty hack ;

Find ;

if ($isdoublepost)
{
$id = $doublepost['postid'];
$dataman->save();

//now add edited by
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']) . "')
");
}
}


Replace with ;

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));
}


Seems to work okay for me, feel free to try it. :)


Apparently u point in this post...can u please tell me in which template / file i must do this edits? I searched the includes/functions_newpost.php but no luck:(

Also, PaulM, have u figured out any hint of how to prevent automerge for the Admin's Posts?

Thnx again:)

Snake
01-03-2006, 04:25 PM
What do you mean no luck? It's working just fine on my forums. :)

lanc3lot
01-03-2006, 04:33 PM
I meant, where i have to do the fileedits, in what file or template...

Paul M
01-03-2006, 04:38 PM
I meant, where i have to do the fileedits, in what file or template...You edit the existing hacks code.

Also, PaulM, have u figured out any hint of how to prevent automerge for the Admin's Posts?I have never even looked at or thought about it, as I have no need of this. :)

lanc3lot
01-03-2006, 04:41 PM
Damn, hope u find a little time and do so :(

lanc3lot
01-03-2006, 04:50 PM
Update

Ok found it, i was using the one with the product, thats why i couldnt find it before:)

Thnx, hope it can be done for admins the one i said too :)


Update 2

PaulM, although i did the step one, the last post time, is not being updated in the time of the last post but stays with the time of the first one..

Any hints?

Puntoboy
01-03-2006, 07:41 PM
any update on this? it is fully released yet?

will be good for the classifieds section to prevent people from bumping for sale posts.

i'm a total noob so any help will be greatly appreciated.

Saskia
01-06-2006, 12:13 PM
Very nice hack! I have used Paul M's fix, but the time only changes on the post itself. So in "new post" searches it doesn't show up and the wrong time is still displayed on the "lastpostby" bit in the forumdisplays.

Anyone know how to change that so the automerged post will turn up as a new post in searches? Thank you. :)

shockx5
01-09-2006, 04:48 PM
This is a great modification, but is there any way to disable it for certain forums, as some forums require double posting rapidly.

i dont know if anything has been posted in this thread about that, so if it has im sorry.

any help would be very much appreciated.

eoc_Jason
01-11-2006, 05:43 PM
I used the code based off someone's plugin posted a few pages back. I removed the time checking so it would always merge their last post, however it would update all the times so it acted as if it was a new post in the thread.

In the postdata_presave I added the following with all the other set's:
$this->set('dateline', TIMENOW);

Here is all of my code in the postdata_postsave, you can see how you have to update both the thread time & forum time:
if ($this->isdoublepost)
{
// Add Edited By Note
$this->dbobject->query_write("
REPLACE INTO " . TABLE_PREFIX . "editlog (postid, userid, username, dateline, reason)
VALUES (" . $this->fetch_field('postid') . ", " . $this->fetch_field('userid') . ", '" . $this->dbobject->escape_string($this->fetch_field('username')) . "', " . TIMENOW . ", '" . $this->dbobject->escape_string('Automerged Doublepost') . "')
");

// Update Last Posted In Thread
$thread =& datamanager_init('Thread', $this->registry, ERRTYPE_SILENT, 'threadpost');
$thread->set_existing($this->info['thread']);

$thread->set('lastpost', TIMENOW);
$thread->set('lastposter', $this->fetch_field('username'));

$thread->save();

// Update Last Posted In Forum
$forumdata =& datamanager_init('Forum', $this->registry, ERRTYPE_SILENT);
$forumdata->set_existing($this->info['forum']);
$forumdata->set_info('disable_cache_rebuild', true);

$forumdata->set('lastpost', $this->fetch_field('dateline'));
$forumdata->set('lastposter', $this->fetch_field('username', 'post'));

$forumdata->set('lastthread', $this->info['thread']['title']);
$forumdata->set('lastthreadid', $this->info['thread']['threadid']);
$forumdata->set('lasticonid', ($this->info['thread']['pollid'] ? -1 : $this->info['thread']['iconid']));

$forumdata->save();

// Set Redirect
$postid = $this->fetch_field('postid');
$this->registry->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$postid#post$postid";
eval(print_standard_redirect('redirect_doublepost' , true, true));
}


The reason the forum & thread do not get updated is because an "edit" creates the $this->condition and thus the other two queries will not run automatically.

Hope this helps.

JohnBee
01-11-2006, 06:01 PM
I have modified the code as follows:
$post['message'] = $doublepost['pagetext'] . $dp_settings['spacer'] . " $vbulletin->userinfo[username] added " . intval((TIMENOW - $doublepost[dateline]) / 60) . " minute(s) " . intval((TIMENOW - $doublepost[dateline]) % 60). " seconds later...\n\n" . $post['message'];

No matter what I try I cannot get it to display the username in the comment, can someone help me?

IrPr
01-11-2006, 07:35 PM
PaulM ur fix not workin when upgraded to 3.5.3



Fatal error: Call to undefined function: build_thread_counters() in c:\program files\easyphp1-8\www\forum\newreply.php(530) : eval()'d code on line 14

biggazillakilla
01-12-2006, 04:44 AM
Hmm, I can't reproduce such problems on my board.

But I think the SQL error is releated to thread/forum subscriptions, as the Datamanager won't return the postid.

Edit: Reproduced.

Actually, the database error causes the double merge:

The QR AJAX JS gets the database error and attempts a repost.This one works in an interesting way, too. (Attachment link (https://vborg.vbsupport.ru/attachment.php?attachmentid=38854).) I've just tested it on my test board, and it merges all posts without paragraph breaks, which doesn't look too good.

I seem to recall that you're not developing this as a plugin, but just in case...

EasyTarget
01-12-2006, 05:09 AM
you go to the vbulletin options and you can add linebreaks or whatever you want to do.

IrPr
01-12-2006, 08:14 AM
any suggestion ?


Fatal error: Call to undefined function: build_thread_counters() in forum/newreply.php(530) : eval()'d code on line 14


im got this fatal error when upgrade my board to 3.5.3 and do PaulM's code modifications

PersianImmortal
01-13-2006, 01:44 AM
I got this to work on my 3.5.3 board (TweakGuides Forums (http://forums.tweakguides.com)) by using the original code, modifying as provided by Paul M, and also adding one new feature I think is very useful. This code works with AJAX (e.g. Quick Reply) without any problems, it automatically refreshes the page:

// ########### 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();
}


In summary the modifications to the original code are firstly the second step provided by Paul M (comment tags show Paul's added code as he provided it) - this is necessary for the AJAX refresh to work properly.

I also added an Additional Comment: heading in the Spacer, so that each automerged reply looks like this:

Additional Comment:
Second post text merged into first post

Additional Comment:
Third post text merged into first post

That way it becomes obvious what's been merged, both to the user and the reader. Also helps prompt the user to use the Edit button to add additional comments next time rather than just post multiple times in a row.

As I said, this now works perfectly on my board, and having tested it with both standard replies, quick replies using full AJAX features enabled, there are no errors or glitches.

Many thanks to Xenon and Paul M for this great mod, very useful and prevents a lot of conflicts and work for mods who get tired of having to merge multiple posts by individuals.

IrPr
01-13-2006, 09:34 AM
Nice! but it works same as Andreas's Product
but PaulM's method don't need refreshing

Puntoboy
01-19-2006, 11:56 PM
i'd like to use this on my forum but only in the for sale area.

how can i do this?

murrtex
01-20-2006, 02:02 PM
I got this to work on my 3.5.3 board (TweakGuides Forums (http://forums.tweakguides.com)) by using the original code, modifying as provided by Paul M, and also adding one new feature I think is very useful. This code works with AJAX (e.g. Quick Reply) without any problems, it automatically refreshes the page:

// ########### 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();
}


In summary the modifications to the original code are firstly the second step provided by Paul M (comment tags show Paul's added code as he provided it) - this is necessary for the AJAX refresh to work properly.

I also added an Additional Comment: heading in the Spacer, so that each automerged reply looks like this:

Additional Comment:
Second post text merged into first post

Additional Comment:
Third post text merged into first post

That way it becomes obvious what's been merged, both to the user and the reader. Also helps prompt the user to use the Edit button to add additional comments next time rather than just post multiple times in a row.

As I said, this now works perfectly on my board, and having tested it with both standard replies, quick replies using full AJAX features enabled, there are no errors or glitches.

Many thanks to Xenon and Paul M for this great mod, very useful and prevents a lot of conflicts and work for mods who get tired of having to merge multiple posts by individuals.

hi PersianImmortal ,I used yours everything is ok.refreshing,quick reply,click reply button...but when I click new thread button and I post ,page says Database errors

MySQL Error : Duplicate entry '10006' for key 1
Error Number : 1062

the post goes but page says that, I think needs a little arrangement,,what should we do?

my version 3.5.3

Paul M
01-20-2006, 03:35 PM
You need to post all the error message.

Alex_
01-20-2006, 03:51 PM
I just installed this mod on my vb 3.5.3 but I'm one of those who want the dateline to be updated...
I added

$dataman2->set('dateline', TIMENOW);

I also tried it with set_info but it doesn't work for me.
The post date doesn't get updated so I don't get a 'new post'...
Do I have to add another code with 3.5.3?
What could be wrong?

CBE
01-20-2006, 05:49 PM
hi all,,
can any body conclude to us how can we install it @ 3.5.5 ??
WITH OUT ERROR ... lol ...
thanx allll

murrtex
01-20-2006, 06:43 PM
Database error in vBulletin 3.5.3:

Invalid SQL:
INSERT INTO thread
(postusername, postuserid, title, iconid, visible, forumid, similar, dateline, open, attach, lastpost, lastposter, replycount, hiddencount, threadid, firstpostid)
VALUES
(***', 1, 'testttttttt', 0, 1, 1266, '', 1137789007, 1, 0, 1137789007, 'Mu?', 0, 0, 10027, 20630);

MySQL Error : Duplicate entry '10027' for key 1
Error Number : 1062
Date : Friday, January 20th 2006 @ 10:30:08 PM
Script : http://www.4umturk.com/forum/newthread.php
Referrer : http://www.4umturk.com/forum/newthread.php?do=newthread&f=1266
IP Address :***
Username : ***
Classname : vb_database

Paul M, this is the full error code..

Paul M
01-20-2006, 07:34 PM
Try running a repair on the thread table.

murrtex
01-20-2006, 09:30 PM
ohh sorry I forgot to replace $id = $dataman->save(); :D
now its ok..

Daniel
01-20-2006, 10:47 PM
hi all,,
can any body conclude to us how can we install it @ 3.5.5 ??
WITH OUT ERROR ... lol ...
thanx allll
3.5.5!? Where have I been? :speechless:

Alex_
01-21-2006, 07:07 AM
To solve the dateline problem I had to update the timestamp manually
I inserted

$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "post SET dateline = " . TIMENOW . " WHERE postid = ".$post[postid]);
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "thread SET lastpost = " . TIMENOW . " WHERE threadid = ".$threadinfo[threadid]);

to renew post and thread timestamp to have an 'unseen' post.
Now I'm happy with it ;)

CBE
01-22-2006, 08:03 PM
3.5.5!? Where have I been? :speechless:


sorry i mean 3.5.3


so any body can conclude to us how can we istall it on 3.5.3 ?????

:ermm: :ermm: :ermm:

Alex_
01-23-2006, 03:17 AM
I used this one
https://vborg.vbsupport.ru/showpost.php?p=872072&postcount=229
with this optional one
https://vborg.vbsupport.ru/showpost.php?p=878427&postcount=240
on my 3.5.3 having no problems so far...

gwhooooey
01-23-2006, 05:56 AM
To solve the dateline problem I had to update the timestamp manually
I inserted

$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "post SET dateline = " . TIMENOW . " WHERE postid = ".$post[postid]);
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "thread SET lastpost = " . TIMENOW . " WHERE threadid = ".$threadinfo[threadid]);

to renew post and thread timestamp to have an 'unseen' post.
Now I'm happy with it ;)

Where exactly does that code go?

Alex_
01-23-2006, 11:25 AM
I put it above

$vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "p=$post[postid]#post$post[postid]";
eval(print_standard_redirect('redirect_postthanks' , true, false));

ultranerds
02-01-2006, 07:34 AM
Is there a plugin that does this? :rolleyes: (sorry, just trying to avoid where possible, from making core code changes <G>)

TIA

Xenon
02-01-2006, 02:07 PM
nope!

not everything is possible with plugins....

Snake
02-01-2006, 03:23 PM
Duh! :D

IrPr
02-01-2006, 09:33 PM
nope!

not everything is possible with plugins....

UPDATED TODAY?

Paul M
02-01-2006, 09:40 PM
UPDATED TODAY?Not the hack, just the text of the first post by the look of it.

Emilian
02-01-2006, 09:48 PM
thank you very much :p