[2.0.10] Double Post Control 1.1.0

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
10
50%
Very Good
6
30%
Good
1
5%
Fair
0
No votes
Poor
3
15%
 
Total votes: 20

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 29038
Joined: Sat Aug 16, 2003 7:36 am

[2.0.10] Double Post Control 1.1.0

Post by Extensions Robot »

MOD Name: Double Post Control 1.1.0
Author: Kinetix-
MOD Description: This MOD effectively stops users from posting the same message twice in a row, which can be caused by page-loading problems and when a user clicks the "Submit" problem twice (double-post).

MOD Version: 1.1.0 (Updated 11/16/04)



Download File: double_post_control_110.mod
mods overview page: View
File Size: 3833 Bytes

Security Score:
Last edited by Extensions Robot on Mon Apr 30, 2007 12:30 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric »

MOD Validated/Released

Notes:
This MOD stops the posting of the same message twice by checking to see if another post has been made with the exact same text.

In a way, this MOD can stop spammers because they won't be able to copy and paste the same message over and over while spamming. They will have to change each message a little bit.
twister17e
Registered User
Posts: 187
Joined: Tue Aug 17, 2004 9:31 pm
Contact:

Post by twister17e »

Excellent, I'm installing now :P .
DK Avalanche
Registered User
Posts: 158
Joined: Fri Oct 31, 2003 10:06 pm
Contact:

Post by DK Avalanche »

simple! :wink:

thanks

Av
Quote by UncleHusker "okay... maybe you can could explain this like i'm a 2 year old (because iam VERY slow at this! lol) "
»»EDDY««
Registered User
Posts: 220
Joined: Mon Jun 02, 2003 10:14 am
Location: Poland/Slupsk
Contact:

Post by »»EDDY«« »

Function work, but:
- why checks title also?
- why signature also?
- why has not no message?
look


Lang Polish:

Code: Select all

$lang['Double_Post_Error'] = 'Nie możesz wysłać takiej samej wiadomo¶ci po raz drugi.';


PS. Sorry for my english.
Make a Tiny URL in excellent domain heh.pl


cooling system & water cooling
Kinetix-
Registered User
Posts: 128
Joined: Sun Aug 01, 2004 12:07 pm
Location: Canada
Contact:

Post by Kinetix- »

Hi, thanks for validating my MOD.

It's actually not to prevent people from copying their text and reposting it, but rather to prevent people from pressing the "Submit" button twice - which I've seen very often when people run into page loading problems -which causes their message to appear twice.

@»»EDDY««: It does not check the title nor the signature. They are not part of the post_text column.
As for no message showing, did you put your message into language/lang_english/lang_main.php? If you did, you should have put it into language/lang_polish/lang_main.php.
User avatar
.Wes.
Registered User
Posts: 29
Joined: Sat Jul 31, 2004 5:29 pm
Location: England!
Contact:

Post by .Wes. »

Thanks Kinetix-! Very neat mod and very usefull.
»»EDDY««
Registered User
Posts: 220
Joined: Mon Jun 02, 2003 10:14 am
Location: Poland/Slupsk
Contact:

Post by »»EDDY«« »

- As for no message showing, did you put your message into language/lang_english/lang_main.php?
Yes.

- to prevent people from pressing the "Submit" button twice - which I've seen very often when people run into page loading problems -which causes their message to appear twice.
It sneezes...
Make a Tiny URL in excellent domain heh.pl


cooling system & water cooling
User avatar
electronikus
Registered User
Posts: 102
Joined: Tue May 18, 2004 11:41 am

Post by electronikus »

...deleted by poster.
Nordica
Registered User
Posts: 31
Joined: Tue Sep 14, 2004 6:00 pm

Post by Nordica »

I have this mod installed on 2.0.10, and it seemd to work just fine, until ..., until I got a double post.

I verified that I installed this mod correctly.

Double post occured when poster replied to a topic, and subject of the reply was blank. Reply showed up twice.
Nordica
Registered User
Posts: 31
Joined: Tue Sep 14, 2004 6:00 pm

Post by Nordica »

Just got another double post on my board with this mod installed.

I just don't know enough about it to figure out how it is happening.

Only similarity is that both double posts were replies to an existing topic, both were not on the first page of the thread, and both had an empty subject line.
Kinetix-
Registered User
Posts: 128
Joined: Sun Aug 01, 2004 12:07 pm
Location: Canada
Contact:

Post by Kinetix- »

Sorry, been away from community for a while.

In the code, try removing this from the double post control:

Code: Select all

AND p.post_time = $lastposttime
See how it goes.
Meithar
Registered User
Posts: 16
Joined: Tue Sep 16, 2003 8:57 am

Post by Meithar »

Kinetix-
Thanks, but... what about bbcode_uid :wink: . This mod control only plain text posts.

Here is my version:

Code: Select all

// Double Post Control
if ($mode != 'editpost') {
	$lastposttime = intval($row['last_post_time']);
	$where_sql = ($userdata['user_id'] == ANONYMOUS) ? "p.poster_ip = '$user_ip'" : 'p.poster_id = ' . $userdata['user_id'];
	$sql = "SELECT pt.post_text, pt.bbcode_uid
		FROM " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt
		WHERE $where_sql AND p.post_time = $lastposttime AND pt.post_id = p.post_id
		LIMIT 1";
	if ($result = $db->sql_query($sql)) {
		if ($row = $db->sql_fetchrow($result)) {
			if ( str_replace($row['bbcode_uid'], $bbcode_uid, $row['post_text']) == $post_message) {
				message_die(GENERAL_MESSAGE, $lang['Double_Post_Error']);
			}
		}$db->sql_freeresult($result);
	}
}
Last edited by Meithar on Sun Nov 14, 2004 4:12 pm, edited 1 time in total.
User avatar
Makc666
Registered User
Posts: 358
Joined: Fri Mar 07, 2003 12:03 pm
Location: MSK-RU
Name: Maxim
Contact:

Post by Makc666 »

Is there any difference with this one??

[2.0.6] Topic flood control
http://www.phpbb.com/phpBB/viewtopic.php?t=156144
Kinetix-
Registered User
Posts: 128
Joined: Sun Aug 01, 2004 12:07 pm
Location: Canada
Contact:

Post by Kinetix- »

Ah, I completely forgot about this MOD.

Makc666: This MOD is for preventing users from posting the same message twice in a row (hitting Submit twice, causes double-posting).
That MOD is for changing the flood control limit (which I thought was a feature of phpBB already?).

As for the bbcode_uid thing, thanks for posting that problem. It's now fixed and will be available as soon as it gets revalidated.
For now, you can get the file here.
Post Reply

Return to “[2.0.x] MOD Database Cleanup”