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 = ''