Help out a grue?
Displaying 1-20 of 21 total.
12 next
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
mcgrue

So, I'm idly looking for a solution to finishing the sidebar, which is supposed to have some quasi-dynamic content. However, I don't want to use the db for it, as it's on every page.

Ideally, I'd like there to be some sort of easy-to-use library for serializing/deserializing variables to the filesystem, so I could have a small array of data that the sidebar pulls from and that other functions update. Something threadsafe and sexy. However, I have no idea if such a thing exists.

Anyways, anyone out there have ideas or experience to share?

Posted on 2004-05-12 14:40:55

mcgrue

Stickied, because I want help, dammit. ;)

Posted on 2004-05-12 16:10:46

Kildorf

What sort of 'quasi-dynamic' content are we talking about?

Posted on 2004-05-20 15:40:08

mcgrue

Oh, most recently uploaded files, most popular files, newest articles/most popular (when articles are done...), most active threads. You know.

Posted on 2004-05-20 15:49:44

Kildorf

I just had the best idea evar!

You could use CGI sessions, and just have everyone on the site use the same session. It's fool proof! :D

Ha ha I'm an idiot.

(edit: And just to clarify, I do mean server-side sessions. I'm not that much of an idiot.)

Posted on 2004-05-20 16:25:40 (last edited on 2004-05-20 16:26:05)

mcgrue

Is there a way to do that via PHP? I am vaugly familiar with what you describe, which is to say I just listened to you say it and it made an alien kind of sense to me.

Posted on 2004-05-20 19:25:11

Kildorf

Quote:Originally posted by mcgrue

Is there a way to do that via PHP? I am vaugly familiar with what you describe, which is to say I just listened to you say it and it made an alien kind of sense to me.
I would elaborate more for you directly, but I don't have the PHP session code I wrote a while ago handy, and I am at work, so I technically should be "working".

However! This link may be some help to you. 9 out of 10 Kildorfs recommend php.net's PHP documentation.

The more I think about the idea, the better and worse I think it is. It is, on the one hand, probably a rather easy, painless way to do it. On the other hand, however, it is a flagrant abuse of a technology that was built for a completely different reason. Not that I'm necessarily against that sort of thing.

Edit: Since I've managed to make an ass of myself by posting bad advice in the past, I'm working on a demonstration of my idea right now. I'll let you know how that goes.

Posted on 2004-05-20 19:53:19 (last edited on 2004-05-20 23:35:28)

Kildorf

Success! Anyone who wants to see me parade my disregard for conventional usages can check out here:

Proof of Concept : Session Variables For Dynamic Content

So yeah. Grue, feel free to use the idea, or not, as you see fit. If you need any more explanation because I'm obscure and illogical, then let me know.

And hopefully I've provided useful advice and not misunderstood the problem entirely. :D

Edit: Of course, this solution does assume that there isn't other session stuff going on. I'm not sure if this is a good assumption or not.

Posted on 2004-05-21 00:27:10 (last edited on 2004-05-21 00:41:55)

mcgrue

Quote:Originally posted by Kildorf

I would elaborate more for you directly, but I don't have the PHP session code I wrote a while ago handy, and I am at work, so I technically should be "working".


Work isn't for working. It's for stalling.


However! This link may be some help to you. 9 out of 10 Kildorfs recommend php.net's PHP documentation.


The verge-rpg documentation system has been going on so long because I'm basically making it so it can create any number of documnets (for libraries, utilities, games... whoever wants to make some docs) in the style of the php.net documentation. I'm my not-so-humble-opinion that the php.net docs are the best docs ever.



The more I think about the idea, the better and worse I think it is. It is, on the one hand, probably a rather easy, painless way to do it. On the other hand, however, it is a flagrant abuse of a technology that was built for a completely different reason. Not that I'm necessarily against that sort of thing.


Like using VERGE to make a sidescroller, or a FPS? ;)

Anyways, to answer a later question as well, yes I'm using sessions, hence the login. However, my understanding of sessions is weak and infirm, being something I always gloss over as 'boring'. Are there different kinds of sessions?

Posted on 2004-05-21 06:04:42

Kildorf

Quote:Originally posted by mcgrue

