The MU forums have moved to WordPress.org

userthemes plugin + wpmu 1.1.1 + get_blog_list (2 posts)

  1. Ovidiu
    Member
    Posted 17 years ago #

    hi there

    I was successfully using this plugin from wpmudev.org. after the upgrade to 1.1.1 it broke.
    what happens is this: I see all blogs created before the upgrade in this plugins option page and can enable / disable theme editing for these blogs.

    But newly created blogs do not get listed here. I had a look at the plugins sourcecode, it uses get_blog_list to display a list of all blogs...

    so whats wrong?

    ehre is the code:

    <?php
           if (get_blog_count() > $start + 50) {
             $newstart = $start + 50;
             echo "<a href='?page=$page&start=$newstart'>Previous 50 Blogs</a>&nbsp;&nbsp;";
           }
           if ($start > 0) {
             $newstart = $start > 50 ? $start - 50 : 0;
             echo "<a href='?page=$page&start=$newstart'>Next 50 Blogs</a>&nbsp;&nbsp;";
           }
           ?>
           <table class='the-list-x' width='90%'>
           <tr><th>Blog ID</th><th>Domain</th><th>Theme Library</th><th>Theme Editor</th></tr>
           <?php
           //Reverse this because I want the blogs in ID order not in recently registered order
           $blogs = array_reverse(get_blog_list($start,50));
           foreach ($blogs as $bloginfo) {
              $alt = $alt == '' ? 'alternate' : '';
              echo "<tr class=$alt>
                    <td>{$bloginfo['blog_id']}</td>
                    <td><a href='http://{$bloginfo['domain']}'>{$bloginfo['domain']}</a></td>";
              if (get_blog_option($bloginfo['blog_id'], 'ut_use_user_theme') == 1)
                echo "<td><b>User</b></td>";
              else
                echo "<td>System</td>";
    
              if (get_blog_option($bloginfo['blog_id'], 'ut_enabled') == 1)
                 echo "<td><a href=?page=$page&blog={$bloginfo['blog_id']}&action=disable&start=$start>Enabled</a></td>";
              else
                 echo "<td><a href=?page=$page&blog={$bloginfo['blog_id']}&action=enable&start=$start>Disabled</a></td>";
           } 

    unfortunately this code which worked before the upgrade lsited all blogs, now it won't lsit any new blogs created after the upgrade....

  2. Ovidiu
    Member
    Posted 17 years ago #

    solved this myself. the list does not contain anything that is not flagged as public, spam or adult :-)

About this Topic