Closed (fixed)
Project:
Ajaxify Regions
Version:
6.x-1.0
Component:
Miscellaneous
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2009 at 23:48 UTC
Updated:
28 May 2010 at 19:50 UTC
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.
Comments
Comment #1
mikeytown2 commentedStore 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.
Comment #2
mikeytown2 commentedFound 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...
Comment #3
mikeytown2 commentedOnce again here is the simple way to do this...
http://api.drupal.org/api/function/user_block
Comment #4
mikeytown2 commentedMarking this as won't fix. Been thinking about this and a ajax block module is whats needed.
http://groups.drupal.org/node/24825
Comment #5
mikeytown2 commentedComment #6
mikeytown2 commentedComment #7
csevb10 commentedAjaxify regions should support this without issue. Please test and if you experience issues, reopen. Thanks!