Does this support the Who's online block?
mikeytown2 - June 29, 2009 - 23:48
| Project: | Ajaxify Regions |
| Version: | 6.x-1.0 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I might be able to support the Who's online block. This is only if I can get it so it uses 1 ajax transaction for all boost extra's; use JSON (getJSON, json_encode). Would allow for jQuery to update mutiple divs with one request. I would also change drupal's block output from this
There is currently %members and %visitors online.
is this
There is currently %users online.
I think this is the only other core "feature" that relies upon core stats.

#1
Store json data in database if using this
http://api.drupal.org/api/function/drupal_to_js
since it's only available in a full bootstrap.
Getting any content as JSON
Have a loop in jQuery that gets the div's ID from JSON, see if it exists, and updates that div's contents with what was returned. JSON object has ID and DATA for each div that needs to be updated.
#2
Found an ok example that kinda does what I need.
http://www.designing4u.de/2008/06/loading-content-into-multiple-div-cont...
Simple example
http://www.nabble.com/How-to-update-multiple-div-on-ajax-success-td20594...
#3
Once again here is the simple way to do this...
<?php
include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$block = module_invoke('user', 'block', 'view', 3);
print $block['content'];
?>
http://api.drupal.org/api/function/user_block
#4
Marking this as won't fix. Been thinking about this and a ajax block module is whats needed.
http://groups.drupal.org/node/24825
#5
#6