}
include "functions.php";
$url = "http://www.bloglines.com/export?id=";
$blog_ids = array();
print "function print_widget() {\n";
if ($_SAFE["username"]) {
    $url .= $_SAFE["username"];
    $page = download_url($url);
    # get OPML of public subscriptions
    if ($page) {
        # parse out all the feed URLs and see if they match anything in the database
        $matches = array();
        preg_match_all("/xmlUrl=[\\'\"](.*?)[\"\\']/i", $page, $matches);
        for ($i = 0; $i < sizeof($matches[1]); $i++) {
            $blog = $matches[1][$i];
            $blog_id = get_blog_id($blog);
            if ($blog_id) {
                array_push($blog_ids, $blog_id);
            }
        }
    }
} elseif ($_SAFE['category']) {
    $blog_ids = get_blogs_with_tag($_SAFE['category']);
}
if (sizeof($blog_ids) || $_SAFE['all']) {
    # at least one blog on the public blogroll is also in Postgenomic
    $blogs = get_blogs($blog_ids, array("limit" => 20, "require_portraits" => true));
    print "document.write(\"";
    $counter = 0;
    $large_images = 2;
    $small_images = sizeof($blogs) - $large_images;
Example #2
0
function blog_id()
{
    echo get_blog_id();
}
/**
 * Returns the blog_id of given domain and path in a XML-RPC request
 * this functions parameters are:
 * $domain The blog domain
 * $path   The blog path
 *
 * @param string $args
 * @return boolean Returns the blog_id or false if not found
 */
function msxmlrpc_get_blog_id($args)
{
    $parameters = check_arguments($args);
    if (!is_array($parameters)) {
        return $parameters;
    }
    if (($blog_id = get_blog_id($parameters['domain'], $parameters['path'])) !== false) {
        return $blog_id;
    } else {
        return new IXR_Error(404, __("No sites found."));
    }
}