Commit 4f47fc42 by Scott Vivian

Snow theme: minor cleanup of theme PHP file

parent 92172a43
<?php <?php
class qa_html_theme extends qa_html_theme_base
class qa_html_theme extends qa_html_theme_base {
{ // change style of WYSIWYG editor to match theme better
function head_script()
function head_script() // change style of WYSIWYG editor to match theme better
{ {
qa_html_theme_base::head_script(); qa_html_theme_base::head_script();
...@@ -16,7 +15,8 @@ ...@@ -16,7 +15,8 @@
); );
} }
function nav_user_search() // outputs login form if user not logged in // outputs login form if user not logged in
function nav_user_search()
{ {
if (!qa_is_logged_in()) { if (!qa_is_logged_in()) {
$login=@$this->content['navigation']['user']['login']; $login=@$this->content['navigation']['user']['login'];
...@@ -72,14 +72,16 @@ ...@@ -72,14 +72,16 @@
} }
} }
function body_header() // adds login bar, user navigation and search at top of page in place of custom header content // adds login bar, user navigation and search at top of page in place of custom header content
function body_header()
{ {
$this->output('<div id="qa-login-bar"><div id="qa-login-group">'); $this->output('<div id="qa-login-bar"><div id="qa-login-group">');
$this->nav_user_search(); $this->nav_user_search();
$this->output('</div></div>'); $this->output('</div></div>');
} }
function header_custom() // allows modification of custom element shown inside header after logo // allows modification of custom element shown inside header after logo
function header_custom()
{ {
if (isset($this->content['body_header'])) { if (isset($this->content['body_header'])) {
$this->output('<div class="header-banner">'); $this->output('<div class="header-banner">');
...@@ -88,7 +90,8 @@ ...@@ -88,7 +90,8 @@
} }
} }
function header() // removes user navigation and search from header and replaces with custom header content. Also opens new <div>s // removes user navigation and search from header and replaces with custom header content. Also opens new <div>s
function header()
{ {
$this->output('<div class="qa-header">'); $this->output('<div class="qa-header">');
...@@ -104,19 +107,22 @@ ...@@ -104,19 +107,22 @@
} }
function sidepanel() // removes sidebar for user profile pages // removes sidebar for user profile pages
function sidepanel()
{ {
if ($this->template!='user') if ($this->template!='user')
qa_html_theme_base::sidepanel(); qa_html_theme_base::sidepanel();
} }
function footer() // prevent display of regular footer content (see body_suffix()) and replace with closing new <div>s // prevent display of regular footer content (see body_suffix()) and replace with closing new <div>s
function footer()
{ {
$this->output('</div> <!-- END main-wrapper -->'); $this->output('</div> <!-- END main-wrapper -->');
$this->output('</div> <!-- END main-shadow -->'); $this->output('</div> <!-- END main-shadow -->');
} }
function title() // add RSS feed icon after the page title // add RSS feed icon after the page title
function title()
{ {
qa_html_theme_base::title(); qa_html_theme_base::title();
...@@ -126,7 +132,8 @@ ...@@ -126,7 +132,8 @@
$this->output('<a href="'.$feed['url'].'" title="'.@$feed['label'].'"><img src="'.$this->rooturl.'images/rss.jpg" alt="" width="16" height="16" border="0" class="qa-rss-icon"/></a>'); $this->output('<a href="'.$feed['url'].'" title="'.@$feed['label'].'"><img src="'.$this->rooturl.'images/rss.jpg" alt="" width="16" height="16" border="0" class="qa-rss-icon"/></a>');
} }
function q_item_stats($q_item) // add view count to question list // add view count to question list
function q_item_stats($q_item)
{ {
$this->output('<div class="qa-q-item-stats">'); $this->output('<div class="qa-q-item-stats">');
...@@ -137,13 +144,15 @@ ...@@ -137,13 +144,15 @@
$this->output('</div>'); $this->output('</div>');
} }
function view_count($q_item) // prevent display of view count in the usual place // prevent display of view count in the usual place
function view_count($q_item)
{ {
if ($this->template=='question') if ($this->template=='question')
qa_html_theme_base::view_count($q_item); qa_html_theme_base::view_count($q_item);
} }
function body_suffix() // to replace standard Q2A footer // to replace standard Q2A footer
function body_suffix()
{ {
$this->output('<div class="qa-footer-bottom-group">'); $this->output('<div class="qa-footer-bottom-group">');
qa_html_theme_base::footer(); qa_html_theme_base::footer();
...@@ -161,7 +170,7 @@ ...@@ -161,7 +170,7 @@
qa_html_theme_base::attribution(); qa_html_theme_base::attribution();
} }
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment