The MU forums have moved to

When does blog become PUBLIC ? (Database) (5 posts)

  1. hery
    Posted 16 years ago #

    When using list-all or get_last_updated() only blogs that have the field "Public = 1" show up.

    $blogs = $wpdb->get_results( "SELECT blog_id, domain, path
    FROM $wpdb->blogs
    WHERE site_id = '$wpdb->siteid'
    AND public = '1'
    AND archived = '0'
    AND mature = '0'
    AND spam = '0'
    AND deleted = '0'
    AND last_updated != '0000-00-00 00:00:00'
    ORDER BY last_updated DESC limit 0,40", ARRAY_A );

    But I don't see when a blog gets "Public = 1".
    Can you clarify it to me please?

  2. drmike
    Posted 16 years ago #

    It's set as a default. When a blog is created, the system gets its defaults from wp-admin/upgrade-schema.php. Please take a look at that file at line 157. You should see where it's set.

    Hope this helps,

  3. hery
    Posted 16 years ago #

    That's really my concern because all blog should by default Public... but in mine, they are not.

    It's all "Public = 0"

    I got wpmu from rev of this month.

  4. drmike
    Posted 16 years ago #

    Have you checked your wp-admin/upgrade-schema.php to see what is there? I know a lot of us have made changes in there.

    The option is actually set and put into the database when a new blog is created. If they're choosing that "Do you want your blog listed in teh search engines" question to be no, it will set public to '0'. You haven't done anything to the signup procedure, have you?

  5. hery
    Posted 16 years ago #

    Ah ok.... Now I understand.

    Thanks drmike I know now where it get changed

About this Topic