News:

Wondering if this will always be free?  See why free is better.

Main Menu

Forum Spy

Started by wk38, May 22, 2007, 07:41:36 PM

Previous topic - Next topic

wk38

This is kind of cool. Would be fun to have something like this for SMF.

http://www.rcgroups.com/forums/announcement.php?f=128

littlefeather

that is very cool... it would be nice if this could be put in mod or feature requests, because this is something I would definitely put in my forums

H

As a mod maybe.

IMO it is rather useless as most boards are small so it would basically be a static list anyway :P
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

SlammedDime

I don't think it would be terribly difficult to code... most of it is Javascript based on RSS feeds... and since SMF already has RSS feeds, and the Javascript could probably be easily modified from that.............

Maybe in a few weeks if I'm looking for something to have some fun with :)
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

khoking

That is very cool for a forum with lots of posts on every second or minute...mine not yet reach that stage...but still I would like to have this mod. :P

No, don't name the mod as SPY as it doesn't sound "safe" to members...
Kho King
www.ShaShinKi.com
www.PentaxWorld.com

Daniel15

#5
This looks quite interesting, I'll see if I can code up something similar (as usual, no promises!).
Basically, it checks an XML feed every 15 seconds, for any new posts. If there's some new posts, they're added to the table (one entry each second, so people don't get overwhelmed with posts flooding in :P). As SMF already has an XML feed inbuilt, this would be almost entirely client-side.

Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Rudolf

#6
Daniel, if you do write something like this, make sure to add a setting for the update frequency. Since this is ajax, you can even add a way to shape the frequency based on the server load, dynamically. The higher the load the slower the update time.
Without this feature this would make the servers to crawl even on the small-medium forums - if the users start to use it.

Hints: What happens when the number of returned topics is greater then 15 sec. The script is still loading up the topics in the table and a new request will be made. This would cause some parallel insertions, a total mess. Therefore, you need to write your script to don't send an update request only when the "cache" is empty.

Two, I haven't looked at the other script to see how it handles the topic queue, but topics that go over the bottom of the table should be removed from the page. Think DOM. ;)

That's it for now.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Daniel15

#7
QuoteHints: What happens when the number of returned topics is greater then 15 sec. The script is still loading up the topics in the table and a new request will be made. This would cause some parallel insertions, a total mess.
I think it uses a queue - When a new request is made, all the new posts are pushed to the end of the queue.
I haven't looked through that code properly yet, but I may use it as inspiration (I never copy-and-paste code from someone else, I just use their code as inspiration for my own :)). I saw that they're using a JavaScript library (Prototype.js, I think... I'd personally use Scriptaculous or mootools :))
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Harro

Also take a look at jQuery.
http://jquery.com
http://visualjquery.com

That's a javascript library i've been using lately.
Kinda like it :)

Daniel15

#9
OK, to see what I've done so far, take a look at http://rpl.dev.dansoftaustralia.net/smf/index.php?action=recentlive. It initially loads the latest 5 posts into the list, and then checks every 10 seconds for new ones. Open that page in a new browser window/tab, and then make a new topic (you may login with the username and password of "test"). After a few seconds, you'll see your new post appear in the list :).
You can get the code from its SVN repository (http://dev.dansoftaustralia.net/scm/?group_id=23), but there's no guarantees it will work for you (and I'm not giving any support yet). If you have any suggestions, please tell me :D

QuoteThat's a javascript library i've been using lately.
Kinda like it
Looks nice, I may consider using it.
The only libraries I'm familiar with at the moment are Scriptaculous (which uses Prototype.js) and mootools. I love mootools because it's so lightweight (5 - 40 KB packed, depending on the options you choose when downloading it).
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Tanks

It gives me an error in IE7 when i try to see you demo !

Daniel15

Quote from: Tanks on May 26, 2007, 05:54:26 AM
It gives me an error in IE7 when i try to see you demo !
What errors are you getting?
Sorry, I could not test it in IE7, as I do not have Windows installed at the moment (I use Linux).
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Dannii

#12
base2 is my library of choice ;)
Are you doing this poll based, or Comet based?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Daniel15

Currently, it's poll-based. I'd probably have problems with timeouts and such if I tried to make it Comet-based ;).
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

karlbenson

yes daniel, I get the error too on IE7



Works fine in Firefox for me!

Daniel15

OK, I'll take a look at it when I have access to a Windows PC :).
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

metallica48423

i get no error, using firefox, on a windows based PC

another IE7 glitch :P

This mod is awesome, awesome work daniel15!
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Daniel15

Quote from: karlbenson on May 26, 2007, 11:21:15 AM
yes daniel, I get the error too on IE7



Works fine in Firefox for me!
Was that the full error message? Line 42 on the page itself is unrelated, and line 42 in rpl.js is blank :o.
I'll install my copy of Windows XP into a virtual machine later, download IE7, and see what I can do to fix it ;)

QuoteThis mod is awesome, awesome work daniel15!
Thanks :D

As usual, I'll only release it once I've finished with it, and have time to... This may not be for a while (mid-year exams coming soon!)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Dannii

Quote from: Daniel15 on May 26, 2007, 10:48:12 AM
Currently, it's poll-based. I'd probably have problems with timeouts and such if I tried to make it Comet-based ;).
Apache sucks for Comet too. Polls can work okay, just make sure the footprint is low ;)
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Daniel15

Quote from: eldʌkaː on May 27, 2007, 03:48:31 AM
Quote from: Daniel15 on May 26, 2007, 10:48:12 AM
Currently, it's poll-based. I'd probably have problems with timeouts and such if I tried to make it Comet-based ;).
Apache sucks for Comet too. Polls can work okay, just make sure the footprint is low ;)
Yeah, I'm working on that. Currently it just grabs the XML feed with the 5 latest posts, which is really not needed (and wastes a little bandwidth). I'm going to modify the XML functions to accept a message ID (like ?action=.xml;last_msg=12), and only all messages newer than this are returned. This would make the footprint really small :)
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Advertisement: