Allegro.cc - Online Community

Allegro.cc Forums » The Depot » Allegro.cc site tour

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Allegro.cc site tour
Thomas Fjellstrom
Member #476
June 2000
avatar

Yet, it'd be just as demanding on resources, and take MUCH longer to capture and turn into a nice interactive video walkthrough.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

CGamesPlay
Member #2,559
July 2002
avatar

Quote:

Why does it take so long to load each time?

If you are referring to the "Loading..." screen, then it's because it has to perform an RPC to Allegro.cc. If you're not referring to the "Loading..." screen, then keep in mind that the tour bubble won't pop up until the page has finished loading (including all images).

Quote:

And why are you hiding the bulk of code? :-/

"Hiding"? http://cgamesplay.com/bin/tour/ is all of the javascript. json.js (available via google) is JSMin'ed, the rest is there, uncompressed and neatly formatted.

Is my coding style that bad? ??? :'(

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Kibiz0r
Member #6,203
September 2005
avatar

I think he meant because you only paste in a tiny snippet in your custom JS box..?

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

else{dryrun = false;var d = new Date();document.write('<script type="text/javascript" src="http://www.allegro.cc/js/user.js/2559?'+((d.getTime()-d.getMilliseconds())/1000)+'"></script>');}

I just would like to point out that no one can see your private user.js file. (That would be a privacy breach.) The user id parameter is completely ignored and really only exists in case multiple people share the same browser.

CGamesPlay
Member #2,559
July 2002
avatar

Quote:

I just would like to point out that no one can see your private user.js file. (That would be a privacy breach.) The user id parameter is completely ignored and really only exists in case multiple people share the same browser.

Yeah, I drew that conclusion. In either case it still works out because the correct user JS file will be returned (the current, uncached one, with dryrun defined).

The problem was that the user JS file was cached, so when I perform the RPC to update the tourConfig variable, the browser uses the cached value (well, Opera did. Firefox refreshed on document.location.reload()). By varying the URL with the current time it always gets updated. Of course it's slower.

If you feel like adjusting the cache settings for the user JS, I'd appreciate it :)

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

bamccaig
Member #7,536
July 2006
avatar

Thomas Fjellstrom said:

Yet, it'd be just as demanding on resources, and take MUCH longer to capture and turn into a nice interactive video walkthrough.

I wonder how long it took to get this much done... :-/ We've seen it's still buggy... As well as unresponsive and slow loading... And unless I missed something it's still very short. :-/ I'm not trying to put down your efforts, CGamesPlay. It's really rather cool, but this might be a good application for Flash... :-/

CGamesPlay said:

"Hiding"? http://cgamesplay.com/bin/tour/ is all of the javascript. json.js (available via google) is JSMin'ed, the rest is there, uncompressed and neatly formatted.

It seems odd that you would have us load code from your custom js (even though what appears to be happening per Matthew Leverton's rule is our own user.js file is loaded again... :-/) and from a file on your domain. Why didn't you just post all of the code (all 1471 lines of it ;))? :-/

Samuel Henderson
Member #3,757
August 2003
avatar

I like the tour and refuse to comment on the soon-to-be argument...;D;)

=================================================
Paul whoknows: Why is this thread still open?
Onewing: Because it is a pthread: a thread for me to pee on.

CGamesPlay
Member #2,559
July 2002
avatar

Quote:

I wonder how long it took to get this much done...

The entire thing has taken roughly 10 hours of work. I originally wrote the balloon library and wanted to test it and show it off a bit. So I made this.

Quote:

We've seen it's still buggy...

Could you please be more specific?

Quote:

As well as unresponsive and slow loading...

See my above post, I need more information. Also, what browser and machine specs?

Quote:

And unless I missed something it's still very short.

Well, there's the front page chapter, which takes you through the news, the front page, the IOTD, and the resources section. Then there's the manual chapter, which includes a short breakdown of the manual page. Then there's the forum chapter, which goes through the thread list as well as the actual thread page. All in all it'll take about 15 minutes to go through if you read everything.

Quote:

It's really rather cool, but this might be a good application for Flash...

It's not possible to do the balloon tips in Flash, or to provide the interactivity part, or to navigate to separate pages on the site. Also the upcoming Posting chapter will really be inappropriate for Flash (it's going to make sure you've selected a good topic, used good writing style, not posted code without code tags, etc).

Quote:

Why didn't you just post all of the code (all 1471 lines of it ;))?

