WordPress.org

Ready to get started?Download WordPress

Forums

How to get latest blog sites registered in WPMU? (8 posts)

  1. muwp
    Member
    Posted 4 years ago #

    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

  2. muwp
    Member
    Posted 4 years ago #

    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

  3. everest19
    Member
    Posted 4 years ago #

    Hi!

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

  4. muwp
    Member
    Posted 4 years ago #

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

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

  6. muwp
    Member
    Posted 4 years ago #

    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

  7. David Sader
    Member
    Posted 4 years ago #

    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 =...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.