Automatically refresh block module

akuma12 - October 3, 2008 - 15:21

I was wondering if anyone knew how to code a module such that it will automatically refresh itself every so many seconds. I know there is a Block Refresh module out there, but it hasn't been updated to Drupal 6 yet. Anyone have any ideas? Thank you!

Jim

DynamicLoad

akuma12 - October 3, 2008 - 16:05

Just as an update, I did some more looking around and found out about the DynamicLoad part of JSTools, but unfortunately that hasn't been updated to Drupal 6 either.

By refresh, do you mean that

buchannon - October 3, 2008 - 16:12

By refresh, do you mean that the cache is dumped and then rebuilt?

Whichever works, really. The

akuma12 - October 3, 2008 - 16:27

Whichever works, really.

The module I'm creating is very basic. All it does is check a specific database table for entries, and if it finds any, displays those entries as links. So basically I need that database query to happen every 15 seconds or so. Refreshing the page obviously works, but I don't want it refreshing the whole page every 15 seconds, just the block.

Jim

Ahh ok, that's interesting.

buchannon - October 3, 2008 - 16:38

Ahh ok, that's interesting. I would probably just make a javascript function that counts down, then calls a AJAX or AHAH function to refresh everything in the block's div tags.

 
 

Drupal is a registered trademark of Dries Buytaert.