The verge-rpg documentation system has been going on so long because I'm basically making it so it can create any number of documnets (for libraries, utilities, games... whoever wants to make some docs) in the style of the php.net documentation. I'm my not-so-humble-opinion that the php.net docs are the best docs ever.
That's sounds very cool. The php.net docs are the best docs ever. It's like their designers actually wanted you to find information. That sort of thing doesn't seem to be what most documentationists do now-a-days.

Like using VERGE to make a sidescroller, or a FPS? ;)I think VERGE is becoming more and more like an awesome graphics/sound/input library than an RPG engine. It's like DirectX only not crappy!

Anyways, to answer a later question as well, yes I'm using sessions, hence the login. However, my understanding of sessions is weak and infirm, being something I always gloss over as 'boring'. Are there different kinds of sessions?Well, sort of. There are server-side sessions, and client-side cookies (I have a non-webteam coworker that giggles every time we mention cookies). I figured you used the sessions, because it's silly to put things like login information in a client-side cookie. It doesn't take me being much of a "hacker" to open up my cookies directory, load up notepad, and then change my username to McGrue. ^^

So, my idea is probably not best, as it would conflict with your current session (there are enough problems with people logging out by accident now). I also discovered this morning that my proof-of-concept managed to expire over night and the data disappeared. I can think of workarounds for both of these, but you start coming up with workarounds so you can use something in a way you shouldn't be, it's a good indication that it's time to stop trying.

There must be some library somewhere that does what you need.

Posted on 2004-05-21 11:24:00

MercAngel

This may be too late, if you check www.phpBB.com and down the forum software i think the admin part for the software has what you need that code usees the DB put you may come up with some way to do it with out the DB.

Posted on 2004-06-14 22:13:38

mcgrue

Quote:Originally posted by MercAngel

This may be too late, if you check www.phpBB.com and down the forum software i think the admin part for the software has what you need that code usees the DB put you may come up with some way to do it with out the DB.


phpBB has a smarter way to deal with it than I do. It uses false html codes that use [] instead of <>. However, I prefer actaul tags because I'm oldschool. So instead of stripping everything and only accepting custom glyphs, I need an intelligent stripper. Which would, properly, require a full DOM parser to the best of my knowledge.

Man, I suck.

Posted on 2004-06-15 04:00:38

Gayo

Well, you could make it so it only strips from parameter names and not for the values to whcih they're set.

Posted on 2004-06-19 23:27:13

zaril

Quote:Originally posted by mcgrue

I need an intelligent stripper.

You have the most odd requests.

Posted on 2004-07-13 10:20:06

mcgrue

Intelligence is sexy.

Also, only people with forum mod privledges can see those ugly red boxes, in case you were wondering.

Posted on 2004-07-13 10:35:20

zaril

I've noticed the phenomena and I guessed I had such a function when I read my sexy title. I just had to write something obvious in it, because I didn't want to see my misfortunate attempt at a post. Also, I don't like the edit messages (which normally on forums only pop up if someone has replied to the post, else it's free to be editted without a notice *hint hint*) so I deleted and reposted.

Posted on 2004-07-13 11:19:00

mcgrue

I do not plan on changing the functionality. Minor things of preference tend not to be unanimous, and there are reasons why it's set up the way it is.

Posted on 2004-07-13 12:50:45

zaril

There are reasons for everything, but hey, if you don't want to have it perfect, I'll respect your wishes of MEDIOCRITY. ;)

Posted on 2004-07-13 12:56:59

Mythril

Quote:Originally posted by mcgrue

Oh, most recently uploaded files, most popular files, newest articles/most popular (when articles are done...), most active threads. You know.

Uhm, I hope I'm not ignoring something wildly obvious, but couldn't you do this just by making the post functions in your site also write to something like a text file, and then just include that text file to show what is newest?

(Sorry for reviving a thread that is semiold, I'm not much in this forum.)

Posted on 2004-08-18 18:00:28

mcgrue

Mythril, that's the gist of what I wanted to do, but I was concerned about some concurrency issues etc.

Posted on 2004-08-18 18:35:36


Displaying 1-20 of 21 total.
12 next
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.