You are here

readme.txt in Shared Blocks 6

Same filename and directory in other branches
  1. 7.2 readme.txt
  2. 7 readme.txt
The Shared Blocks Module is awesome!

If you have a main site with blocks that you want to syndicate across several
other websites, you need this module!

Features:
* Allows publishing and subscribing of Drupal blocks
* Changes to published blocks are updated on sites with subscription blocks
* Published blocks provides a JSON page at blocks/{module}/{delta}
* Block subscriptions are updated on cron with an adjustable refresh interval


JSON format:
  success: boolean
  title: string
  content: string
  last update: timestamp ?
  site root: string (could be gleaned from subscription URL)

Notes:
* Published blocks always represent the view of an anonymous user. Please be sure to check permissions.
* Relative and root-relative URLs (which start with "/") will need to be rewritten.
* It would be good to provide a JSONP alternative - perhaps by adding extra args to the URL blocks/{module}/{delta}/jsonp/{func}.
* Likewise, we could also return blocks/{module}/{delta}/html with a full rendered version of the block.

Hooks:
- hook_menu()
  - callback for configuration page
  - publish tab, subscribe tab
  - callback for individual published blocks (blocks/{module}/{delta})
- hook_cron()
  - subscribe sites ping publish site on regular basis checking for updates (recent comments)
- hook_block()
  - Create subscription blocks
  
Future enhancements:
- Don't show blocks available to publish that aren't viewable by anonymous. :)

File

readme.txt
View source
  1. The Shared Blocks Module is awesome!
  2. If you have a main site with blocks that you want to syndicate across several
  3. other websites, you need this module!
  4. Features:
  5. * Allows publishing and subscribing of Drupal blocks
  6. * Changes to published blocks are updated on sites with subscription blocks
  7. * Published blocks provides a JSON page at blocks/{module}/{delta}
  8. * Block subscriptions are updated on cron with an adjustable refresh interval
  9. JSON format:
  10. success: boolean
  11. title: string
  12. content: string
  13. last update: timestamp ?
  14. site root: string (could be gleaned from subscription URL)
  15. Notes:
  16. * Published blocks always represent the view of an anonymous user. Please be sure to check permissions.
  17. * Relative and root-relative URLs (which start with "/") will need to be rewritten.
  18. * It would be good to provide a JSONP alternative - perhaps by adding extra args to the URL blocks/{module}/{delta}/jsonp/{func}.
  19. * Likewise, we could also return blocks/{module}/{delta}/html with a full rendered version of the block.
  20. Hooks:
  21. - hook_menu()
  22. - callback for configuration page
  23. - publish tab, subscribe tab
  24. - callback for individual published blocks (blocks/{module}/{delta})
  25. - hook_cron()
  26. - subscribe sites ping publish site on regular basis checking for updates (recent comments)
  27. - hook_block()
  28. - Create subscription blocks
  29. Future enhancements:
  30. - Don't show blocks available to publish that aren't viewable by anonymous. :)