WordPress.org

Support

Support » Multisite » How to get latest blog sites registered in WPMU?

How to get latest blog sites registered in WPMU?

  • Hi! I want a code to get the names of the latest blog sites registered, to put them on the front page of my site, how can I do that?!
    Another question please, is there a reference of variables and functions that available in WPMU?

    Thank’s

Viewing 7 replies - 1 through 7 (of 7 total)
  • what files I should include?! will they work anyplace in my site? where they should be user only inside pages that located at the original wordpress directory?

    Thank’s

    everest19
    Member

    @everest19

    Hi!

    In wp 3.0 I have uses links and add new links cat. and then name of registred blogs

    I don’t get it. Can you explain more please.

    Oooo, I also whipped up a new widget to show the latest sites ordered by last updated.
    http://bit.ly/br5abP

    Mr.Andrea_r thank’s alot. But, thats not what I need. I need to get the last updated blogs on my front page “Main Page” not “Main Blog Page”. Anyway, I did write a php code that accessing the database of the WPMU to get these info. Its worked, but I faced some problems:

    1) I want to convert the time to be as my localarea. I used this php function:
    $localdate = actual_time("d/m/Y h:i:s A",-3,strtotime($gmtdate));

    But I realized that last_updated date is stored as GMT, while the registered date is stored in a diff. way!?

    2) the table of the first “Main Blog” is wp_options while the second is wp_2_options. I made an if statement

    if($blog_id==1) $selectfrom = "wp_options";
    else $selectfrom = "wp_".$blog_id."_options";

    is this correct or there are another special cases?!

    Thank’s alot in advance

    David Sader
    Participant

    @dsader

    1)
    http://codex.wordpress.org/Function_Reference/date_i18n

    An Example:
    http://cleverwp.com/date_i18n-reference-and-usage/

    2)
    $blog_prefix = $wpdb->get_blog_prefix( $blog_id );

    ie

    $selectfrom = $blog_prefix . 'options';

    or change the $wpdb query to something like

    ..."SELECT * FROM {$blog_prefix}options WHERE option_name =...

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to get latest blog sites registered in WPMU?’ is closed to new replies.