Owner: Andrew
Type: WPMU Plugin
Created: 2006-07-26 00:00:00
Last Modified: 2007-01-24 22:51:27
list-all_0_0_5.zip (4023 download(s))
list-all_0_0_3.zip (1191 download(s))
list-all_0_0_2.zip (338 download(s))
Lists all blogs on a WPMU site. Simply place list-all.php in your mu-plugins directory and then you can call the list from any page by the function list_all_wpmu_blogs(LIMIT, DISPLAY, BEGIN_WRAP, END_WRAP, ORDER). please read the instructions located within the zip file for configuration options. Updated - This plugin no longer displayed any blog marked as spam, mature, archived, or deleted. Thanks goes to drmike for finally getting me to update this.
I needed to display only blogs that starts with a certene letter so i made a little update. Hope that helps: Updated line 50: function list_all_wpmu_blogs($tmp_limit, $tmp_name_or_url, $tmp_begin_wrap, $tmp_end_wrap, $tmp_order, $tmp_first_letter="0") { Added at line 89: if ($tmp_first_letter != "0") { $letter = " AND domain LIKE '".$tmp_first_letter."%'"; } updated the $blog_list around line 90: $blog_list = $wpdb->get_results( "SELECT blog_id, last_updated FROM " . $wpdb->blogs. " WHERE public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted ='0' ".$letter." " . $order . " " . $limit . "", ARRAY_A );
I'm new to wordpress mu and am not great at developing plugins. Request: Is it possible to have this plugin list blogs on numerous pages and not just the same page? I have a blog site that has hundreds of users and scrolling becomes a nuisance. Maybe display top 50 on each page (pg 1, 2, 3, 4).
Would be great if there was an option to list only blogs with at least one post/page beyond the default. I have a setup with almost a 100 blogs but nearly half don't have a post yet. I've been trying to add it, but can't figure out a sensible join. I am running a count prior to running the display code, but it's slow.
I have the latest version of this script and I must say I found a problem. The script doesn't filter the code displayed. I have a list of most recent blogs created on my front page. Some spam bot entered a java script redirect code in the blog title and when someone visited the front page he got redirected to some other page. So you should make a version of the script in witch the html in the blog title gets filtered.
I cannot get the script to work, with basic debugging I found that the function call to list_all_wpmu_blogs(***) works all the way until this line: $blog_list = $wpdb->get_results( "SELECT blog_id, last_updated FROM " . $wpdb->blogs. " WHERE public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted ='0' " . $order . " " . $limit . "", ARRAY_A ); $check_blogs does work and displays the correct number of blogs Essentially echoArrayBlogList($blog_list) never gets called or fails when done so because $blog_list is null or blank. Why would I be getting (I assume) bad sql returns from that line ($blog_list..) I'm using MySQL 5.0.27.
Well, ok so I fell stupid because my blogs weren't marked public and thus was the error. However kudos to my hours of debugging to figure out my own problem ... rofl. Narrowed down the problem to mysql query, logged into mysql and did the query myself (with public = 1 as my only option as I didn't care if they 'weren't' spam etc at this point) mysql> select blog_id, last_updated FROM wp_blogs where public = '1'; Empty set (0.00 sec) !! mysql> select blog_id, site_id, public, archived, mature, spam, deleted, last_updated FROM wp_blogs; +---------+---------+--------+----------+--------+------+---------+---------------------+ | blog_id | site_id | public | archived | mature | spam | deleted | last_updated | +---------+---------+--------+----------+--------+------+---------+---------------------+ | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2007-09-26 01:00:40 | | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 2007-09-25 19:08:49 | +---------+---------+--------+----------+--------+------+---------+---------------------+
Sorry for the multipost and bad past of my sql results just exited to have fixed the 'bug'
May I suggest that you add the blog must be public to show up on this list ![]()
is it possible to display the title of the new blog, and not the name or the url
is it possible to display the title of the new blog, and not the name or the url
Question (and/or possibly a feature request) - is there a way to order the list of blogs alphabetically? In one case I would just like an alpha-sorted list of blogs versus a list based on creation dates or update status.
I have an error: Warning: Invalid argument supplied for foreach() in w:\home\blogger\www\wp-content\mu-plugins\list-all.php on line 22
I second danyork and would be very interested in figuring out a way to alphabetize the blog list.
Lexx_a, i've the same problem on a sub-directories WPMU, any new?
Lexx_a, i've the same problem on a sub-directories WPMU, any new?
I've understood which the problem is, just I had no blogs set as public, Lexx_a, check if it's so for you too
when i create new blog the footer dose not appear until i comment the function: list_all_wpmu_blogs any solution? Best Regards
You must be registered and logged in to post comments. Not registered? Click here to get your free account!