List all post (All plugins in RC1) bad work...
In Title, read more, and comments no permalinks ...
but yes... ?p=3
In wpmu 1.3.3 yes work... in code guid but...
is problem of RC1? Or plugins? like fix this?
List all post (All plugins in RC1) bad work...
In Title, read more, and comments no permalinks ...
but yes... ?p=3
In wpmu 1.3.3 yes work... in code guid but...
is problem of RC1? Or plugins? like fix this?
This code of new plugin all from wpmu ( show all post in frontpage) in WPMU RC1.5 no work, NO PERMALINKS IN COMMENTS, and TITLE why??? fix?? solution???
$db_prefix = "wp"; //this is your database prefix, if your first user has wp_1_posts, then your prefix is "wp"
$howmany = 7; //how many rows of results do you want back?
$width = 50; //how wide do you want your rows?
/********************************************************************/
//i first tried pulling in every blog post by user, but then i lost all information about the default blog address. this became important when a guest
//user posted on somebody else's blog, at which point i'd find the user's default blog address and contstruct a wrong URL.
//define('WP_USE_THEMES', true);
require('./wp-blog-header.php');
function get_path($userID){
global $wpdb;
$req = "select path from wp_blogs where post_parent='" . $userID . "';";
//echo $req;
$res = $wpdb->get_results($req);
$post['path'] = $res[0]->path;
return $post;
}
function bigcmp($a, $b)
{
if ($a['datetime'] == $b['datetime']) {
return 0;
}
return ($a['datetime'] < $b['datetime']) ? 1 : -1;
}
$request = "select * from wp_blogs;";
$result = $wpdb->get_results($request);
//print_r($result);
$i = 0;
foreach($result as $v1){
//get the blog name from each user and save it as $blogname to use in the next foreach
$db_table = $db_prefix . "_" . $v1->blog_id . "_options" ;
$requestx = "select option_value from " . $db_table . " where option_name='blogname' and option_id=2;";
$resultx = $wpdb->get_results($requestx);
$blogname = $resultx[0]->option_value;
//for each user get all their posts
$db_table = $db_prefix . "_" . $v1->blog_id . "_posts" ;
$request2 = "select * from " . $db_table . ";";
$result2 = $wpdb->get_results($request2);
$domain = $v1->domain;
$path = $v1->path;
//print_r($result2);
//list every post in the system
foreach($result2 as $v2){
//this part takes the date and breaks it up into year, month, day, but first save the date to use it
$array = explode(" ", $v2->post_date);
$array = explode("-", $array[0]);
$y = $array[0]; $m = $array[1]; $d = $array[2];
$allposts[$i]['datetime'] = $v2->post_date;
$string = $y . "/" . $m . "/" . $d . "/" . $v2->post_name;
$allposts[$i]['title'] = $v2->post_title;
$allposts[$i]['path'] = $v1->path;
$post_type = $v2->post_type;
/*this part gives you the post/page format, and guid URL if it's a guest poster */
//if guest user ID?
if($v2->post_type == attachment) {
}
else {
if($v2->guid !== NULL) {
$allposts[$i]['fullurl'] = $v2->guid;
$allposts[$i]['blogname'] = $blogname;
}
$i++;}
}
}
usort($allposts, "bigcmp");
//get total number of posts
$today = date('m-d-Y');
$totalposts = count($allposts);
echo '
//make the length as short as the implementer wants it
$url = substr($allposts[$i]['title'], 0, $width);
$author = "Published " . $dateposted;
$author = substr($author, 0, $width);
$blogname = $allposts[$i]['blogname'];
$blogname = substr($blogname, 0, $width);
$asd = strlen($allposts[$i]['fullurl']);
$dsa = strlen("");
if ($dsa !== $asd) {
echo '
i have pretty permalinks enabled but show ?p=3