Rave Radio: Offline (0/0)
Email: Password:
Page: 1 2 Next »»Rating: Unrated [0]
25$ Contest
Good [+1]Toggle ReplyLink» Nuclear replied on Tue Oct 21, 2003 @ 8:22pm
nuclear
Coolness: 2749650
For whoever can fix the discussion board script to not post double messages before I fix it...
Good [+1]Toggle ReplyLink» lakester replied on Tue Oct 21, 2003 @ 9:38pm
lakester
Coolness: 60405
You could use javascript redirects. When a post is made, bring them to a confirmation page saying something like "Your post has been made, you will know be returned to the thread" and then it automatically redirects to the thread.
Good [+1]Toggle ReplyLink» Nuclear replied on Tue Oct 21, 2003 @ 9:55pm
nuclear
Coolness: 2749650
nope had to be all in php... there already is a redirection...
Good [+1]Toggle ReplyLink» Screwhead replied on Tue Oct 21, 2003 @ 10:18pm
screwhead
Coolness: 686315
Not properly though. Do like some other message boards. When you post, it loads a "Your post is succesful" page with a tiny (like 1second) timer that then brings you back to the discussion forum, but refreshed.
Good [+1]Toggle ReplyLink» neoform replied on Tue Oct 21, 2003 @ 11:13pm
neoform
Coolness: 340390
bah, do it yerself.
Good [+1]Toggle ReplyLink» Purple_Lee replied on Tue Oct 21, 2003 @ 11:23pm
purple_lee
Coolness: 239345
:lol

Lee
Good [+1]Toggle ReplyLink» Zz.ee.vV replied on Wed Oct 22, 2003 @ 12:07am
zz.ee.vv
Coolness: 194750
dude. its dead simple. i would need ur phpMyAdmin to have a clear idea of your tables to implement this, but the idea is eeeasy:

before adding new post to the dbase, do a SELECT for the exact same content with the exact same user on this very same date (or if you wanna be elaborate, posted within the last $time_to_cache_posts set to whatever you want, say 30mins)

if you retrieve an element, display "double post"...

no element? add the post...

thats all :)
Good [+1]Toggle ReplyLink» Mali replied on Wed Oct 22, 2003 @ 12:11am
mali
Coolness: 202840
you seem to know everything
your the man..
Good [+1]Toggle ReplyLink» Zz.ee.vV replied on Wed Oct 22, 2003 @ 1:52am
zz.ee.vv
Coolness: 194750
thanks Heather :) nobody knows everything, but hey I do web design and coding for living... I write PHP every day hehe a message board is not really the most complex thing you can do with it :)
Good [+1]Toggle ReplyLink» Nuclear replied on Wed Oct 22, 2003 @ 1:55am
nuclear
Coolness: 2749650
test '' "" // &&
Good [+1]Toggle ReplyLink» Nuclear replied on Wed Oct 22, 2003 @ 1:57am
nuclear
Coolness: 2749650
It was simpler then that... I think I needed a stripslashes while comparing with the last post... Hopefully the problem is fixed now...
Good [+1]Toggle ReplyLink» Nuclear replied on Wed Oct 22, 2003 @ 2:01am
nuclear
Coolness: 2749650
FROM

if ($show == 'added') {
$mysql_query = "SELECT * FROM boardTopics$forum WHERE author = '$putmeAUTHOR' ORDER BY id DESC LIMIT 1";
$mysql_result = mysql_db_query($db_name, $mysql_query, $mysql_connection);
$row = mysql_fetch_array($mysql_result);
if ($row[body] == $putmeBODY && $row[subject] == $putmeSUBJECT && $row[author] == $putmeAUTHOR) {
$nopost = 1;
$show = 'listings';
}
}

TO

if ($show == 'added') {
$mysql_query = "SELECT * FROM boardTopics$forum WHERE author = '$putmeAUTHOR' ORDER BY id DESC LIMIT 1";
$mysql_result = mysql_db_query($db_name, $mysql_query, $mysql_connection);
$row = mysql_fetch_array($mysql_result);
if ($row[body] == stripslashes($putmeBODY) && $row[subject] == stripslashes($putmeSUBJECT) && $row[author] == $putmeAUTHOR) {
$nopost = 1;
$show = 'listings';
}
}
Good [+1]Toggle ReplyLink» Zz.ee.vV replied on Wed Oct 22, 2003 @ 2:04am
zz.ee.vv
Coolness: 194750
so essentially you comparing it to this particular user's last post

that works too :) unless someone has a few ravewave windows open with different threads, using all of em...

i dunno if i were you i'd WHERE thread as well as the author
Good [+1]Toggle ReplyLink» Nuclear replied on Wed Oct 22, 2003 @ 3:11am
nuclear
Coolness: 2749650
I can search the last 5 posts by that user also... Maybe that would be better...
Good [+1]Toggle ReplyLink» neoform replied on Wed Oct 22, 2003 @ 9:59am
neoform
Coolness: 340390
why not just check all the replies in the thread by that user to see if any are the same?
Good [+1]Toggle ReplyLink» Nuclear replied on Wed Oct 22, 2003 @ 3:06pm
nuclear
Coolness: 2749650
cause this also checks if the user posts a message 2 times... without replying...
Good [+1]Toggle ReplyLink» Zz.ee.vV replied on Wed Oct 22, 2003 @ 3:39pm
zz.ee.vv
Coolness: 194750
yeah someone might have replied "lol" two days ago and wants to reply "lol" again hahaha

i think the last 5 post checking is prolly the simplest and best way to handle the multiple-windows-open thing.
Good [+1]Toggle ReplyLink» neoform replied on Wed Oct 22, 2003 @ 5:23pm
neoform
Coolness: 340390
i dunno, why not stop duplication altogether? like say, no identical threads by the same user ever?

it'd stop the whole 75 "hi jeff" threads.. then maybe they'll just keep using the same one..
Good [+1]Toggle ReplyLink» OMGSTFUDIEPLZKTX replied on Thu Oct 23, 2003 @ 4:04am
omgstfudieplzktx
Coolness: 67240
there are a few ways noah:

One, someone does a post, bring them to another page, then another.

The double posts happen from refreshing pages that have been posted to, and the information gets posted again. So the page that it gets posted to should use a JAVASCRIPT redirect or a META redirect back to the discussion page. This is how most forums work to prevent double posts.

The other but less reliable way is to check the contents of the message and subject. If BOTH the message and the subject are identical (use MD5 hashes of the content) as well as the person posting, then its probally a double post, but not necessarily. You could add date/time checkers too, but why bother when the first solution is the best one.
Good [+1]Toggle ReplyLink» OMGSTFUDIEPLZKTX replied on Thu Oct 23, 2003 @ 4:09am
omgstfudieplzktx
Coolness: 67240
$message = md5($_POST["message"]);
$subject = md5($_POST["subject"]);

$sql = mysql_query('SELECT MD5(message) AS message, MD5(subject) AS subject, poster_id FROM posts WHERE message=''.$message.'' AND subject=''.$subject.'' AND poster_id=''.$_SESSION["userid"].''') or die(mysql_error());

if (mysql_num_rows($sql)) {
// double post
} else {
// post is good, continue
}

but again, this isn't the best solution as it adds more pressure on the database than necessary and its not always reliable.
25$ Contest
Page: 1 2 Next »»
Post A Reply
You must be logged in to post a reply.