mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
FAQs language fixes for frontend.
This commit is contained in:
@@ -241,6 +241,8 @@ class faq_main_ui extends e_admin_ui
|
||||
'add_faq' => array('title'=> LANA_FAQ_PREF_1, 'tab'=>0, 'type'=>'userclass' ),
|
||||
'submit_question' => array('title'=> LANA_FAQ_PREF_2, 'tab'=>0, 'type'=>'userclass' ),
|
||||
'submit_question_limit' => array('title'=> "'Ask a Question' limit per user", 'tab'=>0, 'type'=>'number', 'data'=>'int', 'help'=>'0 = no limit'),
|
||||
'submit_question_language' => array('title'=> "'Ask a Question' limited to", 'tab'=>0,'type'=>'dropdown' ),
|
||||
|
||||
'submit_question_acknowledgement' => array('title'=> "Submitted Questions Acknowledgement", 'type'=>'textarea', 'help'=>'Leave blank to use default' ),
|
||||
|
||||
'classic_look' => array('title'=> LANA_FAQ_PREF_3,'tab'=>0, 'type'=>'boolean' ),
|
||||
@@ -267,7 +269,7 @@ class faq_main_ui extends e_admin_ui
|
||||
|
||||
public function init()
|
||||
{
|
||||
|
||||
$this->prefs['submit_question_language']['writeParms'] = array(0=> 'English', 1=>'All Languages');
|
||||
|
||||
|
||||
$sql = e107::getDb();
|
||||
|
@@ -254,7 +254,7 @@ class faq
|
||||
|
||||
if($sql->insert('faqs',$insert))
|
||||
{
|
||||
$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
|
||||
$message = !empty($this->pref['submit_question_acknowledgement']) ? e107::getParser()->toHtml($this->pref['submit_question_acknowledgement'],true, 'BODY') : LAN_FAQS_ASKQUESTION_AFTER;
|
||||
e107::getMessage()->addSuccess($message);
|
||||
}
|
||||
|
||||
@@ -372,7 +372,8 @@ class faq
|
||||
|
||||
if(!$sql->gen($query))
|
||||
{
|
||||
return "<div class='alert alert-warning alert-block'><b>".$srch."</b> was not found in search results. <a class='e-tip' title='Reset' href='".$removeUrl."'>Reset</a></div>" ; //TODO LAN
|
||||
$message = (!empty($srch)) ? "<b>".$srch."</b> was not found in search results. <a class='e-tip' title='Reset' href='".$removeUrl."'>Reset</a>" : LAN_FAQS_NONE_AVAILABLE;
|
||||
return "<div class='alert alert-warning alert-block'>".$message."</div>" ; //TODO LAN
|
||||
}
|
||||
|
||||
// -----------------
|
||||
|
@@ -258,6 +258,12 @@ class faqs_shortcodes extends e_shortcode
|
||||
|
||||
$faqpref = e107::pref('faqs');
|
||||
|
||||
if(empty($faqpref['submit_question_language']) && e107::getPref('sitelanguage') != e_LANGUAGE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(!empty($parms['expand']))
|
||||
{
|
||||
$hide = 'e-hideme';
|
||||
|
@@ -8,3 +8,5 @@
|
||||
|
||||
define("LAN_FAQS_TAGS", "Tags");
|
||||
define("LAN_FAQS_FILTER_ACTIVE", "Filter Active");
|
||||
define("LAN_FAQS_NONE_AVAILABLE", "There are currently no FAQs available.");
|
||||
define("LAN_FAQS_ASKQUESTION_AFTER", "Thank you. Your question has been saved and will be answered as soon as possible.");
|
||||
|
Reference in New Issue
Block a user