Sitewide Multi Widget

Sitewide “three-in-one” Multi Widget Panel

  • Choose the blog ID to feature from the widget control panel, by default it will use Donncha’s Sitewide Tags Pages(‘tags_blog_id’) if installed. Blog_id is matched against existing public blogs.
  • Checkboxes to enable(and title) each sub-widget within the multi-widget control
  • Sitewide Tag Cloud
    • default(no options) for now
  • Sitewide Recent Posts
    • Display 0-10 most recent posts
      • full post, post excerpt, no post content
      • titles
      • author
      • date
      • comment link
      • post category
      • post tags
      • avatars(any size 8-80 px)
    • Filtered by Sitewide Tags(comma separated list)
    • Filtered by Sitewide Categories
  • Sitewide Archives
    • daily
    • weekly
    • monthly
    • yearly
    Installation Notes: You’ll want Donncha’s Sitewide Tags Pages(v 0.2) installed and running for a while (to generate posts in the tags blog). I have not tested this widget with any other sitewide tags-type aggregation, but user can substitute any existing public blog id if the ‘tags_blog_id’ doesn’t exist. Sitewide “three-in-one” Multi Widget Panel is a widget so put it with he rest of your wpmu widgets. Designed/tested for WPMU2.6.

Notes:
This widget uses a “switch_to_blog”–>”restore_current_blog” and a new query object($query = new WP_Query($query_string);) to retrieve posts from the Tags blog(or multple blogs). All options are stored as a single widget option array. I figure the cpu/numqueries load is abated somewhat by having all sub-widgets in the same panel.

Support to pull from multiple “featured blogs” by editing one line of code(“clones” the widget output while applying the same widget control options to each clone):
`$featured_blogs = array($options[‘blog_id’]); // Clone multiple panel outputs such as …
// $featured_blogs = array($options[‘blog_id’],3,354);`
(inspired by http://dailytestimony.net/plugins/)

Although WPMU 2.6 adds a “get_id_from_blogname();” function – which satisfies vhost and nonvhost installs – to make switching blogs in widget control simpler, it needs also a get_blogname_from_id(); to echo a blogname(where blogname is “blogname.domain.org” or “domain.org/blogname/”).

Usage note: using this widget in the sidebar of the actual tags blog will work, but it’s overkill as the usual widgets on the tags blog work in the usual ways(ie. recent posts, tag cloud, and categories are all transformed into sitewide widgets when using Donncha’s Sitewide Tags blog).

TODO: if($tags_blog_id != $current_blog_id) switch_to_blog();

Download

This entry was posted in WPMU Plugins. Bookmark the permalink.

2 Responses to Sitewide Multi Widget

  1. Hi!

    I understand this is a plugin that calls content from another site of the same network´s sidebar, but, does it also call any other widget too? I mean, those widgets that are not the default ones, those that are brought by installed plugins.

    Thanks,

    Ana

  2. dsader says:

    I haven’t seen this widget or installed one like in in 5 years, sorry. It was based on default widgets in WP core. But I do not have a copy of the original code to give you more of a hint than that.

Leave a Reply

Your email address will not be published. Required fields are marked *