From 73c93449a691a312d2743f7da9fc52d36cc2835b Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Wed, 3 Apr 2019 10:17:37 +0200 Subject: [PATCH] Update forum SC (VIEWSX and REPLIESX) styling --- .../shortcodes/batch/viewforum_shortcodes.php | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php b/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php index c099078a8..21a8e6a0e 100644 --- a/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php @@ -655,15 +655,8 @@ function sc_views() { $val = ($this->var['thread_views']) ? $this->var['thread_views'] : '0' ; - return e107::getParser()->toBadge($val); - } - - function sc_replies($parm='') - { - $val = ($this->var['thread_total_replies']) ? $this->var['thread_total_replies'] : '0'; - - if($parm === 'raw') + if(!empty($parm['raw'])) { return $val; } @@ -672,15 +665,28 @@ } - function sc_viewsx() + function sc_replies($parm='') { - return $this->sc_views(); + $val = ($this->var['thread_total_replies']) ? $this->var['thread_total_replies'] : '0'; + + if(!empty($parm['raw'])) + { + return $val; + } + + return e107::getParser()->toBadge($val); } - function sc_repliesx() + function sc_viewsx($parm='') { - return $this->sc_replies(); + return $this->sc_views($parm); + } + + + function sc_repliesx($parm='') + { + return $this->sc_replies($parm); } // function sc__wrapper_() { return 'forum_viewforum';}