Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't show the link to all news, if no news.

  • Loading branch information...
commit 80b63021e019735785fe04bcaf64a24ddaccd562 1 parent 80ac644
@paxed authored
Showing with 14 additions and 6 deletions.
  1. +7 −3 basetemplate.php
  2. +7 −3 templates/nhqdb/nhqdb.php
View
10 basetemplate.php
@@ -136,9 +136,13 @@ function edit_news_page($news)
function main_page($news)
{
- return '<div id="home_all"><div id="news">'.$news.
- '<div class="show_all_news"><a href="?'.urlargs('news').'">'.lang('news_show_all').'</a></div></div>
- <div id="home_greeting">'.lang('home_greeting').'</div></div>';
+ $str = '<div id="home_all"><div id="news">'.$news;
+ if ($news) {
+ $str .= '<div class="show_all_news"><a href="?'.urlargs('news').'">'.lang('news_show_all').'</a></div>';
+ }
+ $str .= '</div>';
+ $str .= '<div id="home_greeting">'.lang('home_greeting').'</div></div>';
+ return $str;
}
function add_quote_preview($quotetxt)
View
10 templates/nhqdb/nhqdb.php
@@ -83,9 +83,13 @@ function edit_news_page($news)
function main_page($news)
{
- return $this->get_messages() . '<div id="home_all"><div id="news">'.$news.
- '<div class="show_all_news"><a href="?'.urlargs('news').'">'.lang('news_show_all').'</a></div></div>
- <div id="home_greeting">'.lang('home_greeting').'</div></div>';
+ $str = $this->get_messages() . '<div id="home_all"><div id="news">'.$news;
+ if ($news) {
+ $str .= '<div class="show_all_news"><a href="?'.urlargs('news').'">'.lang('news_show_all').'</a></div>';
+ }
+ $str .= '</div>';
+ $str .= '<div id="home_greeting">'.lang('home_greeting').'</div></div>';
+ return $str;
}
Please sign in to comment.
Something went wrong with that request. Please try again.