Ideally, the finished product will have all the ugliness of packaging and distribution worked out. Unfortunately, there's going to be at least 200 KB of javascript, even if it's compressed. I want to keep the steps part on my server so that updates happen without reinstalling. And with that vein in mind, tour.js, balloon.js, and json.min.js just follow suit. Btw, "hiding" was a bad choice of words. You can navigate to any of the URLs to read the source yourself. You can copy them to your server, too ;)

What I'd like to happen is have a newbie come to my tour installer, put in their user and password, and have a script copy the necessary code into their custom JS field. Of course, I will also include directions for manually installing, for those who don't feel like giving away their user information. I'm also going to write an uninstaller directly from the tour (after you've seen everything there is to see it will prompt to automatically uninstall itself).

Thanks for everything you guys have said; I'll definitely keep working on it. I'd really appreciate it if you guys kept the bug reports coming in!

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

BAF
Member #2,981
December 2002
avatar

Quote:

I wonder how long it took to get this much done... :-/ We've seen it's still buggy... As well as unresponsive and slow loading... And unless I missed something it's still very short. :-/ I'm not trying to put down your efforts, CGamesPlay. It's really rather cool, but this might be a good application for Flash... :-/

After it loads, it's not unresponsive at all. But go ahead and make one in flash if you feel you can do it better.

Quote:

It seems odd that you would have us load code from your custom js (even though what appears to be happening per Matthew Leverton's rule is our own user.js file is loaded again... :-/) and from a file on your domain. Why didn't you just post all of the code (all 1471 lines of it ;))? :-/

Because it's easier not to do that, and also much cleaner and easier to paste, not to mention it saves space on a.cc from multiple copies of the same code.

CGamesPlay
Member #2,559
July 2002
avatar

Let me break the process down in pseudo-code:
Process of any single page view while the tour is installed:

User custom JS is loaded (possibly from cache)
User custom JS is loaded with caching disabled
JS files from my domain are loaded (possibly from cache)
If the tour has not been run before
    Put up the loading screen
    Open the theme-css page in an iframe
    Set the configuration variable specifying that the tour has been run
    Save the page
    Close the iframe
    Show the welcome screen
Else if the cookie tourWhenPageChanges is set
    Go to that tour page

The second step is necessary because the user JS file is cached by the browser, so tour configuration values are cached, so it will assume the tour has never been run before until the cache expires.

That's why the post goes to "my" user javascript: it's loading a non-cached version of the current user's javascript, so the configuration is guaranteed to be updated. It's very hackish, but without very much thought going towards it I can't see any other way. Well, I could store the tour configuration off-site, but that's evil.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

bamccaig
Member #7,536
July 2006
avatar

CGamesPlay said:

Could you please be more specific?

Apparently I was mistaken. A coworker was actually in control of the interface at the time (I was bragging about Allegro.cc again 8-)) and without reading the IOTD bubble we saw only a close [X] button to interact with. Upon clicky we were suddenly alone in the scary world of Allegro.cc... :'(

So the bug I thought there was wasn't (missing controls in the bubble). It might assist the tour to explain all of the ways you'll navigate the tour at the beginning so users know the tour includes actual A.cc links as well as it's own. There is also the text that is displayed at the top of the custom js page when your JavaScript is loaded... :P It also seems to have duplicated the csmiley smiley counter, though mine is slightly modified and I don't know where the fault is... :-/

{"name":"592355","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6a14c02f776288fc0ca1cf83beef2b1c.png","w":896,"h":244,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6a14c02f776288fc0ca1cf83beef2b1c"}592355

Going through it a second time I wound up stuck in the Manual section... Am I mistaken or was I supposed to navigate to the blit function? I did that (twice) and the tour never came back up... :-/

My only real complaint as of yet is that for a n00b it might be more difficult to navigate. And unfortunately, a simple mistake will close the tour. It might be more user-friendly to keep a Tour icon in a standardized place. If possible it would be more user-friendly to use Flash, which requires no 'installation' and no guessing, but I don't know how feasible it is with your model... :-/

CGamesPlay said:

It's not possible to do the balloon tips in Flash, or to provide the interactivity part, or to navigate to separate pages on the site. Also the upcoming Posting chapter will really be inappropriate for Flash (it's going to make sure you've selected a good topic, used good writing style, not posted code without code tags, etc).

I'm not really experienced with Flash so I don't know it's limits for interacting with a Web page. It could be done in a literal tutorial/tour like movie that takes them through the site. If you can load the Web site into the Flash interface you could still make it live, but I don't know about that... :-/

CGamesPlay said:

Btw, "hiding" was a bad choice of words. You can navigate to any of the URLs to read the source yourself. You can copy them to your server, too ;)

