Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : The Site : Experimental forum code
Page 1 of 2
2
New Topic New Poll Post Reply
Poster Message
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Experimental forum code (+6)  
I'm working on some experimental code for the forum, and would like to get some feedback on how it works on various browsers and OSes.

My main goal for these changes is to minimize server load, by getting rid of unnecessary full-page refreshes. One example - the one I've chosen to code for testing - is moderating posts. For a simple action like that, it used to require a lot of work on the server's part - generating the HTML for the entire page, even though very little was changing.

With the current system in place, the server is doing much less - just adding and subtracting mod and rank points, and generating a very small piece of HTML.

With help from a couple people, I've seen that this works on many browsers on Windows, Linux, and FreeBSD, and haven't seen it fail on any browsers yet. Try it out, and let me know if it works. If I can get it working reliably for pretty much everyone, I'll start using this for various other things.


____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-14-2005 at 02:23 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
Mattcrampy
Level: Smitemaster
Avatar
Rank Points: 2388
Registered: 05-29-2003
IP: Logged
icon Re: Experimental forum code (+3)  
Well, it worked under Firefox 1.5rc1.

____________________________
What do you call an elephant at the North Pole?
Click here to view the secret text

11-14-2005 at 04:25 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
eytanz
Level: Smitemaster
Avatar
Rank Points: 2708
Registered: 02-05-2003
IP: Logged
icon Re: Experimental forum code (+2)  
Works fine under Firefox 1.0.7 as well (Windows XP). A lot faster, too.

I no longet get messages when trying to mod my own post, however; nothing happens, but it fails silently.

____________________________
I got my avatar back! Yay!

[Last edited by eytanz at 11-14-2005 04:39 AM]
11-14-2005 at 04:37 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Experimental forum code (+2)  
eytanz wrote:
I no longet get messages when trying to mod my own post, however; nothing happens, but it fails silently.
I think I did something about this at approximately the same time you edited this in - I simply removed the Good/Bad links from your own posts.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-14-2005 at 05:40 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
leroy00
Level: Master Delver
Avatar
Rank Points: 155
Registered: 09-30-2003
IP: Logged
icon Re: Experimental forum code (+2)  
It works fine under Mozilla 1.7.2 as well. Instant gratification on mod! Nice job.

-leroy

