Commit 19cd0ac4 by pupi1985

Removed textdir and a few @ operatos in the SnowFlat theme

parent 54dedd00
...@@ -41,9 +41,9 @@ class qa_html_theme extends qa_html_theme_base ...@@ -41,9 +41,9 @@ class qa_html_theme extends qa_html_theme_base
* @param type $rooturl * @param type $rooturl
* @param type $request * @param type $request
*/ */
public function __construct($template, $content, $rooturl, $request, $textdir='ltr') public function __construct($template, $content, $rooturl, $request)
{ {
parent::__construct($template, $content, $rooturl, $request, $textdir); parent::__construct($template, $content, $rooturl, $request);
// theme subdirectories // theme subdirectories
$this->js_dir = 'js/'; $this->js_dir = 'js/';
...@@ -187,9 +187,8 @@ class qa_html_theme extends qa_html_theme_base ...@@ -187,9 +187,8 @@ class qa_html_theme extends qa_html_theme_base
$this->output('<div class="qam-account-items clearfix">'); $this->output('<div class="qam-account-items clearfix">');
if (!qa_is_logged_in()) { if (!qa_is_logged_in()) {
$login = @$this->content['navigation']['user']['login']; if (isset($this->content['navigation']['user']['login']) && !QA_FINAL_EXTERNAL_USERS) {
$login = $this->content['navigation']['user']['login'];
if (isset($login) && !QA_FINAL_EXTERNAL_USERS) {
$this->output( $this->output(
'<!--[Begin: login form]-->', '<!--[Begin: login form]-->',
'<form id="qa-loginform" action="' . $login['url'] . '" method="post">', '<form id="qa-loginform" action="' . $login['url'] . '" method="post">',
...@@ -237,7 +236,7 @@ class qa_html_theme extends qa_html_theme_base ...@@ -237,7 +236,7 @@ class qa_html_theme extends qa_html_theme_base
*/ */
public function nav_link($navlink, $class) public function nav_link($navlink, $class)
{ {
if (strlen(@$navlink['note'])) { if (isset($navlink['note']) && !empty($navlink['note'])) {
$search = array(' - <', '> - '); $search = array(' - <', '> - ');
$replace = array(' <', '> '); $replace = array(' <', '> ');
$navlink['note'] = str_replace($search, $replace, $navlink['note']); $navlink['note'] = str_replace($search, $replace, $navlink['note']);
...@@ -334,7 +333,8 @@ class qa_html_theme extends qa_html_theme_base ...@@ -334,7 +333,8 @@ class qa_html_theme extends qa_html_theme_base
$this->widgets('side', 'high'); $this->widgets('side', 'high');
$this->nav('cat', 1); $this->nav('cat', 1);
$this->widgets('side', 'low'); $this->widgets('side', 'low');
$this->output_raw(@$this->content['sidepanel']); if (isset($this->content['sidepanel']))
$this->output_raw($this->content['sidepanel']);
$this->feed(); $this->feed();
$this->widgets('side', 'bottom'); $this->widgets('side', 'bottom');
$this->output('</div>', ''); $this->output('</div>', '');
...@@ -351,14 +351,15 @@ class qa_html_theme extends qa_html_theme_base ...@@ -351,14 +351,15 @@ class qa_html_theme extends qa_html_theme_base
{ {
global $qam_snow; global $qam_snow;
$sidebar = @$this->content['sidebar']; if (isset($this->content['sidebar'])) {
$sidebar = $this->content['sidebar'];
if (!empty($sidebar)) { if (!empty($sidebar)) {
$this->output('<div class="qa-sidebar wet-asphalt ' . $qam_snow->welcome_widget_color . '">'); $this->output('<div class="qa-sidebar wet-asphalt ' . $qam_snow->welcome_widget_color . '">');
$this->output_raw($sidebar); $this->output_raw($sidebar);
$this->output('</div>', ''); $this->output('</div>', '');
} }
} }
}
/** /**
* To add close icon * To add close icon
...@@ -382,12 +383,13 @@ class qa_html_theme extends qa_html_theme_base ...@@ -382,12 +383,13 @@ class qa_html_theme extends qa_html_theme_base
*/ */
public function title() public function title()
{ {
$q_view = @$this->content['q_view']; $q_view = isset($this->content['q_view']) ? $this->content['q_view'] : null;
// RSS feed link in title // RSS feed link in title
$feed = @$this->content['feed']; if (isset($this->content['feed']['url'])) {
if (!empty($feed)) { $feed = $this->content['feed'];
$this->output('<a href="' . $feed['url'] . '" title="' . @$feed['label'] . '"><i class="icon-rss qam-title-rss"></i></a>'); $label = isset($feed['label']) ? $feed['label'] : '';
$this->output('<a href="' . $feed['url'] . '" title="' . $label . '"><i class="icon-rss qam-title-rss"></i></a>');
} }
// link title where appropriate // link title where appropriate
...@@ -469,14 +471,15 @@ class qa_html_theme extends qa_html_theme_base ...@@ -469,14 +471,15 @@ class qa_html_theme extends qa_html_theme_base
$this->post_tags($q_view, 'qa-q-view'); $this->post_tags($q_view, 'qa-q-view');
$this->q_view_buttons($q_view); $this->q_view_buttons($q_view);
$this->c_list(@$q_view['c_list'], 'qa-q-view'); $this->c_list(isset($q_view['c_list']) ? $q_view['c_list'] : null, 'qa-q-view');
if (isset($q_view['main_form_tags'])) { if (isset($q_view['main_form_tags'])) {
$this->form_hidden_elements(@$q_view['buttons_form_hidden']); if (isset($q_view['buttons_form_hidden']))
$this->form_hidden_elements($q_view['buttons_form_hidden']);
$this->output('</form>'); $this->output('</form>');
} }
$this->c_form(@$q_view['c_form']); $this->c_form(isset($q_view['c_form']) ? $q_view['c_form'] : null);
$this->output('</div> <!-- END qa-q-view-main -->'); $this->output('</div> <!-- END qa-q-view-main -->');
} }
...@@ -502,7 +505,8 @@ class qa_html_theme extends qa_html_theme_base ...@@ -502,7 +505,8 @@ class qa_html_theme extends qa_html_theme_base
$this->output('<div class="qa-a-item-selected">'); $this->output('<div class="qa-a-item-selected">');
$this->a_selection($a_item); $this->a_selection($a_item);
$this->error(@$a_item['error']); if (isset($a_item['error']))
$this->error($a_item['error']);
$this->a_item_content($a_item); $this->a_item_content($a_item);
if ($a_item['hidden'] || $a_item['selected']) if ($a_item['hidden'] || $a_item['selected'])
...@@ -510,14 +514,16 @@ class qa_html_theme extends qa_html_theme_base ...@@ -510,14 +514,16 @@ class qa_html_theme extends qa_html_theme_base
$this->a_item_buttons($a_item); $this->a_item_buttons($a_item);
$this->c_list(@$a_item['c_list'], 'qa-a-item'); if (isset($a_item['c_list']))
$this->c_list($a_item['c_list'], 'qa-a-item');
if (isset($a_item['main_form_tags'])) { if (isset($a_item['main_form_tags'])) {
$this->form_hidden_elements(@$a_item['buttons_form_hidden']); if (isset($a_item['buttons_form_hidden']))
$this->form_hidden_elements($a_item['buttons_form_hidden']);
$this->output('</form>'); $this->output('</form>');
} }
$this->c_form(@$a_item['c_form']); $this->c_form(isset($a_item['c_form']) ? $a_item['c_form'] : null);
$this->output('</div> <!-- END qa-a-item-main -->'); $this->output('</div> <!-- END qa-a-item-main -->');
} }
...@@ -532,7 +538,8 @@ class qa_html_theme extends qa_html_theme_base ...@@ -532,7 +538,8 @@ class qa_html_theme extends qa_html_theme_base
{ {
$this->post_avatar_meta($c_item, 'qa-c-item'); $this->post_avatar_meta($c_item, 'qa-c-item');
$this->error(@$c_item['error']); if (isset($c_item['error']))
$this->error($c_item['error']);
if (isset($c_item['expand_tags'])) if (isset($c_item['expand_tags']))
$this->c_item_expand($c_item); $this->c_item_expand($c_item);
......
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