View Full Version : Viewing subscribed threads...
mmm..pi..3.14..
06-15-2005, 10:12 PM
Curious if this possible,
Is there a link on these forums where it lists the threads I've posted in, preferrably the most recent 10-20 threads. I know I can view subscribed threads, but I think you have to manually subscribe to each thread in order to view it, it doesn't do it automatically.
Any way to figure out if I've posted in a thread via Javascript or some other way?
Thanks,
Eric ;)
senocular
06-15-2005, 10:45 PM
you an click on your name above your avatar and select "Find more posts by [username]"
Otherwise, you can also use advanced search
Hmm
i am subscribet to any thread where i have posted (automaticly) // i think it's a setting in the user CP
if you wana find the threads where you have posted in
click in a thread on your name
on the next screen you can search for all posts by you and all threads started by you
Flash Gordon
06-15-2005, 10:55 PM
Quick link-->subscribed threads
You don't have to subscribe seperatlly
mmm..pi..3.14..
06-16-2005, 05:22 AM
aha...should have known it would be that easy...completely forgot about doing the search by username method :o
I thought the search wasn't working...then I realized I had accidentally changed the settings for the date so it was only searching the posts made after my most recent visit (which would obviously be the last time I was active on the forums), so it was searching threads from 30 seconds ago or newer, lol.
Thanks fellas, hopefully that will work when I integrate it into my firefox extension for as[org] which I'm working on. It's like the gmail notifier except for actionscript.org You enter your password/username, and set the number of minutes you want it to check for new posts in a thread you've posted in. Every time it checks, it looks to see if any new posts have been made since you last posted in that thread, if there is, it increases the counter and displays a notice. You can then click on the icon and it will open the thread in a new tab/new window. Should I have it check only threads you've posted in or have it notify you of new threads that were recently created??
Here's a screenshot of it so far (ok, so it's not the best image, but I'm not really into graphics...the final one will be much smaller, I just did some quickie editing of the icon at the top of the forums) :) If you want to create an icon for me (PNG format, no taller than 11 pixels), I'd be glad to include your name in the "credits".
Eric ;)
CyanBlue
06-16-2005, 08:57 PM
I think it'd be great if that goes into the taskbar using third party projector tool... ;)
mmm..pi..3.14..
06-17-2005, 12:40 AM
I'm making tremendous progress with it...here's some more screenshots...
I'm like 90% done with the design part of it, so now I pretty much just need the scripting part to actually "listen" for new posts, which shouldn't be too hard :rolleyes: Once I get done with that part I'll release it and let people give some suggestions, then improve upon that.
I still need some excellent logos to go with it, so anybody with good design skills is more than welcome to crank out a few images, like I said...I'll credit you in the "About" section. Here are the specs for the 2 images I need:
* pixels x 11 pixels - used for icon that will go in the statusbar
32 pixels x 24 pixels or smaller - used as the image that will appear when the notification pops up (see the first attachment), and also as the logo that will appear in the extensions panel if the user chooses to uninstall it.
* = any number
Eric :)
Jesse
06-19-2005, 03:07 AM
Wow. That looks really cool mate. It's the sort of thing we'd love to distribute via the site if you were down for it.
Can you tell me a little about how it works and whether it's likely to cause us bandwidth issues? We'd need to consider that from a purely practical perspective. Also, it might be wise to limit it so the lowest number that can be put in for the "check every X minutes" is something like 5, so we don't get 1,000 people 'checking' every 1 minute :)
mmm..pi..3.14..
06-19-2005, 03:31 AM
Well, the way I'm trying to get it to work (unless I think of a better way), is to have it check every X number of minutes (I can set a minimum of whatever you want, though anyone with firefox extension experience could override it...they are all open source extensions) for new posts. The way it does this is to login, using XMLHttpRequest functions that work on firefox and send as.org the username and password. If valid, the extension then checks the recent posts. It does this by doing the equivelant of a search using just the exact username of the person and setting the search to 1 month ago and newer, so it brings up 20 or so threads. Now that it has a search page with all the most recent threads where the user has posted, it skims through it using some basic javascript and checks the name of the last poster to post in that thread. If the name does not match the name of the user (i.e. - last poster is CyanBlue, but the username is mmm..pi..3.14..), then it knows there has been a post since last time the user checked (possibly). The one thing I still have to solve is how to figure out if the user looked at the thread, but chose not to post in it. In that situation, you wouldn't really want to be notified, since you already chose not to post in it, right?? The way I'm thinking I could get around it is to check for the "<strong>" tag. When you are logged in and you click on a thread, even if you don't post in it, the thread no longer has the "<strong>" tag wrapped around the title, know what I mean? If it works, I could just check to see if the title of the thread has the "<strong>" tag around it...if it doesn't, but the name of the last poster does not match, then I know that the user has seen the thread, but chose not to post in it...make sense??
I don't think that it would hog the bandwidth since it doesn't maintain a continuous connection. The way it works is the "loop" actually works from within firefox, it's actually almost identical to setInterval in Flash :) Anyways, every X minutes, it connects to as[org], checks the threads, and terminates the connection. So it's like it's "refreshing" a page...hardly bandwidth hogging. The only other time it would check the threads from outside the loop is when someone clicks on the "Check Now" button, in which case it's doing the same thing, just at an unscheduled time ;)
Eric
Jesse
06-19-2005, 04:02 AM
OK, so as far as I understand it includes just 3 page hits:
1. Hit login page
2. Hit page after login
3. Hit search page.
Sound right? In that case it's a non issue I think.
CyanBlue
06-19-2005, 04:03 AM
How about logging in and running the 'New Posts' link(http://www.actionscript.org/forums/search.php3?do=getnew) and parse to see if there is any new threads that I am subscribed in??? Maybe that's easier???
CyanBlue
06-19-2005, 04:12 AM
That's not fair!!!!!!!!!!!!!!!!!!!!!!!!
When I did the same thing several years ago, you told me zip it cuz it might hit the server too much... :p
Jesse
06-19-2005, 04:24 AM
Hehe sorry. We didn't have as good a server then :)
CyanBlue
06-19-2005, 04:29 AM
Hehe... No worries... I was just teasing you... :D
mmm..pi..3.14..
06-19-2005, 05:11 AM
How about logging in and running the 'New Posts' link(http://www.actionscript.org/forums/search.php3?do=getnew) and parse to see if there is any new threads that I am subscribed in??? Maybe that's easier???
That would work except there's one problem with it. Getting the new posts brings up all threads, not just ones that your "subscribed" too. So if a thread you've posted in gets a new post, but for some odd reason 25 threads get created within 5 minutes or so, then the thread with the new post would be so far down the line that it wouldn't appear on the page, since it only displays about 20 threads at a time :(
What I'm thinking kinda goes like this:
1. It goes to the following page: http://www.actionscript.org/forums/search.php3?
2. - It searches for the username that you log on with (in your case, search for "CyanBlue").
3. - It sets the search dates to "A Month Ago" and Newer
4. - Everything else is left at default search, no keywords are entered since your searching by exact username
If you do that, it should bring up the most recent threads that you are involved in. It's that page which I'm "stripping" the usernames from...make sense??
Eric ;)
Eric, dude run with it. Sounds awesome, I might start using Firefox just to use this neat creation of yours.
mmm..pi..3.14..
06-19-2005, 03:13 PM
hehe, thanks ;)
You should use firefox anyways though. At first even I was hesitant to use it but now I love it more than anything :D Extremely customizable and the extensions that people make for it are way cool. Plus it runs so much better than IE, it was built by very young developers so they added in a whole bunch of debugging tools, I especially enjoy the Javascript console which keeps a list of all errors/alerts/warnings that occur in Javascript :D
I'll keep working on it...just got the "timer" thing figured out, so pretty much all that's left is the part to get the names and chack if the thread has been viewed or not, then I can release it, yeah!!
Eric
CyanBlue
06-19-2005, 06:03 PM
Ah... I think I know what you mean... I guess it goes with how you are using that New Posts link... I normally use that more than I check my own subscribed threads because that's the one I really need to check to see if there is any thread that have 'urgent help needed' or to see if the PHP question is posted in the AS forum and such... :)
mmm..pi..3.14..
06-20-2005, 06:10 AM
Eh...your an admin, so you got to do things differently :)
Ok, Jesse or someone familiar with the login/transferring of data around the site. For some reason, I'm unable to get it to "search" the forums properly. Using the XMLHttpRequest object, and sending all the variables I could, this is what it sent back to me. It should be the source of the search results page, but instead it's just empty basically. It has the menu, and a link to go back 1 page, which makes no sense especially since I've never seen that page ever here. There has to be something I'm missing. Below is the function which should gather the search results, but for some reason it's not. Some of it might not make sense to alot of people, but that's not the part where it's getting stuck. The part where it's getting stuck is pretty much just basic javascript, so anyone can really help with this, but Strok or Jesse would probably know best...there the ones who control the server :)
checkThreads : function()
{
//get the username
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
var username = prefs.getCharPref("asorg.login.username");
//declare the Request, almost identical to LoadVars in flash
var req = new XMLHttpRequest();
//handle when the status of the connection changes
req.onreadystatechange = asorg.handleReadyStateChange;
//open a new connection to the page, the format is:
//Method, URL, Asynchronous/Synchronous (whether or not to
//hold up other requests for websites until this is done, true
//means it won't tie up the connections)
req.open("POST", "http://www.actionscript.org/forums/search.php3", true);
req.setRequestHeader('Content-Type', 'text/html; charset=ISO-8859-1');
req.onerror = function()
{
//only if an error occurs...not relative to the problem
alert(document.getElementById("asorg-bundle").getString("LoggingStatusError"));
req.abort();
}
req.onload = function()
{
//all done, display the result
alert(req.responseText);
}
//send the POST data to the search page, all the following vars are the
//same names as those that get sent via the "real" search page
req.send('&s=&do=process&searchuser=' + username + '&starteronly=0&exactname=1&replyless=0&replylimit=0&searchdate=30&beforeafter=after&sortby=lastpost&order=descending&showposts=0&forumchoice=0&childforums=1');
}
And attached is the HTML file with the exact code that the above code receives. Perhaps someone could shed some light on the subject?? ;)
Thanks,
Eric
madgett
06-20-2005, 06:53 AM
Sweet stuff Eric :)
Bandwidth wise, this should only take as much as 1 page view for every request, just make it 1 request every 1 hour or so...and have a user refresh option...
mmm..pi..3.14..
06-20-2005, 08:36 PM
1 Hour!!!!! :eek:
That's an awfully large interval. The whole point of the extension is to notify you asap after you get a new post. If you had it check once every hour you'd end up with 10+ new posts for someone who posts really often. I think Jesse's idea of 5 minutes minimum sounds completely fair. I'll just have it so you can't go any lower than 5 minutes, but there will be no max limit, so someone could have it check for new posts every 3 hours if they felt like it.
I also thought of something else I should add. Unlike the Gmail Notifier where clicking it just takes you to a list of all your emails, I'll make the extension configurable so you can do the following:
Clicking on the icon opens the forums in a:
1. New Window
2. New focused Tab in current window
3. New unfocused Tab
4. Current Window
If there is more than 1 thread with new posts in it, the window will open to:
1. The list of all the threads that have new posts.
2. The most recent thread to have a new post.
3. Open all threads with new posts in their own tab << placing that in the "maybe" pile
Eric :)
madgett
06-21-2005, 12:56 AM
Can you set it up to check if the user is logged in? You could do it on a per session basis, if the person is logged in then check every __minutes or if the person is logged out then check every hour to cut down bandwidth.
mmm..pi..3.14..
06-21-2005, 06:03 AM
Well, because of the way it's set up, it's kinda always logged out, though it doesn't affect the cookies so logging out from the extension does not mean your logged out if you were to go to the actual site.
The username is stored in the configuration page on the users computer (can be modified by going to the url about:config in firefox), and the password is stored in the "Password Manager" of firefox, so it stays secure. Whenever you start up firefox, the extension checks the options to see if the option to Automatically log in is checked. If so, the extension sends the data to the server and logs itself in, otherwise it doesn't do anything. Only if the person is logged in will the extension work. It's very close to the way the Gmail Notifier works, in fact, alot of the tricks used in my extension came from the Gmail Notifier (Password Manager accessing, storing configuration settings, etc...). If you were logged out from Gmail, it wouldn't make much sense to have it still notify you of new emails right?? :p
Eric
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.