From 3fe28110bf9af34755550a9d5f13b914d55e3155 Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 21 Sep 2018 21:46:13 +0200 Subject: [PATCH 1/2] {COMMENT_BUTTON} - added class parameter #3444 --- e107_core/shortcodes/batch/comment_shortcodes.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e107_core/shortcodes/batch/comment_shortcodes.php b/e107_core/shortcodes/batch/comment_shortcodes.php index 5a71895df..be8cf5e0b 100644 --- a/e107_core/shortcodes/batch/comment_shortcodes.php +++ b/e107_core/shortcodes/batch/comment_shortcodes.php @@ -217,7 +217,8 @@ class comment_shortcodes extends e_shortcode * */ } - + /* example {COMMENT_BUTTON} */ + /* example {COMMENT_BUTTON: class=btn btn-default pull-right} */ function sc_comment_button($parm = '') { $pref = e107::getPref('comments_sort'); @@ -228,8 +229,9 @@ class comment_shortcodes extends e_shortcode $value = (varset($this->var['eaction']) == "edit" ? COMLAN_320 : COMLAN_9); $pid = ($this->var['action'] == 'reply') ? $this->var['pid'] : 0; + $class = (!empty($parm['class'])) ? $parm['class'] : 'button btn btn-primary e-comment-submit pull-right'; $options = array( - 'class' => 'button btn btn-primary e-comment-submit pull-right', + 'class' => $class, 'data-pid' => $pid, 'data-sort' => $pref, 'data-target' => e_HTTP . 'comment.php', From 6f8fdf51e6bbc10471281674423e1c90941463aa Mon Sep 17 00:00:00 2001 From: Jimako Date: Fri, 21 Sep 2018 23:09:00 +0200 Subject: [PATCH 2/2] Mandatory class for reply to work #3444 --- e107_core/shortcodes/batch/comment_shortcodes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e107_core/shortcodes/batch/comment_shortcodes.php b/e107_core/shortcodes/batch/comment_shortcodes.php index be8cf5e0b..0abe2ca3d 100644 --- a/e107_core/shortcodes/batch/comment_shortcodes.php +++ b/e107_core/shortcodes/batch/comment_shortcodes.php @@ -229,7 +229,8 @@ class comment_shortcodes extends e_shortcode $value = (varset($this->var['eaction']) == "edit" ? COMLAN_320 : COMLAN_9); $pid = ($this->var['action'] == 'reply') ? $this->var['pid'] : 0; - $class = (!empty($parm['class'])) ? $parm['class'] : 'button btn btn-primary e-comment-submit pull-right'; + $class = "e-comment-submit "; + $class .= (!empty($parm['class'])) ? $parm['class'] : 'button btn btn-primary e-comment-submit pull-right'; $options = array( 'class' => $class, 'data-pid' => $pid,