# HG changeset patch # User Dan # Date 1213495265 14400 # Node ID c51809bdf6af684c92ff48e33f86c15dc013041c # Parent 172544257e2ca5acfae5cc53ef90f93aa74c5f2a Updated for compatibility with 1.1.4 diff -r 172544257e2c -r c51809bdf6af plugins/nuggie/postbit.php --- a/plugins/nuggie/postbit.php Sat Mar 15 15:21:47 2008 -0400 +++ b/plugins/nuggie/postbit.php Sat Jun 14 22:01:05 2008 -0400 @@ -153,11 +153,16 @@ $strings['PERMALINK'] = makeUrlNS('Blog', $this->post_author . date('/Y/n/j/', $this->post_timestamp) . $this->post_title_clean, false, true); $strings['EDIT_LINK'] = makeUrlNS('Special', "Preferences/Blog/Write/{$this->post_id}", false, true); - /* - * FIXME: Make this a real colored userpage link - */ - - $strings['USER_LINK'] = '<fixme>' . htmlspecialchars($this->post_author) . '</fixme>'; + // if we're on an enano with user rank support, cool. if not, just don't link + if ( method_exists($session, 'get_user_rank') ) + { + $rank_data = $session->get_user_rank($this->post_author); + $strings['USER_LINK'] = '' . htmlspecialchars($this->post_author) . ''; + } + else + { + $strings['USER_LINK'] = '' . htmlspecialchars($this->post_author) . ''; + } if ( $this->num_comments == 0 ) $comment_string = 'No comments'; @@ -313,7 +318,17 @@ $postbit->auth_edit = $perms->get_permissions($acl_type); $postbit->num_comments = intval($row['num_comments']); - $template->tpl_strings['PAGE_NAME'] = htmlspecialchars($row['post_title']) . ' « ' . htmlspecialchars($row['blog_name']); + $page_name = htmlspecialchars($row['post_title']) . ' « ' . htmlspecialchars($row['blog_name']); + if ( method_exists($template, 'assign_vars') ) + { + $template->assign_vars(array( + 'PAGE_NAME' => $page_name + )); + } + else + { + $template->tpl_strings['PAGE_NAME'] = $page_name; + } $template->header(); echo '< ' . htmlspecialchars($row['blog_name']) . ''; @@ -392,7 +407,17 @@ return false; } - $template->tpl_strings['PAGE_NAME'] = htmlspecialchars($blog_name) . ' » ' . htmlspecialchars($blog_subtitle); + $page_name = htmlspecialchars($blog_name) . ' » ' . htmlspecialchars($blog_subtitle); + if ( method_exists($template, 'assign_vars') ) + { + $template->assign_vars(array( + 'PAGE_NAME' => $page_name + )); + } + else + { + $template->tpl_strings['PAGE_NAME'] = $page_name; + } $postbit = new NuggiePostbit(); // $q, $tpl_text, $num_results, $result_url, $start = 0, $perpage = 10, $callers = Array(), $header = '', $footer = '' diff -r 172544257e2c -r c51809bdf6af plugins/nuggie/search.php --- a/plugins/nuggie/search.php Sat Mar 15 15:21:47 2008 -0400 +++ b/plugins/nuggie/search.php Sat Jun 14 22:01:05 2008 -0400 @@ -15,7 +15,7 @@ $plugins->attachHook('search_global_inner', 'nuggie_search($query, $query_phrase, $scores, $page_data, $case_sensitive, $word_list);'); /** - * Searches the forums for the specified search terms. Called from a hook. + * Searches the site's blog database for the specified search terms. Called from a hook. * @access private */