PDA

View Full Version : Can you Light Bulb date/time customizable?


Deb
03-19-1999, 03:06 PM
Hmmm I wouldn't know how to do it really but if you have ideas I'm certainly willing to work with you on getting them on the aota site and allowing you to test them out and see if it will solve the problem...

Just hit me in email if you have something for me to upload http://www.aota.net/ubb/wink.gif

Deb

meikel
03-19-1999, 05:39 PM
Hi Deb,

no time for this at the moment. I'm leaving for CeBIT exhibition tomorrow morning and have to pack some stuff (I'm exhibitor not visitor)

Maybe next week I have some time to dig into this cookie code http://www.aota.net/ubb/smile.gif

Meikel

Armand
03-19-1999, 07:05 PM
Not to soon stupid (though I probably will) but can't you just make a copy of the cookie to a disk and take it with you to other computers and have the page read that off the disk. Is that even possible? Just curious.

Know what I realized the other week my cookie doesn't transfer over from Netscape to IE at all. Is that just a me thing or what?

------------------
Armand (aka Joe) http://www.arcanumcafe.com/images/smokey.gif
joe@arcanumcafe.com
www.arcanumcafe.com (http://www.arcanumcafe.com)



[This message has been edited by Armand (edited 03-19-99).]

Charles Capps
03-19-1999, 07:45 PM
Armand: Netscape and IE store their cookies in a different format entirely, so they wouldn't be transferable.

That date-time reset thing is a very good idea, and I think it just might be possible. Try heading to the UBB Code Hacking forum at http://www.scriptkeeper.com/cgi-bin/Ultimate.cgi and posting your suggestion there. Someone might be able to whip up some code.

------------------
"Okay, so I'm not "SANE" so to speak, but uh... I'm the lovable kind of psycho"
http://solareclipse.net/

meikel
03-20-1999, 01:29 AM
Hi,

I'm working on 2 PCs (one at home and one at work) to access these forums. I'm not at work that often, so all light bulbs are usually turned on and lots of messages are marked unread. I'm not that good at looking at date/time stamps to find the really new stuff.

Question for a short JavaScript webpage on aota.net:

Can you make a small page where one enters a date+time (in valid format) and gets a cookie set to the appropriate date/time?
Of course this page needs a link to the forum that does not destroy the cookie immediately.

I cannot do this myself as the cookie must come from aota.net to be valid. Maybe one could hack the cookie file on harddisk, but I'm not sure if this really works out http://www.aota.net/ubb/smile.gif

Greetings from a light bulb fan
[nbsp][nbsp]Meikel Weber
www.meikel.com (http://www.meikel.com)

meikel
03-20-1999, 01:47 AM
Can you Light Bulb date/time customizable?
oh my god...

This kind of interesting english spelling and grammar comes out of my mind???

It seems I've been concentrating on the text when writing the subject. Of course making it nearly not understandable.

Greetings from someone having to read another english for beginners book
[nbsp][nbsp]Meikel Weber
www.tickerland.com (http://www.tickerland.com)

Stephen
03-20-1999, 03:36 AM
I suggest that before anyone gets carried away with this idea someone conduct a poll on just how many people would benefit from this dual-cookie business. Because it's not a two-line hack by any means.

First of all, you can't do it solely using a cookie (or two). The information of interest is the last time a page was accessed. This is stored in something like the "LastLogout" cookie and sent to your browser with every UBB page you visit. There's another cookie like this that records the time the FIRST page was accessed. Between these two it's possible to figure out what messages are new, and retain that information while moving from page to page.

When you leave one machine (say at work) and head home to the next one that LastLogout cookie doesn't go with you, and of course you can't send it on ahead of you to that second browser, so you need to store it server side at FQ until you can do something with it. Logically, you'd put it in your member file and it would be written to that file EVERY time you access a UBB page (unless you want to provide a one-click stop on your way out of the forum). Then when you get home and fire up that second browser the now-redundant "home cookie" is sent off to FutureQuest and compared to the cookie stored in the member profile. Since it's older than the server-side cookie it can be discarded and the server-side cookie used instead as the basis for new-message comparisons.

All fine and dandy. Except for one thing. Since we're writing the cookie value to the FQ server THERE'S NO NEED TO USE COOKIES AT ALL! You can simply store the two pieces of time information that are normally stored in your browser in your member profile instead. That way it's obvious that it doesn't matter which machine you use. You'll always be correctly informed about which messages are new. End result: we've defeated the purpose of using (time) cookies at all, although we'd still use cookies to facilitate the identification of the member.

PHEW! Enough said. If I've missing something let me know. But that's my understanding of cookies--what you can and can't do with them.

Justin
03-20-1999, 04:37 AM
See, I didn't look at it like that. I was thinking of something as simple as a form where you tell it the last date / time you visited and it would then set a cookie accordingly. Not even a UBB hack, just a simple Perl script / Javascript combo thing. Or better yet, the whole thing could be done in one php page http://www.aota.net/ubb/smile.gif

In other words, just have a couple drop down boxes, like Month, Date, Hour and even Minute. Then it would set the cookie and redirect you to www.aota.net/cgi-bin/Ultimate.cgi?action=intro&BypassCookie=true - it would still read the cookie, but it will keep it from overwriting it http://www.aota.net/ubb/smile.gif

This could be done in a single php page, and then a simple link to it from the UBB main page (or in the little nav bar thing) would be all that is needed of the UBB. I would find it usefull too, as sometimes I use the back button and forget and IE reloads the page and boom - lights go out. So you could reset your cookie and fix the problem.

I may play around with the idea myself... I'm starting to like it already http://www.aota.net/ubb/smile.gif Might also help certain people who's cookies keep getting borked http://www.aota.net/ubb/smile.gif

Oh, a side note: I don't really see why the last login info isn't stored on the server side anyway - then the cookie would only serve for the password part. That would make the UBB remember between browsers, etc. That might also load the server a tiny bit more, too...


------------------
Justin Nelson
FutureQuest Tech Support

Rich
03-20-1999, 09:39 AM
Stephen makes a good point that should not be overlooked. Namely, that cookies are a local, machine-dependent means of maintaining data. If you have an application (whether it be UBB or anything else) that you want to be user-dependent then the data MUST be stored on the server. In addition, for truely user-independent operation, even a local cookie for storing the user information is not acceptable since the cookie is still machine-dependent and will use the same cookie (and assume it is the same person) if multiple people use the same machine. If you have an application that requires consistency among different users using different machines (like in a "Net Cafe") then you will need to store all the custom user info on the server AND have the user login. No single approach is either "right" or "wrong". Its just that the appropriate design approach must be used to achieve the desired affect.

--"You can't eat your cookie and have it too."

------------------
Rich

"What time is it in _____?"
www.timezoneconverter.com (http://www.timezoneconverter.com)

Mandi
03-21-1999, 01:33 AM
...but who's gonna install the script in my brain that remembers the last time I logged on?? LOL http://www.aota.net/ubb/smile.gif Seriously, this is interesting, and I would love to see what folks come up with, I have lots of UBB users that log on both at home and at work.

Stephen
03-21-1999, 01:58 AM
I think Mandi is following my train of thought. To be really useful, this cookie business needs to be automated--to take care of itself without the user having to think carefully about when was the last time they logged out. Of course, you could do it Justin's way, but I just doubt the practicality of it.

Dropping the LastLogout cookies and storing the info in the user's file would be the simplest way of doing this. Or you could keep things as they are for single-browser users and add a new cookie that users set which tells the FQ server that it should store their LastLogout info in their user file (and look for it there on login). That way server load would be minimized.