Omnimaga
Omnimaga => Discontinued => Our Projects => OmnomIRC Development => Topic started by: Netham45 on May 10, 2011, 01:44:16 am
-
Since I can get external access to the Omni DB, I'ma do something like this for SpyBot45.
message = mysql_fetch_array(sql_query("SELECT MAX(`id_msg`) FROM `omnitempboard_messages`"));
mID = message[`ID_MSG`];
tID = message[`ID_TOPIC`];
mPoster = message[`posterName`];
topic = mysql_fetch_array(sql_query("SELECT * FROM `omnitempboard_topics` WHERE `id_topic` = %s",tID));
tBoard = topic['ID_BOARD'];
tFirstID = topic['ID_FIRST_MSG'];
fMessage = mysql_fetch_array(sql_query("SELECT * FROM `omnitempboard_messages` WHERE `id_msg` = %s",tFirstID));
tTopicName = fMessage['subject'];
echo sprintf("New Post by %s in %s http://omniurl.tk/%i/%i", mPoster,tTopicName,tID,mID);
I hate SQL sometimes. SMF DB layout even more.
What this does is:
- Request the most recent post
- record name, threadid
- Request the thread associated
- record first post ID(thread subject), board id(for filtering)
- Request the first post in the thread
- Record its subject, it's the title of the thread
That's actually almost all that's required for it, I just need to get it done. That will make it so the site won't slow down really bad when posting if my server is acting up. Right now it's requesting a PHP page off my server every post.
-
I see, so that's especially good if your server is down. I like how we are making these things less dependent on two servers working perfectly.
-
Got it done, posted the source to it in the source thread. Now if Omni hangs making a post, it's not mah fault. :P
-
This is awesome! Hopefully fewer slow downs should occur. :D
EDIT: Netham45, a suggestion for Spybot45 would be to use the display name instead of the user name for post notices. For example, it should say New post by GB instead of New post by Georges W. Bush.
Also do you think you could add TIMGUL notifications to spybot45? That board might eventually merge with Omni anyway (or close).
-
If it merges with Omni, yea. If it stays on 1and1, no. I don't have SQL access to 1and1.
-
Well I can give you access, although I don't know if the PHP code would work, since it uses SMF 2.0 and I recall 1and1 not working with certain PHP sending commands.
Also will the new spybot still be capped at 1 post detected per second? I remember it wasn't before and it would just flood the channel non-stop until it's banned, due to a glitch when two posts are made at once. Or is that fixed now?
-
I don't have SQL access from my server to 1and1, they don't open it like Aspiration does. I'd be able to make it use the PHP mod, though(the previous version of spybot)
-
I think you forgot to keep the cutoff limit for topic titles. SpyBot cut them off at 30 characters.
-
fix'd.
-
Ok good. I am a bit worried it will make OmnomIRC hard to use on lower resolutions. On lower res, we already have to manually scroll down to see the entire text. X.x
-
-Snip-
Removed the bug report 'cause I don't want people abusing it
--Netham
EDIT: THE GAME Why Netgham45 D: