The MU forums have moved to WordPress.org

List all blogs widget, beta (14 posts)

  1. mptre
    Member
    Posted 15 years ago #

    Hi there!
    Recently made a small sidebar plugin for WordPress MU that let's you list all your blogs. Try it out and report any bugs or errors.

    Just place the list-blogs-widget.php inside your WordPress MU plugins-folder, navigate to Design > Widgets.

    http://qvister.se/upload/list-blogs-widget.phps

  2. tdjcbe
    Member
    Posted 15 years ago #

    I mean no disrespect but as I understand the code, and I'll be the first to admit that I'm missing something here as the brain is fried, this lists all of the blogs within a mu install. Correct?

    The problem with that is you;re compiling this list live each and every time the widget loads unless you have caching in place on the backend.

    Imagine the load on a 30k blog site where each and every blog has this widget installed.

    Wouldn't it be better to run this say once an hour and say the data as a site option within the db and pull that as a single load? Or set this up to use the built in cache if it;s present?

    We had this discussion over on the tutorial site:

    http://wpmututorials.com/how-to/making-a-member-list-blog-directory/

    edit: I don't have the code handy to look at but the blog count function (whatever it's called) is cached to update once an hour I believe. Folks may want to review how that's done to see what I'm talking about.

  3. mptre
    Member
    Posted 15 years ago #

    @tdjcbe: Yes the widget lists all of the blogs within a mu install. Caching is definitly a necessary improvement, since the list probably won't be updated that often.

    Would be great if someone could show how the blog count function solved the cache part.

  4. mptre
    Member
    Posted 15 years ago #

    Update!
    It's now caching the list for an hour, then updates the list. If you change any preferences that belongs to the widget (in Design > Widgets) the cache is also being updated to keep up with the new settings.

    Check the same url for the new code.

    http://qvister.se/upload/list-blogs-widget.phps

  5. sfire38
    Member
    Posted 15 years ago #

    This is a great widget that I need. However, it doesn't fully work with my wordpress template(I think it may be because I have 2.7). I made modifications that can be seen at the link below (changed line 23). I think there is a better way to do this with $before_title and $after_title but I didn't have time to play with it.

    http://pastebin.com/f68929950

  6. Parmen
    Member
    Posted 15 years ago #

    Hello,

    Thank you for this widget. It seems to work but with errors of this sort (when adding new page for instance)

    Warning: Cannot modify header information - headers already sent by (output started at /home/wpmu/public_html/wp-content/plugins/list-blogs-widget.php:113) in /home/wpmu/public_html/wp-includes/classes.php on line 1571

  7. sfire38
    Member
    Posted 15 years ago #

    @Parmen

    The same thing was happening to me. You need to go to the very end of the file (in an editor) and remove any white space. So the very last character/line should be ?>

    This solved my problem (it happens on some servers, not all).

  8. kinotus
    Member
    Posted 15 years ago #

    Nice plugin, but it produces an error if there are no blogs to list :)

  9. kinotus
    Member
    Posted 15 years ago #

    Here's my version of support for $before_title and $after_title.

    No idea if this is better than sfire38's, but this works fine with my template at WP2.7

    http://pastebin.com/f2c072763

  10. iblogcity
    Member
    Posted 15 years ago #

    Great plugin! I'm using kinotus' version. My concern is that the list may grow too long for use in a widget. How would I go about displaying the list generated by this plugin in a separate page? For example, myblog.com/directory.

    Thanks

  11. andrea_r
    Moderator
    Posted 15 years ago #

  12. iblogcity
    Member
    Posted 15 years ago #

    Andrea,
    I tried following your method several times, but regardless of the parameters I use, the results always displays the URLs listed in the order in which they were created. For example, even when I chose to display the name sorted in alphabetical order, the page displays:

    firstblogcreated.domain.com
    secondblogcreated.domain.com
    lastblogcreated.domain.com

    Any clue what would cause it to ignore the parameters for display and sort.

  13. andrea_r
    Moderator
    Posted 15 years ago #

    Something with your syntax or the plugin version - dunno what specifically, because I just did this same thing in the past month.

    What's your email?

  14. iblogcity
    Member
    Posted 15 years ago #

    Andrea,
    It's support@iblogcity.com

    Thanks

About this Topic