mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
FAQs initial rewrite done
This commit is contained in:
@@ -1,25 +1,24 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
| http://e107.org
|
||||
|
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/faqs/admin_config.php,v $
|
||||
| $Revision$
|
||||
| $Date$
|
||||
| $Author$
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
//define('e_MINIMAL',true);
|
||||
require_once("../../class2.php");
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
e107::lan('faqs', 'admin');
|
||||
/**
|
||||
*
|
||||
* @package e107
|
||||
* @subpackage faqs
|
||||
* @version $Id$
|
||||
* @author e107inc
|
||||
*
|
||||
* FAQ plugin admin UI
|
||||
*/
|
||||
|
||||
require_once("../../class2.php");
|
||||
|
||||
class faq_admin extends e_admin_dispatcher
|
||||
{
|
||||
@@ -41,9 +40,9 @@ class faq_admin extends e_admin_dispatcher
|
||||
|
||||
protected $adminMenu = array(
|
||||
'main/list' => array('caption'=> LAN_MANAGE, 'perm' => '0'),
|
||||
'main/create' => array('caption'=> 'Create FAQ', 'perm' => '0'),
|
||||
'cat/list' => array('caption'=> 'Categories', 'perm' => '0'),
|
||||
'cat/create' => array('caption'=> "Create Category", 'perm' => '0'),
|
||||
'main/create' => array('caption'=> LANA_FAQ_CREATE_ITEM, 'perm' => '0'),
|
||||
'cat/list' => array('caption'=> LANA_FAQ_CATEGORIES, 'perm' => '0'),
|
||||
'cat/create' => array('caption'=> LANA_FAQ_CREATE_CATEGORY, 'perm' => '0'),
|
||||
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
|
||||
// 'main/custom' => array('caption'=> 'Custom Page', 'perm' => '0')
|
||||
);
|
||||
@@ -57,7 +56,7 @@ class faq_admin extends e_admin_dispatcher
|
||||
|
||||
class faq_cat_ui extends e_admin_ui
|
||||
{
|
||||
protected $pluginTitle = 'FAQs';
|
||||
protected $pluginTitle = LAN_PLUGIN_FAQS_NAME;
|
||||
protected $pluginName = 'plugin';
|
||||
protected $table = "faqs_info";
|
||||
protected $pid = "faq_info_id";
|
||||
@@ -183,14 +182,14 @@ class faq_main_ui extends e_admin_ui
|
||||
protected $fields = array(
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'faq_id' => array('title'=> LAN_ID, 'tab' => 0, 'type' => 'int', 'width' =>'5%', 'forced'=> TRUE),
|
||||
'faq_question' => array('title'=> "Question", 'tab' => 0, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'required'=>TRUE, 'readParms'=>'editable=1'),
|
||||
'faq_answer' => array('title'=> "Answer", 'tab' => 0, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=1&truncate=50&bb=1'),
|
||||
'faq_question' => array('title'=> LANA_FAQ_QUESTION, 'tab' => 0, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'required'=>TRUE, 'readParms'=>'editable=1'),
|
||||
'faq_answer' => array('title'=> LANA_FAQ_ANSWER, 'tab' => 0, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=1&truncate=50&bb=1'),
|
||||
'faq_parent' => array('title'=> LAN_CATEGORY, 'tab' => 0, 'type' => 'dropdown', 'data'=> 'int', 'inline'=>true,'width' => '10%', 'filter'=>TRUE, 'batch'=>TRUE),
|
||||
'faq_comment' => array('title'=> "Comment", 'tab' => 1, 'type' => 'userclass', 'data' => 'int', 'width' => 'auto', 'inline'=> true), // User id
|
||||
'faq_comment' => array('title'=> LANA_FAQ_COMMENT, 'tab' => 1, 'type' => 'userclass', 'data' => 'int', 'width' => 'auto', 'inline'=> true), // User id
|
||||
'faq_datestamp' => array('title'=> LAN_DATE, 'tab' => 1, 'type' => 'datestamp', 'data'=> 'int','width' => 'auto', 'noedit' => false,'writeParms'=>'auto=1'),
|
||||
'faq_author' => array('title'=> LAN_USER, 'tab' => 1, 'type' => 'user', 'data'=> 'int', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'writeParms' => 'currentInit=1', 'filter' => true, 'batch' => true, 'nolist' => true ), // Photo
|
||||
'u.user_name' => array('title'=> "User name", 'tab' => 1, 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User name
|
||||
'u.user_loginname' => array('title'=> "User login", 'tab' => 1, 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User login name
|
||||
'u.user_name' => array('title'=> LANA_FAQ_UNAME, 'tab' => 1, 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User name
|
||||
'u.user_loginname' => array('title'=> LANA_FAQ_ULOGINNAME, 'tab' => 1, 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User login name
|
||||
'faq_order' => array('title'=> LAN_ORDER, 'tab' => 1, 'type' => 'number', 'data'=> 'int','width' => '5%', 'thclass' => 'center','nolist' => false, 'noedit'=>false, 'readParms'=>'editable=1'),
|
||||
'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center','readParms'=>'sort=1')
|
||||
);
|
||||
@@ -200,9 +199,9 @@ class faq_main_ui extends e_admin_ui
|
||||
|
||||
// optional, if $pluginName == 'core', core prefs will be used, else e107::getPluginConfig($pluginName);
|
||||
protected $prefs = array(
|
||||
'add_faq' => array('title'=> 'Allow submitting of FAQs by:', 'type'=>'userclass'),
|
||||
'submit_question' => array('title'=> 'Allow submitting of Questions by:', 'type'=>'userclass'),
|
||||
'classic_look' => array('title'=> 'Use Classic Layout', 'type'=>'boolean')
|
||||
'add_faq' => array('title'=> LANA_FAQ_PREF_1, 'type'=>'userclass', 'help' => 'Under construction'),
|
||||
'submit_question' => array('title'=> LANA_FAQ_PREF_2, 'type'=>'userclass', 'help' => 'Under construction'),
|
||||
'classic_look' => array('title'=> LANA_FAQ_PREF_3, 'type'=>'boolean', 'help' => 'Under construction')
|
||||
);
|
||||
|
||||
protected $categories = array();
|
||||
@@ -308,4 +307,3 @@ e107::getAdminUI()->runPage();
|
||||
require_once(e_ADMIN."footer.php");
|
||||
exit;
|
||||
|
||||
?>
|
@@ -18,8 +18,26 @@
|
||||
* FAQ plugin list controller
|
||||
*/
|
||||
|
||||
class plugin_faqs_list_controller extends eController
|
||||
class plugin_faqs_list_controller extends eControllerFront
|
||||
{
|
||||
/**
|
||||
* Plugin name - used to check if plugin is installed
|
||||
* Set this only if plugin requires installation
|
||||
* @var string
|
||||
*/
|
||||
protected $plugin = 'faqs';
|
||||
|
||||
/**
|
||||
* User input filter (_GET)
|
||||
* Format 'action' => array(var => validationArray)
|
||||
* @var array
|
||||
*/
|
||||
protected $filter = array(
|
||||
'all' => array(
|
||||
'category' => array('int', '0:'),
|
||||
),
|
||||
);
|
||||
|
||||
public function init()
|
||||
{
|
||||
e107::lan('faqs', 'front');
|
||||
@@ -41,7 +59,17 @@ class plugin_faqs_list_controller extends eController
|
||||
$FAQ_END = e107::getTemplate('faqs', true, 'end');
|
||||
$FAQ_LISTALL = e107::getTemplate('faqs', true, 'all');
|
||||
|
||||
$query = "SELECT f.*,cat.* FROM #faqs AS f LEFT JOIN #faqs_info AS cat ON f.faq_parent = cat.faq_info_id WHERE cat.faq_info_class IN (".USERCLASS_LIST.") ORDER BY cat.faq_info_order,f.faq_order ";
|
||||
// request parameter based on filter (int match in this case, see $this->filter[all][category]) - SAFE to be used in a query
|
||||
$category = $this->getRequest()->getRequestParam('category');
|
||||
$where = '';
|
||||
if($category)
|
||||
{
|
||||
$where = " AND f.faq_parent={$category}";
|
||||
}
|
||||
$query = "
|
||||
SELECT f.*,cat.* FROM #faqs AS f
|
||||
LEFT JOIN #faqs_info AS cat ON f.faq_parent = cat.faq_info_id
|
||||
WHERE cat.faq_info_class IN (".USERCLASS_LIST."){$where} ORDER BY cat.faq_info_order,f.faq_order ";
|
||||
$sql->gen($query);
|
||||
|
||||
$prevcat = "";
|
||||
@@ -70,7 +98,7 @@ class plugin_faqs_list_controller extends eController
|
||||
$text .= $tp->parseTemplate($FAQ_LISTALL['end'], true);
|
||||
$text .= $tp->parseTemplate($FAQ_END, true);
|
||||
|
||||
$this->addTitle(FAQLAN_FAQ);
|
||||
$this->addTitle(LAN_PLUGIN_FAQS_FRONT_NAME);
|
||||
|
||||
$this->addBody($text);
|
||||
}
|
||||
|
@@ -3,6 +3,3 @@
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
e107::css('faqs','faqs.css');
|
||||
// echo '<link rel="stylesheet" href="'.e_PLUGIN_ABS.'faqs/faqs.css" type="text/css" />';
|
||||
|
||||
?>
|
@@ -1,5 +0,0 @@
|
||||
<?php
|
||||
if (!defined('e107_INIT')){ exit; }
|
||||
$search_info[]=array( 'sfile' => e_PLUGIN.'faqs/search.php', 'qtype' => 'FAQ', 'refpage' => 'faqs.php');
|
||||
|
||||
?>
|
@@ -53,7 +53,7 @@ class faqs_sitelink // include plugin-folder in the name.
|
||||
{
|
||||
$sublinks[] = array(
|
||||
'link_name' => $tp->toHtml($row['faq_info_title'],'','TITLE'),
|
||||
'link_url' => '{e_PLUGIN}faqs/faqs.php?cat.'.$row['faq_info_id'],
|
||||
'link_url' => e107::getUrl()->sc('faqs/list/all', array('category' => $row['faq_info_id'])),
|
||||
'link_description' => $row['faq_info_about'],
|
||||
'link_button' => '',
|
||||
'link_category' => '',
|
||||
@@ -69,7 +69,3 @@ class faqs_sitelink // include plugin-folder in the name.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -14,8 +14,14 @@
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
// SUBJECT OF REMOVAL
|
||||
|
||||
require_once ("../../class2.php");
|
||||
|
||||
$url = e107::getUrl()->create('faqs/list/all', false, 'full=1&noencode=1');
|
||||
header('Location: '.$url);
|
||||
exit;
|
||||
|
||||
include_lan(e_PLUGIN."faqs/languages/".e_LANGUAGE."/".e_LANGUAGE."_front.php");
|
||||
|
||||
|
||||
|
@@ -60,4 +60,3 @@ class faqs_setup
|
||||
}
|
||||
*/
|
||||
}
|
||||
?>
|
@@ -1,22 +1,26 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| Copyright (c) e107 Inc. 2008-2009
|
||||
| http://e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/faqs/faqs_shortcodes.php,v $
|
||||
| $Revision$
|
||||
| $Date$
|
||||
| $Author$
|
||||
+----------------------------------------------------------------------------+
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
/**
|
||||
*
|
||||
* @package e107
|
||||
* @subpackage faqs
|
||||
* @version $Id$
|
||||
* @author e107inc
|
||||
*
|
||||
* FAQ shortcodes
|
||||
*/
|
||||
|
||||
|
||||
class faqs_shortcodes extends e_shortcode
|
||||
{
|
||||
// var $var;
|
||||
@@ -41,7 +45,7 @@ class faqs_shortcodes extends e_shortcode
|
||||
function sc_faq_question_link($parm='')
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
return "<a class='faq-question' href='faqs.php?cat.".$this->var['faq_info_id'].".".$this->var['faq_id']."' >".$tp -> toHtml($this->var['faq_question'])."</a>";
|
||||
return "<a class='faq-question' href='". e107::getUrl()->create('faqs/view/item', array('id' => $this->var['faq_id']))."' >".$tp -> toHtml($this->var['faq_question'])."</a>";
|
||||
}
|
||||
|
||||
function sc_faq_answer()
|
||||
@@ -56,20 +60,20 @@ class faqs_shortcodes extends e_shortcode
|
||||
$faqpref = e107::getPlugConfig('faqs')->getPref();
|
||||
if(($faqpref['add_faq'] && $this->var['faq_author'] == USERID) || ADMIN )
|
||||
{
|
||||
return "[ <a href='faqs.php?edit.".$this->var['faq_parent'].".".$this->var['faq_id']."'>Edit</a> ]";
|
||||
// UNDER CONSTRUCTION
|
||||
//return "[ <a href='faqs.php?edit.".$this->var['faq_parent'].".".$this->var['faq_id']."'>Edit</a> ]";
|
||||
}
|
||||
}
|
||||
|
||||
function sc_faq_category()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
return "<a href='".e_SELF."?cat.".$this->var['faq_info_id']."'>".$tp->toHtml($this->var['faq_info_title'])."</a>";
|
||||
return "<a href='".e107::getUrl()->create('faqs/list/all', array('category' => $this->var['faq_info_id']))."'>".$tp->toHtml($this->var['faq_info_title'])."</a>";
|
||||
}
|
||||
|
||||
function sc_faq_catlink()
|
||||
function sc_faq_caturl()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
return "<a href='".e_SELF."?cat.".$this->var['faq_info_id']."'>".($this->var['faq_info_title'] ? $tp -> toHtml($this->var['faq_info_title']) : "[".NWSLAN_42."]")."</a>";
|
||||
return e107::getUrl()->create('faqs/list/all', array('category' => $this->var['faq_info_id']));
|
||||
}
|
||||
|
||||
function sc_faq_count()
|
||||
@@ -81,16 +85,17 @@ class faqs_shortcodes extends e_shortcode
|
||||
function sc_faq_cat_diz()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
return $tp->toHtml($this->var['faq_info_about'])." ";
|
||||
return $tp->toHtml($this->var['faq_info_about']);
|
||||
}
|
||||
|
||||
function sc_faq_icon()
|
||||
{
|
||||
return "<img src='".e_PLUGIN."faq/images/faq.png' alt='' />";
|
||||
return "<img src='".e_PLUGIN_ABS."faq/images/faq.png' alt='' />";
|
||||
}
|
||||
|
||||
function sc_faq_submit_question()
|
||||
{
|
||||
return ''; // UNDER CONSTRUCTION
|
||||
$faqpref = e107::getPlugConfig('faqs')->getPref();
|
||||
$frm = e107::getForm();
|
||||
|
||||
@@ -110,6 +115,7 @@ class faqs_shortcodes extends e_shortcode
|
||||
|
||||
function sc_faq_search()
|
||||
{
|
||||
return ''; // UNDER CONSTRUCTION
|
||||
$tp = e107::getParser();
|
||||
return "<div style='text-align:center'><br />".$tp->parseTemplate("{SEARCH=faqs}")."</div>";
|
||||
}
|
||||
|
@@ -1,114 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/faqs/faqs_template.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
if(!defined("USER_WIDTH"))
|
||||
{
|
||||
define("USER_WIDTH","width:97%");
|
||||
}
|
||||
|
||||
// FAQ - NEW LOOK (all you need is here) -------------------------------------------------------------
|
||||
|
||||
$FAQ_START = "<div class='faq-start'>\n";
|
||||
$FAQ_END = "<div class='faq-submit-question'>{FAQ_SUBMIT_QUESTION}</div>
|
||||
<div class='faq-search'>{FAQ_SEARCH}</div>
|
||||
</div>";
|
||||
|
||||
$FAQ_LISTALL_START = "<div><h2 class='faq-listall'>{FAQ_CATEGORY}</h2><ul class='faq-listall'>\n";
|
||||
$FAQ_LISTALL_LOOP = "<li class='faq-listall'>{FAQ_QUESTION=expand}</li>\n";
|
||||
$FAQ_LISTALL_END = "</ul></div>\n";
|
||||
|
||||
|
||||
// FAQ - CLASSIC LOOK BELOW #####################################################
|
||||
|
||||
// FAQ - PARENT LIST ---------------------------------------------------------
|
||||
|
||||
$FAQ_CAT_START = "
|
||||
<table class='table fborder' style='".USER_WIDTH."'>
|
||||
<tr>
|
||||
<td colspan='2' style='text-align:center; width:55%' class='fcaption'>".FAQLAN_41."</td>
|
||||
<td class='fcaption' style='width:20%;text-align:center'>".FAQLAN_42."</td>
|
||||
</tr>";
|
||||
|
||||
$FAQ_CAT_PARENT = "
|
||||
<tr>
|
||||
<td colspan='3' style='width:55%' class='forumheader'>
|
||||
{FAQ_CATEGORY}
|
||||
<span class='smalltext'> {FAQ_CAT_DIZ}</span>
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
$FAQ_CAT_CHILD = "
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:30px'>{FAQ_ICON}</td>
|
||||
<td class='forumheader2' style='width:95%'>{FAQ_CATLINK}
|
||||
<br /><span class='smalltext'>{FAQ_CAT_DIZ}</span></td>
|
||||
<td style='width:100px; text-align:center' class='forumheader2'>
|
||||
{FAQ_COUNT}
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
$FAQ_CAT_END = "</table></div></div>";
|
||||
|
||||
|
||||
// FAQ - LIST ---------------------------------------------------------
|
||||
|
||||
$FAQ_LIST_START = "
|
||||
<table class='table fborder' style='".USER_WIDTH."'> ";
|
||||
|
||||
$FAQ_LIST_LOOP .= "
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:30px;vertical-align:top'>{FAQ_ICON}</td>
|
||||
<td class='forumheader3'> {FAQ_QUESTION_LINK}</td>
|
||||
</tr>";
|
||||
|
||||
$FAQ_LIST_END = "</table>";
|
||||
|
||||
|
||||
// FAQ - VIEW ----------------------------------------------------------------
|
||||
// FAQ - VIEW
|
||||
|
||||
$FAQ_VIEW_TEMPLATE =
|
||||
"
|
||||
<table class='table fborder' style='margin-left:auto;margin-right:auto;padding:0px;".USER_WIDTH.";' >
|
||||
<tr>
|
||||
<td class='forumheader3' style='vertical-align:top;width:30px'>
|
||||
<img src='".e_PLUGIN_ABS."faqs/images/q.png' alt='' />
|
||||
</td>
|
||||
<td class='forumheader3' style='vertical-align:top'>
|
||||
{FAQ_QUESTION}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:30px;vertical-align:top'>
|
||||
<img src='".e_PLUGIN_ABS."faqs/images/a.png' alt='' />
|
||||
</td>
|
||||
<td class='forumheader3'>
|
||||
<div class='faq_answer'>{FAQ_ANSWER}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style='text-align:right; width:100%'>
|
||||
{FAQ_EDIT}
|
||||
</div>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -15,3 +15,6 @@ define('LANA_FAQ_ANSWER', 'Answer');
|
||||
define('LANA_FAQ_COMMENT', 'Comment');
|
||||
define('LANA_FAQ_UNAME', 'User name');
|
||||
define('LANA_FAQ_ULOGINNAME', 'User login');
|
||||
define('LANA_FAQ_PREF_1', 'Allow submitting of FAQs by:');
|
||||
define('LANA_FAQ_PREF_2', 'Allow submitting of Questions by:');
|
||||
define('LANA_FAQ_PREF_3', 'Use Classic Layout');
|
||||
|
@@ -9,4 +9,6 @@
|
||||
define("LAN_PLUGIN_FAQS_NAME", "FAQs");
|
||||
define("LAN_PLUGIN_FAQS_DESCRIPTION", "A simple plugin to add Frequently Asked Questions to your website.");
|
||||
define("LAN_PLUGIN_FAQS_FUNCTIONNAME", "FAQ Categories");
|
||||
?>
|
||||
define("LAN_PLUGIN_FAQS_FRONT_NAME", "FAQ (Frequently Asked Questions)");
|
||||
|
||||
|
||||
|
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
// FAQs front-end language file.
|
||||
//TODO Rework names.
|
||||
|
||||
define(FAQLAN_23, "FAQ (Frequently Asked Questions) :: ");
|
||||
define(FAQLAN_38, "Comment"); //TODO Generic Front-end
|
||||
define(FAQLAN_FAQ, "FAQ");
|
||||
define(FAQLAN_41, "FAQ Categories");
|
||||
define(FAQLAN_42, "Total");
|
||||
|
||||
define(FAQ_ADLAN_29, "FAQ entry updated");
|
||||
define(FAQ_ADLAN_30, "You left a required field blank.");
|
||||
define(FAQ_ADLAN_32, "New FAQ item created and entered into database.");
|
||||
|
||||
define(FAQ_ADLAN_45, "Edit"); //TODO Generic Front-end
|
||||
define(FAQ_ADLAN_49, "Previous FAQ entries: ");
|
||||
define(FAQ_ADLAN_50, "Delete"); //TODO Generic Front-end
|
||||
define(FAQ_ADLAN_51, "FAQ Question: ");
|
||||
define(FAQ_ADLAN_52, "Allow Comments?: ");
|
||||
define(FAQ_ADLAN_53, "Update FAQ Item ");
|
||||
define(FAQ_ADLAN_54, "Submit FAQ Item");
|
||||
define(FAQ_ADLAN_60, "FAQ Answer:");
|
||||
|
||||
define(FAQ_ADLAN_78, "Category"); //TODO Generic Front-end
|
||||
|
||||
|
||||
?>
|
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
define(SLAN_0, "No matches.");//98
|
||||
define(SLAN_1, "News Items");//99
|
||||
define(SLAN_2, "Comments");//100
|
||||
define(SLAN_3, "Articles");//101
|
||||
define(SLAN_4, "Chatbox");//102
|
||||
define(SLAN_5, "Links");//103
|
||||
define(SLAN_6, "Forum");//104
|
||||
define(SLAN_7, "Reviews");//190
|
||||
define(SLAN_8, "Content");
|
||||
define(SLAN_9, "Registered members");//140
|
||||
define(SLAN_10, "Frequent Asked Questions");
|
||||
define(SLAN_11, "All categories");
|
||||
define(SLAN_12, "Search for ");
|
||||
define(SLAN_13, "News");
|
||||
define(SLAN_14, "Comments");
|
||||
define(SLAN_15, "Articles");
|
||||
define(SLAN_16, "Reviews");
|
||||
define(SLAN_17, "Chatbox");
|
||||
define(SLAN_18, "Links");
|
||||
define(SLAN_19, "Forum");
|
||||
define(SLAN_20, "Users");
|
||||
define(SLAN_21, "FAQ");
|
||||
define(SLAN_22, "Event Calendar");
|
||||
define(SLAN_23, "Search");//180
|
||||
define(SLAN_24, "Search ");
|
||||
define(SLAN_25, "Searching ");
|
||||
define(SLAN_26, " :: matches: ");
|
||||
|
||||
|
||||
|
||||
?>
|
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
// search module for faq.
|
||||
if (!defined('e107_INIT')){ exit; }
|
||||
$search_info[$key]['qtype'] = "FAQs";
|
||||
|
||||
if($results = $sql -> db_Select("faqs", "*", "faq_question REGEXP('".$query."') OR faq_answer REGEXP('".$query."') ORDER BY faq_id DESC ")){
|
||||
while($row = $sql -> db_Fetch()){
|
||||
extract($row);
|
||||
if(preg_match('/'.str_replace('/', '\\/', $query).'/i', $faq_question)){
|
||||
$que = parsesearch($faq_question, $query);
|
||||
$ans = substr($faq_answer, 0,70);
|
||||
$text .= "<img src=\"".THEME."images/bullet2.gif\" alt=\"bullet\" /> <b><a href=\"".e_PLUGIN."faqs/faqs.php?cat.".$faq_parent.".".$faq_id."\">".$que."</a></b><br /><span class=\"smalltext\">Match found in faq question</span><br />".$ans."<br /><br />";
|
||||
}
|
||||
if(preg_match('/'.str_replace('/', '\\/', $query).'/i', $faq_answer)){
|
||||
$resmain = parsesearch($faq_answer, $query);
|
||||
$text .= "<img src=\"".THEME."images/bullet2.gif\" alt=\"bullet\" /> <b><a href=\"".e_PLUGIN."faqs/faqs.php?cat.".$faq_parent.".".$faq_id."\">".$faq_question."</a></b><br /><span class=\"smalltext\">Match found in faq answer</span><br />".$resmain."<br /><br />";
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$text .= "No matches.";
|
||||
}
|
||||
?>
|
@@ -6,16 +6,8 @@
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/faqs/faqs_template.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
// FAQ - NEW LOOK (all you need is here) -------------------------------------------------------------
|
||||
|
||||
$FAQS_TEMPLATE['start'] = "
|
||||
<div class='faq-start'>
|
||||
";
|
||||
@@ -39,77 +31,3 @@ $FAQS_TEMPLATE['all']['end'] = "
|
||||
</div>
|
||||
";
|
||||
|
||||
|
||||
// FAQ - CLASSIC LOOK BELOW #####################################################
|
||||
|
||||
// FAQ - PARENT LIST ---------------------------------------------------------
|
||||
|
||||
$FAQS_TEMPLATE['cat']['start'] = "
|
||||
<table class='table fborder' style='".USER_WIDTH."'>
|
||||
<tr>
|
||||
<td colspan='2' style='text-align:center; width:55%' class='fcaption'>".FAQLAN_41."</td>
|
||||
<td class='fcaption' style='width:20%;text-align:center'>".FAQLAN_42."</td>
|
||||
</tr>";
|
||||
|
||||
$FAQS_TEMPLATE['cat']['parent'] = "
|
||||
<tr>
|
||||
<td colspan='3' style='width:55%' class='forumheader'>
|
||||
{FAQ_CATEGORY}
|
||||
<span class='smalltext'> {FAQ_CAT_DIZ}</span>
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
$FAQS_TEMPLATE['cat']['child'] = "
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:30px'>{FAQ_ICON}</td>
|
||||
<td class='forumheader2' style='width:95%'>{FAQ_CATLINK}
|
||||
<br /><span class='smalltext'>{FAQ_CAT_DIZ}</span></td>
|
||||
<td style='width:100px; text-align:center' class='forumheader2'>
|
||||
{FAQ_COUNT}
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
$FAQS_TEMPLATE['cat']['end'] = "</table></div></div>";
|
||||
|
||||
|
||||
// FAQ - LIST ---------------------------------------------------------
|
||||
|
||||
$FAQS_TEMPLATE['list']['start'] = "
|
||||
<table class='table fborder' style='".USER_WIDTH."'> ";
|
||||
|
||||
$FAQS_TEMPLATE['list']['item'] .= "
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:30px;vertical-align:top'>{FAQ_ICON}</td>
|
||||
<td class='forumheader3'> {FAQ_QUESTION_LINK}</td>
|
||||
</tr>";
|
||||
|
||||
$FAQS_TEMPLATE['list']['end'] = "</table>";
|
||||
|
||||
|
||||
// FAQ - VIEW ----------------------------------------------------------------
|
||||
// FAQ - VIEW
|
||||
|
||||
$FAQS_TEMPLATE['view']['start'] = "
|
||||
<table class='table fborder' style='margin-left:auto;margin-right:auto;padding:0px;".USER_WIDTH.";' >
|
||||
<tr>
|
||||
<td class='forumheader3' style='vertical-align:top;width:30px'>
|
||||
<img src='".e_PLUGIN_ABS."faqs/images/q.png' alt='' />
|
||||
</td>
|
||||
<td class='forumheader3' style='vertical-align:top'>
|
||||
{FAQ_QUESTION}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class='forumheader3' style='width:30px;vertical-align:top'>
|
||||
<img src='".e_PLUGIN_ABS."faqs/images/a.png' alt='' />
|
||||
</td>
|
||||
<td class='forumheader3'>
|
||||
<div class='faq_answer'>{FAQ_ANSWER}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style='text-align:right; width:100%'>
|
||||
{FAQ_EDIT}
|
||||
</div>
|
||||
";
|
||||
|
Reference in New Issue
Block a user