____________________________
You can hear happiness staggering on down the street -- footless, dressed in red.
-Jimi Hendrix, "The Wind Cries Mary"
11-14-2005 at 09:28 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: Experimental forum code (+2)  
I did a little testing, and found out that if someone mods a post while you're viewing the page, and you then go on to mod the same post in the opposite direction, the resulting mod is identical to what it was before you modded the post, which of course is the way it should be -- however, this also means that there's no indication at all that the mod was actually accepted. If this happens to someone without them being aware of what happened, they might try modding the post again (thinking the click didn't work or somesuch), and since most people have a limited supply of modpoints they might not like the result. Point is, some feedback in this situation might be nice.

- Gerry
11-14-2005 at 10:01 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Tim
Level: Smitemaster
Avatar
Rank Points: 1979
Registered: 08-07-2004
IP: Logged
icon Re: Experimental forum code (+7)  
I was just modding trick's post, and even though it is faster, it's still a bit strange. I try to put my mouse cursor on the "Good" text, and before I clicked it, it shows "2 out of 120". After I clicked on "Good", it still shows the same text.

Of course I did missed the 2 mod points, but that did not show up until I refresh the page O:-

-- Tim

____________________________
The best way to lose customers is to let little kids running loose on a forum with too many mod points.
11-14-2005 at 01:21 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
AlefBet
Level: Smitemaster
Rank Points: 979
Registered: 07-16-2003
IP: Logged
icon Re: Experimental forum code (+3)  
It appears to work under FireFox 1.0.7 on Gentoo Linux, too. Even reloading the page after doing a moderation seems to work. I did notice the same glitch as Tim, though.

Edit: And the moral of the story is, whenever Schik makes a posting that says "can you guys test this thing with the mod system?", get a post in that thread as soon as possible!

____________________________
I was charged with conspiracy to commit jay-walking, and accessory to changing lanes without signaling after the fact :blush.

++Adam H. Peterson

[Last edited by AlefBet at 11-14-2005 05:45 PM]
11-14-2005 at 05:38 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Experimental forum code (+2)  
I've fixed the glitch that Tim noticed and AlefBet verified.

Trick, do you have any ideas how to give that feedback? This happened before as well, but the visible refresh of the page was a pretty good hint that something had happened.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-14-2005 at 05:54 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
Watcher
Level: Smitemaster
Avatar
Rank Points: 902
Registered: 02-04-2003
IP: Logged
icon Re: Experimental forum code (+1)  
This works fine for me, except that adding points to Hold Karma still causes a refresh of the page.

____________________________
Today the refrigerator, tomorrow the world!
11-14-2005 at 09:45 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Experimental forum code (0)  
Watcher wrote:
This works fine for me, except that adding points to Hold Karma still causes a refresh of the page.
Yeah, that's coded separately. I'll change it to the new system as well, once I'm sure it works for everyone.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-14-2005 at 09:48 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
StuartK
Level: Smitemaster
Avatar
Rank Points: 564
Registered: 06-10-2003
IP: Logged
icon Re: Experimental forum code (0)  
Nothing happens in Opera 7.54 (fails silently) I've been putting off upgrading to the latest, 8.5, but will do so shortly to try that as well, unless you want me to do more testing with this version...?
11-15-2005 at 04:12 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Experimental forum code (+2)  
StuartK wrote:
Nothing happens in Opera 7.54 (fails silently) I've been putting off upgrading to the latest, 8.5, but will do so shortly to try that as well, unless you want me to do more testing with this version...?
I've tried it in Opera 8.5 on Windows, so I know it works there. How old is Opera 7.54? Looking at our logs, I don't see many visitors using 7.54, though that's probably because they all have it spoof IE.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-15-2005 at 04:32 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
StuartK
Level: Smitemaster
Avatar
Rank Points: 564
Registered: 06-10-2003
IP: Logged
icon Re: Experimental forum code (+1)  
Inconceivably long ago - about August 2004. I'm embarassed.

Those visitors could possibly be all me - a few per day. I have Opera set to open a number of pages which I regularly check, though I generally browse drod.net via Firefox or IE, so this is a data point only.

[Last edited by StuartK at 11-15-2005 05:00 AM]
11-15-2005 at 04:47 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: Experimental forum code (+5)  
Schik wrote:
Trick, do you have any ideas how to give that feedback? This happened before as well, but the visible refresh of the page was a pretty good hint that something had happened.
Sure. Here's some ideas:

* Show the post mod count in a different color and/or font (or bold, italic, etc).
* Show "(modded)" after the mod count.
* Redirect to a 50mb flash multimedia extravaganza that explains what happened.
* Show the amount modded by you in that session in another set of parenthesis after the total mod count (so if you click 'Good' on a post with -1, it could show "(0) [Good | Bad] (+1)"). (This would go away on leaving/reloading the page)

- Gerry
11-15-2005 at 10:51 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Experimental forum code (+2)  
trick wrote:
* Show the amount modded by you in that session in another set of parenthesis after the total mod count (so if you click 'Good' on a post with -1, it could show "(0) [Good | Bad] (+1)"). (This would go away on leaving/reloading the page)
As tempted as I was by the Flash extravaganza, I implemented this one. Like it?

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-15-2005 at 08:22 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
AlefBet
Level: Smitemaster
Rank Points: 979
Registered: 07-16-2003
IP: Logged
icon Re: Experimental forum code (+1)  
Here's another minor glitch. Most people probably won't care about it. But after moderating someone, you don't see any change in their rank points indicator on the page.

This might not matter that much, though. Fixing it may require a full reload anyway (since that counter may be next to multiple posts).

____________________________
I was charged with conspiracy to commit jay-walking, and accessory to changing lanes without signaling after the fact :blush.

++Adam H. Peterson
11-15-2005 at 10:17 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Experimental forum code (+1)  
AlefBet wrote:
Here's another minor glitch. Most people probably won't care about it. But after moderating someone, you don't see any change in their rank points indicator on the page.

This might not matter that much, though. Fixing it may require a full reload anyway (since that counter may be next to multiple posts).
Yeah, I thought about that. I do believe I *could* make it work, even for all of that user's posts on the page, but... is it worth the effort? And would the extra time in doing so (figuring out what posts by that user are on the page) make it less effective in reaching it's goal of being less strenuous on the server?

At least for now, I'm more interested in whether or not this works for everyone, and thus if this sort of thing is worth pursuing. Once I'm sure it is, then I'll do more tweaks of that sort.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-15-2005 at 10:22 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
trick
Level: Legendary Smitemaster
Rank Points: 2580
Registered: 04-12-2003
IP: Logged
icon Re: Experimental forum code (+1)  
Schik wrote:
Like it?
Aye, cap'n simian primate, it's great! I don't have any bananas on me at the moment, but here's an orange: O

- Gerry

[Last edited by trick at 11-16-2005 09:39 AM : icon]
11-16-2005 at 09:38 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
DiMono
Level: Smitemaster
Avatar
Rank Points: 1181
Registered: 09-13-2003
IP: Logged
icon Re: Experimental forum code (+1)  
Heehee... you're playing with AJAX.

The Rooster Teeth site uses AJAX for modding, and there were problems with Safari on a MAC. They also use dropdowns for modding though, so it could be related to the fact it's happening using "onchange" rather than functioning based on a link.

Also, something I can't personally test, what would happen if someone with just enough points to mod a post once tried to mod twice? The server would probably throw something back, but will the user be alerted in any way?

Speaking of alerts, how about a simple javascript alert to confirm whether the mod was accepted by the server?

____________________________
Deploy the... I think it's a yellow button... it's usually flashing... it makes the engines go... WHOOSH!
11-17-2005 at 07:05 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
Mattcrampy
Level: Smitemaster
Avatar
Rank Points: 2388
Registered: 05-29-2003
IP: Logged
icon Re: Experimental forum code (+1)  
DiMono wrote:
Speaking of alerts, how about a simple javascript alert to confirm whether the mod was accepted by the server?

www. That's worse than having the page refresh.

Ajax, though, is pretty cool.

____________________________
What do you call an elephant at the North Pole?
Click here to view the secret text

11-17-2005 at 08:04 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Mattcrampy
Level: Smitemaster
Avatar
Rank Points: 2388
Registered: 05-29-2003
IP: Logged
icon Re: Experimental forum code (+2)  
Oh, have we tested down mods yet?

...says Matt knowing full well that down mods will be tested on him.

____________________________
What do you call an elephant at the North Pole?
Click here to view the secret text

11-17-2005 at 08:38 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Experimental forum code (+1)  
DiMono wrote:
Also, something I can't personally test, what would happen if someone with just enough points to mod a post once tried to mod twice? The server would probably throw something back, but will the user be alerted in any way?
after the first moderation, the Good/Bad links would disappear if you didn't have enough points to use them again.
Speaking of alerts, how about a simple javascript alert to confirm whether the mod was accepted by the server?
But... isn't the fact that the moderation score (along with your personal moderation total) changes enough of an indication? If it's not accepted, then the numbers wouldn't change.
Mattcrampy wrote:
Oh, have we tested down mods yet?
Yeah, I've tested them a good amount. And then + modded to make up for it.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-17-2005 at 02:21 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
DiMono
Level: Smitemaster
Avatar
Rank Points: 1181
Registered: 09-13-2003
IP: Logged
icon Re: Experimental forum code (+1)  
Schik said:
But... isn't the fact that the moderation score (along with your personal moderation total) changes enough of an indication? If it's not accepted, then the numbers wouldn't change.
At the time I made that suggestion I had only read the thread, and not tried modding anything.

____________________________
Deploy the... I think it's a yellow button... it's usually flashing... it makes the engines go... WHOOSH!

[Last edited by DiMono at 11-17-2005 09:03 PM]
11-17-2005 at 09:03 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts This architect's holds Quote Reply
jamie
Level: Smiter
Rank Points: 365
Registered: 04-15-2005
IP: Logged
icon Re: Experimental forum code (+2)  
DiMono wrote:
Heehee... you're playing with AJAX.

The Rooster Teeth site uses AJAX for modding, and there were problems with Safari on a MAC. They also use dropdowns for modding though, so it could be related to the fact it's happening using "onchange" rather than functioning based on a link.

From what I can gather (and I might be wrong) "Safari" uses the same code base as Konqueror from KDE.

This modding all works beautifully with Konqueror, however the current 'on' format of the 'click the bar' doesn't work with Konqueror, so that may be similar to the Safari 'onchange' you mention.

By the way, I HATE THE TERM "AJAX" - it's a silly, nothingness name, and a tenuous 'clever' acronym, that was probably invented by some marketing person without a job.

It's a http fetch of data from within a javascript page, on demand, and then the javascript can use that data to update the page. Very nice, and very useful, but the technology is still javascript/html/http (and a cgi backend of some sort)

(I remember seeing a site ages ago use a hacky version where they create an onload of a dynamic '.js' file that is sent back with appropriate javascript values set... Though unlike the javascript-http-fetch, I don't think it could be done more than once on a page...)

But yeah, the idea is neat, and results are neat.

A big "yay" and a big "wooo!" to the http-request-from-within-javascript but please, do we have to have a silly name for it ?

OR, as I say on my homepage:

Ok, I hate "buzz-words". You didn't surf here. They are "diaries" not "weblogs". Links are selected and followed, not 'clicked". There is no super-highway (apart from the road you drive along), and this page isn't under construction - I just haven't had enough spare time to waste on creating it.
So, if you need to go "surfing", "click", and hear "drive carefully", I suggest you first get into your car, tap your fingers, and then drive to the beach.


But then, I am a moody old git :lol


____________________________
#f3i2g# Disclaimer: I'm Welsh, left-handed, and stupid. #f3i2g#
11-19-2005 at 05:06 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
leroy00
Level: Master Delver
Avatar
Rank Points: 155
Registered: 09-30-2003
IP: Logged
icon Re: Experimental forum code (+1)  
If you are looking to save page loadings, how about this: Include a "mark all posts in this board as read" at the bottom of the page while viewing a topic. Often, I decide before I read a topic that I don't want to read any of the remaining ones in that sub-forum, but I reload the forum page just to have all the posts marked as read. Yeah, I could miss some new and improved post by doing that, but it's a risk I'm willing to take. Of course, I have no way of knowing if anyone else would use it.

-leroy

____________________________
You can hear happiness staggering on down the street -- footless, dressed in red.
-Jimi Hendrix, "The Wind Cries Mary"
11-21-2005 at 08:31 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
AlefBet
Level: Smitemaster
Rank Points: 979
Registered: 07-16-2003
IP: Logged
icon Re: Experimental forum code (+1)  
I may have run into an issue with the new moderating code. I moderated a post up this morning but it took a bit of time before the response came back, so the page didn't show any feedback. As a result, I thought I might have missed the link and clicked it again. Pretty soon, the post showed that it was now +2. Not too surprising. However, in parentheses, it showed me as only having done (+1) to it.

It's possible that the post was moderated up by someone else shortly before I moderated it. But I tried it on another post, clicking "good" faster than the server could respond, and got the post to +4 (+3), so I think it is a race condition. I was also able to take that same post back to +2 (+2) by downmoderating it quickly.

____________________________
I was charged with conspiracy to commit jay-walking, and accessory to changing lanes without signaling after the fact :blush.

++Adam H. Peterson
11-21-2005 at 11:55 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5383
Registered: 02-04-2003
IP: Logged
icon Re: Experimental forum code (+3)  
I think I've taken care of this issue - it will now remove the links and display "Loading..." while waiting for a reply from the server. If it doesn't do that for you, try a hard refresh.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
11-22-2005 at 02:07 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
eytanz
Level: Smitemaster
Avatar
Rank Points: 2708
Registered: 02-05-2003
IP: Logged
icon Re: Experimental forum code (+1)  
I tested it, it seems to work fine.

____________________________
I got my avatar back! Yay!
11-22-2005 at 02:10 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
jamie
Level: Smiter
Rank Points: 365
Registered: 04-15-2005
IP: Logged
icon Re: Experimental forum code (+1)  
Yay! Not only does it work fine, I like the fact you get instant feedback to your click, and it also looks cooler too!

oh, and works on my weird freebsd browser too!!

____________________________
#f3i2g# Disclaimer: I'm Welsh, left-handed, and stupid. #f3i2g#
11-23-2005 at 12:57 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Page 1 of 2
2
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : The Site : Experimental forum code
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.