![]() |
If I understand you right, post 24 (https://vborg.vbsupport.ru/showpost....5&postcount=24) has a tip that lets you define a comment for double posts. Also note the correction in post #25 as well. :)
|
@Xenon
It seems like this hack does provide some kind of "backdoor": It allows the user to add more images to his post then he would normally be allowed to have. Furthermore, it seems like this adds a query whenever a new reply is posted. What about adding $threadinfo['lastposter'] == $bbuserinfo['username'] to the condition before $doublepost = ...? As this evaluates to false if there is no double post (and thus the whole term will be false) it's not necessary to continue evaluating the query, or am I wrong? |
@Kirby: hmm, right, the backdoor is possible, will have to take a look at it...
As for the second part. yes, you can avoid the query in the if clause, by that, but you will still need the query when you update the post later (because of deleting the postindex, updating the pagetext... Also as we have had some problems sometimes, when the lastposter cache isn't correctly or something like, then the string compare would resolve incorrectly. I think it doesn't matter that much, but i'll consider it when i have the time to look through all of my hacks soon :) |
Hmm, i was just thinking: Sometimes, when users make doublepost it is, because they just can post a special ammount of images per post.
So, the question is, should i really fix that 'backdoor'? |
Quote:
|
Quote:
|
nice to get two totally different answers ^^
well, i'll think about it ^^ |
Well, actually I got a couple of users who explicitly use this got get more images into their posts :(
|
Ok, i have uploaded Version 1.4.
It now checks if the new post is valid regarding the settings (max images/ max characters...) If it is, then it will merge the post, if it's not, then the new post will be a true doublepost. I did it that way, because the limit will appear when doing an edit on a merged post otherwise. Also i have removed a bit overhead of the code. My test worked well, but i consider it as RC, until some of you can confirm they don't have problems (there shouldn't be, but you cannot be too sure ;)) |
Really nice and needed hack thnx Xenon
my question and forgive me if it was mentioned before, what if a user clicks the Quick Reply icon to replay to the first post and clicked it again to replay lets say to the 3rd post in there and clicked again to reply to the 6th reply in there, would this hack merge all 3 posts as you see there seperate replies Thnx |
Yes it will.
|
That way, you have a multiple quote option included *ggg*
As mentioned in the description, this hack is for linear mode, threaded mode users, shouldn't use it. but as there are more problems when someone enables threaded mode on his board, then he will know if or not to install this hack ;) |
Thanks for the update Stefan.. :)
I had a couple of modifications applied to this hack that were mentioned earlier in this thread, and have re-applied them but just wanted to make sure that they have been done correctly. As I understand it, TIMENOW - 3600 now has 2 instances - so if I wanted to increase the time limit to 3 days, I'd replace BOTH instances of 3600, correct? Also, I don't want admin posts to be merged no matter what, so applying a similar mod to last time should be ok, right? I now have this line: Code:
if ($type != 'thread' AND $bbuserinfo['usergroupid'] != 6 AND $threadinfo['lastpost'] > TIMENOW - 172800 AND $threadinfo['lastposter'] == $post['postusername']) |
I think you should use $bbuserinfo['permissions']['adminpermissions'] & CANCONTROLPANEL instead of checking for the usergroup, as admins could be in any usergroup ;)
I've also modified this so the time after which a post is considered a double post and if the post's timestamp should be modified are now settings in Message Posting & Editiong Options, so they can be changed easily :) |
Quote:
Quote:
|
Quote:
PHP Code:
Quote:
Create two new settings (I called them dblpostthreshold and bumpdblpost) where you want them. The first one being an input (for the seconds, could also be minutes or hours - then you would have to add the appropriate multiplier to the code) and the second being a yesno option. Then replace PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
*gg*
I'm always to lazy to create settings ;) @OKnight: correct, both instances have to be changed. the other code is correct (at least if you just consider the main usergroup of admins ;)) |
Thanks for the confirmation Stefan.. :)
Quote:
Code:
$bbuserinfo['usergroupid'] != 6 Code:
can_moderate() |
Yup. Of yourse you can also just check the usergroup id - as long as you don't have admins, supermods oder mods in other usergroups then the standard groups ;)
|
Using can_moderate() doesn't work..
My double posts are getting merged. |
Hmm ... mine don't :)
Could you post the exact if () you are using? |
Here you go.. :)
Code:
if ($type != 'thread' AND can_moderate() AND $threadinfo['lastpost'] > TIMENOW - $vboptions['dblpostthreshold'] AND $threadinfo['lastposter'] == $post['postusername']) |
Well, that's wrong :)
You want the doublepost filter for all those who can not moderate, therefore it must be PHP Code:
|
Whoops.! :o
Hehe, thanks again Kirby. |
Installed.
A life saver. |
install clicking all the time :D
|
Wheres the install button
|
at the top right of each showthread page :)
|
It doesnt have one on my skin?
|
anyone?
|
Then use a different skin :P
|
AWSOME!!! Works like a charm, thanks!!!
|
Quote:
|
tHANKS ALOT!
Woops ^^. |
*installed*
very 9 hac |
Quote:
Now, I'm wondering if it's possible to do what Baptizer suggested? I would really like a little line stating when the edit was made. Thanks again. *clicks install* |
Hmm, shouldn't be that hard to add, i'll put it on my list :)
|
Cheers Xenon.
Perfect to stop my users double-posting to earn cash for the Arcade! *clicks install* |
Xenon,
Thanks for this. I am trying to tweak it so that it always merges the post, no matter what the time limit is. So what would I need to change to prevent double posting, full stop? Will definately click install when I can do this. Cheers for the help in advance, JD. :) |
very easy, just remove that line:
Code:
AND dateline > " . (TIMENOW - 3600) . " PHP Code:
|
All times are GMT. The time now is 08:57 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|