Of course you can. :) If it executes client-side then I can obviously see it. Hiding is actually a pretty good word. Consider hidden files in a file system. You can actually get complete access to them, however, they're [by default] hidden from normal viewing. :) It's really a similar concept.

BAF said:

After it loads, it's not unresponsive at all.

From home, it functions very nicely (Pentium D Duo Core 3.2 GHZ, 2 GB RAM). From work (Celeron 1.0 GHz, 384 MB RAM - or something) it was very poor.

BAF said:

Because it's easier not to do that, and also much cleaner and easier to paste, not to mention it saves space on a.cc from multiple copies of the same code.

That's true, but it's not very wise to execute code from a random user on a Web domain... For a n00b coming to Allegro they might not want to do that. :) It is a lot cleaner though. He could have just attached it to this thread and linked everybody to that (which would only be one copy on Allegro.cc).

It might not hurt for Matthew Leverton to actually add the tour/tutorial to the site after it's completely finished and polished.

In any case, I'm biased about JavaScript so I hate when it's used for really cool things. :)

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

It also seems to have duplicated the csmiley smiley counter, though mine is slightly modified and I don't know where the fault is... :-/

Seems the top row is counting the smilies below the reply box ....

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

BAF
Member #2,981
December 2002
avatar

The top row is counting the bottom row's smileys.

bamccaig
Member #7,536
July 2006
avatar

23yrold3yrold said:

Seems the top row is counting the smilies below the reply box ....

BAF said:

The top row is counting the bottom row's smileys.

There shouldn't be a top or bottom row. :P The user.js file is being loaded twice, hence a second csmiley bar is created, which also counts the smileys in the first row... :-/

Thomas Fjellstrom
Member #476
June 2000
avatar

Matthew recently fixed that afaik.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

BAF
Member #2,981
December 2002
avatar

CGames's javascript loads it a second time...

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

CGames's javascript loads it a second time...

Oh. Silly CGames.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

CGamesPlay
Member #2,559
July 2002
avatar

Matthew fixed the "There is also the text that is displayed at the top of the custom js page when your JavaScript is loaded...", but I've explained why I load the user JS file 3 times so I'm not going to do it again.

Quote:

Going through it a second time I wound up stuck in the Manual section... Am I mistaken or was I supposed to navigate to the blit function? I did that (twice) and the tour never came back up...

Did you get the "Tour Exited" balloon? Btw, if you go back to the control center, press the "Begin Tour" link by the Log Out link to skip to a particular chapter.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

ImLeftFooted
Member #3,935
October 2003
avatar

Quote:

Ideally, the finished product will have all the ugliness of packaging and distribution worked out.

Yeah I've been wanting to make a js 'platform' to allow 1 click (maybe 2) installation of various scripts without leaving the page.

Also, you mentioned that tour config can't update itself without reloading the js file. Is there a reason you can't just store the information in a cookie?

CGamesPlay
Member #2,559
July 2002
avatar

A cookie isn't persistent. Short-term things like the next page in the tour can be stored in a cookie, but whether or not a user has ever seen the tour before needs to be stored in a manner that will affect all browsers he connects to the site from.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

ImLeftFooted
Member #3,935
October 2003
avatar

Hm I see what you're saying. Maybe store it in the "About Me" in the profile.

CGamesPlay
Member #2,559
July 2002
avatar

Matthew seems to have added a field for me :)

[append]
Thanks, Matthew, that will work a lot better! I'll switch to using it ASAP.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

bamccaig
Member #7,536
July 2006
avatar

CGamesPlay
Member #2,559
July 2002
avatar

Now the script is nice and simple. It uses the new User Data feature of Allegro.cc, so it doesn't require any weird hacks. Here's your new JavaScript:
document.write('<script type="text/javascript" src="http://cgamesplay.com/bin/tour/"></script>');The old JS either will or will not work at this point. I'm banking on "will not".

Test this one out, let me know if anybody has any bugs. Tomasu, does it work in Konqueror?

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Thomas Fjellstrom
Member #476
June 2000
avatar

Does nothing. No error, no tour. Js is in my user js just fine as well (viewed source, and took a look at "/js/user.js/476").

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

 1   2   3 


Go to: