UTW Tag Addon Version: 1.1 Author: Richard Rosalion Author URI: http://tech.sobriquet.net */ function GetNRtags() { global $wpdb,$table_prefix; $nrObject = &GoogleSitemapGenerator::GetInstance(); $nrtags=array(); $nrbook=array(); $nrauthor=array(); //Query Now Reading tags table and add them into the array $nrtags=$wpdb->get_results("SELECT t_name FROM " . $table_prefix . "now_reading_tags" . ""); if($nrtags) { foreach($nrtags as $nrtag) { $nr_tag = get_bloginfo('url') . '/library/tag/' . $nrtag->t_name . "/"; if($nrObject!=null) $nrObject->AddUrl($nr_tag,time(),"daily",0.4); } } // Query Now Reading Authors and add them into the array $nrauthors=$wpdb->get_results("SELECT DISTINCT b_nice_author FROM " . $table_prefix . "now_reading" . ""); if($nrauthors) { foreach($nrauthors as $nrauthor) { $nr_author = get_bloginfo('url') . '/library/' . $nrauthor->b_nice_author . "/"; if($nrObject!=null) $nrObject->AddUrl($nr_author,time(),"daily",0.3); } } // Add library page if($nrObject!=null) $nrObject->AddUrl(get_bloginfo('url') . '/library/',time(),"monthly",0.8); // Query Now Reading Books Table and add them into the array $nrbooks=$wpdb->get_results("SELECT b_nice_author, b_nice_title FROM " . $table_prefix . "now_reading" . ""); if($nrbooks) { foreach($nrbooks as $nrbook) { $nr_book = get_bloginfo('url') . '/library/' . $nrbook->b_nice_author . "/" . $nrbook->b_nice_title . "/"; if($nrObject!=null) $nrObject->AddUrl($nr_book,time(),"monthly",0.4); } } } add_action("sm_buildmap","GetNRtags"); ?>