Subject: I'm Back + Blocks :-)

Posted on: 23/07/02 06:16pm
By: squatty

This is both and announcement and an update for the current versions of News, Weather, and Stocks php blocks.

First, the is up and running again. It's a slimmed down version of the site. More goodies to come over the next few weeks! As for the blocks, I have posted updated version of all three on You can download the files here.

No feature additions in this round of updates. I simply cleaned up the code and removed hard coded table names. It gave me something to do while my site was down!

I'm Back + Blocks :-)

Posted on: 23/07/02 06:18pm
By: dreamscape

nice to have you back. if only i could find _my_ mysql.dump.bz2.....

I'm Back + Blocks :-)

Posted on: 23/07/02 07:45pm
By: Matty

The blocks aren't there yet, but soon! Smile

I'm Back + Blocks :-)

Posted on: 23/07/02 10:39pm
By: Anonymous

If you get the News, Weather and Stock quotes up, so I can see them. I can add a cacheing mechanism to them no problem. I actually have written something before, and it is in a project of mine called Slashwatch, where I cache news headlines from several sites in MySQL database, and then compile emails for users, so they don't have to surf to several sites a day. I'm just need the location of the RDFs and your code and I can implement the cacheing for you. Where did you find the RDF/RSS files, for those big news sites? Reply to me at Morgan Everett

re: caching

Posted on: 24/07/02 05:33am
By: squatty

As for the caching, I do in fact have a fairly decent caching mechanism in place. I'm always up for improving it! All cache is stored in the DB. The one issue I have is expiring content...let me explain: The caching works off three keys: cache_expire - an expiree flag if set to true reloads cache cache_age - the age of the cache...all the blocks have a limit for how long they will look to the db for content. Once the cache is considered "stale" they go grab new content. cache - the cache is actually the block content in html format. Now, let's use and example of a logged in user who updates his/her weather location. Cache works the same for logged in users vs. anonymous users. Here's how the caching works: When the user logs into GL, the weather block first checks the cache age. Most likely, since the user has not been to the site for sometime the cahce age is greater than the limit set by the weather block. Thus, the weather block goes and grabs new content. The content age is updated with a date stamp of now, and the html cache is stored in the cache field. By default, the weather block has a 30 minute cache age limit (which you can adjust). If the user were to click around on the site for more than 30 the 31st minute the cache would again expire and go grab new content. If at any point the user decides to click "Edit" on the weather block to change his/her location then another cache expiree event is triggered. This time, instead of aging the cache I simply set the cache_expire flag to true. Here's where my cache expire issues comes setting the expire flag to true, the cache grabs new content but, it only does so on the next page refresh. So, when a user is in edit mode and sets the default weather location, the update is not immediate. The update ONLY happens on the next refresh! I'd like this to occur all on the same click? That's my biggest issue. I've also noticed a few anomalies where when updating the default location has actualy painted a page with two weather locations in the same block but, this too goes away on the next click...might be a timing issue with the expire event? So, yes I have caching...and yes it could be better. What I'd like to see updated is the following: 1) Fix the expire event and timing issues. 2) Remove all instance of cache and or cache values from the gl_userprefs table...this is where the cache is stored and I've been told (although don't entirely agree) that core gl tables should not be touched. Let me know what you come up with?


Posted on: 24/07/02 07:15pm
By: epretorious

Where'd all the plug-ins and blocks go? e.g., Chatterblock? Gallery?


Posted on: 25/07/02 03:52pm
By: squatty

I lot them all. I'm trying to pick up the pieces...try

Geeklog - Forum