diff --git a/e107_plugins/faqs/admin_config.php b/e107_plugins/faqs/admin_config.php index f806cccb6..597dfd664 100644 --- a/e107_plugins/faqs/admin_config.php +++ b/e107_plugins/faqs/admin_config.php @@ -222,6 +222,8 @@ class faq_main_ui extends e_admin_ui 'add_faq' => array('title'=> LANA_FAQ_PREF_1, 'type'=>'userclass' ), 'submit_question' => array('title'=> LANA_FAQ_PREF_2, 'type'=>'userclass' ), 'submit_question_limit' => array('title'=> "'Ask a Question' limit per user", 'type'=>'number', 'data'=>'int', 'help'=>'0 = no limit'), + 'submit_question_acknowledgement' => array('title'=> "Submitted Questions Acknowledgement", 'type'=>'textarea', 'help'=>'Leave blank to use default' ), + 'classic_look' => array('title'=> LANA_FAQ_PREF_3, 'type'=>'boolean' ), 'list_type' => array('title'=> "List Type", 'type'=>'dropdown', 'writeParms'=>array('ul'=>'Unordered List', 'ol'=>'Ordered List') ), 'page_title' => array('title'=> "Page Title", 'type'=>'text', 'help'=>'Leave blank to use default' ), diff --git a/e107_plugins/faqs/faqs.php b/e107_plugins/faqs/faqs.php index b6d8eee34..a5ea3d9f2 100644 --- a/e107_plugins/faqs/faqs.php +++ b/e107_plugins/faqs/faqs.php @@ -229,7 +229,8 @@ class faq if($sql->insert('faqs',$insert)) { - e107::getMessage()->addSuccess('Thank you. Your question has been saved and will be answered as soon as possible.'); + $message = !empty($this->pref['submit_question_acknowledgement']) ? e107::getParser()->toHtml($this->pref['submit_question_acknowledgement'],true, 'BODY') : 'Thank you. Your question has been saved and will be answered as soon as possible.'; //TODO LAN + e107::getMessage()->addSuccess($message); } } @@ -264,8 +265,15 @@ class faq $ret['title'] = FAQLAN_FAQ; $ret['text'] = $text; - $ret['caption'] = varset($template['caption']) ? $tp->parseTemplate($template['caption'], true, $this->sc) : LAN_PLUGIN_FAQS_FRONT_NAME; - + + if (!empty($this->pref['page_title'])) + { + $ret['caption'] = e107::getParser()->toHtml($this->pref['page_title'], true, 'TITLE'); + } + else + { + $ret['caption'] = varset($template['caption']) ? $tp->parseTemplate($template['caption'], true, $this->sc) : LAN_PLUGIN_FAQS_FRONT_NAME; + } return $ret; diff --git a/e107_plugins/faqs/faqs_shortcodes.php b/e107_plugins/faqs/faqs_shortcodes.php index a58a9e402..4ea2c8695 100644 --- a/e107_plugins/faqs/faqs_shortcodes.php +++ b/e107_plugins/faqs/faqs_shortcodes.php @@ -45,7 +45,7 @@ class faqs_shortcodes extends e_shortcode $faqNew = ($this->var['faq_datestamp'] > $newDate) ? " faq-new" : ""; - if($param == 'expand') + if($param == 'expand' && !empty($this->var['faq_answer'])) { $tags = ''; if(vartrue($params['tags']) && $this->var['faq_tags']) @@ -53,14 +53,17 @@ class faqs_shortcodes extends e_shortcode $tags = "
"; } $id = "faq_".$this->var['faq_id']; + + + $text = "".$tp->toHTML($this->var['faq_question'],true,'TITLE')."