Full Archives
get_col("SELECT DISTINCT YEAR(post_date) as year FROM $tableposts ORDER BY year ASC"); $output .= ''.NL; foreach ($years as $year) { $output .= ''.NL; foreach ($users as $user) { $output .= ''.NL; } else { $output .= ''.NL; } if ($orderby == 'title') { $output .= ''.NL; } else { $output .= ''.NL; } if ($orderby == 'category') { $output .= ''.NL; } else { $output .= ''.NL; } $output = ''.NL; echo $output; } function show_order_select() { global $order; if ($order == 'ASC') { $output .= ''.NL; } else { $output .= ''.NL; } if ($order == 'DESC') { $output .= ''.NL; } else { $output .= ''.NL; } $output = ''.NL; echo $output; } function archive_header($before='', $after='') { global $post, $orderby, $month, $previous, $siteurl, $blogfilename, $archiveheadstart, $archiveheadend, $category_name; $orderby = explode(' ', $orderby); $orderby = $orderby[0]; if ('date' == $orderby || empty($orderby)) { $thismonth = mysql2date('m', $post->post_date); $thisyear = mysql2date('Y', $post->post_date); $thisdate = $thisyear.$thismonth; if ($thisdate != $previous) { $thismonth = mysql2date('m', $post->post_date); $output .= ''.$month[$thismonth].' '.$thisyear.''; } $previous = $thisdate; } elseif ('title' == $orderby) { preg_match('/[a-z0-9]{1}/i', $post->post_title, $match); $thisletter = ucfirst($match[0]); if ($thisletter != $previous) { $output .= "".$thisletter; } $previous = $thisletter; } elseif ('category' == $orderby) { $thiscategory = $category_name; if ($thiscategory != $previous) { $output .= ''.get_catname($thiscategory).'
'; } $previous = $thiscategory; } if (!empty($output)) { $output = $before.$output.$after.NL; echo $output; } } function archive_date($format='Y-m-d H:i:s') { global $post; echo mysql2date($format, $post->post_date); } ?> get_var("SELECT ID FROM $tableusers WHERE user_nicename='".$author_name."'"); $whichauthor .= ' AND (post_author = '.intval($author).')'; } if (!empty($year)) $where .= ' AND YEAR(post_date)=' . $year; if (!empty($whichauthor)) $where .= $whichauthor; ?> Sort By: get_results("SELECT * FROM $tablecategories WHERE 1=1 ORDER BY cat_name $order"); foreach ($dogs as $catt) { $categories = $wpdb->get_results("SELECT * FROM $tablepost2cat WHERE category_id = $catt->cat_ID"); if ($categories) { foreach ($categories as $post2category) { $posts = $wpdb->get_results("SELECT * FROM $tableposts WHERE $post2category->post_id = ID".$where); //$category_realname = $wpdb->get_row("SELECT cat_name FROM $tablecategories WHERE cat_ID = $post2category->category_id"); //print_r($category_realname); global $category_name; $category_name = $post2category->category_id; if ($posts) { foreach ($posts as $post) { start_wp(); archive_header('






