2009-11-20 05:01:51 +00:00
|
|
|
<?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)
|
|
|
|
*
|
|
|
|
* Sitelinks configuration module - gsitemap
|
|
|
|
*
|
|
|
|
* $Source: /cvs_backup/e107_0.8/e107_plugins/faqs/e_sitelink.php,v $
|
2010-02-10 18:18:01 +00:00
|
|
|
* $Revision$
|
|
|
|
* $Date$
|
|
|
|
* $Author$
|
2009-11-20 05:01:51 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (!defined('e107_INIT')) { exit; }
|
2015-02-07 13:38:29 -08:00
|
|
|
/*if(!e107::isInstalled('gsitemap'))
|
2009-11-20 05:01:51 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
2013-02-26 03:43:52 -08:00
|
|
|
class faqs_sitelink // include plugin-folder in the name.
|
2009-11-20 05:01:51 +00:00
|
|
|
{
|
|
|
|
function config()
|
|
|
|
{
|
|
|
|
global $pref;
|
|
|
|
|
|
|
|
$links = array();
|
|
|
|
|
|
|
|
$links[] = array(
|
2012-12-12 21:30:43 -08:00
|
|
|
'name' => LAN_PLUGIN_FAQS_FUNCTIONNAME, // "FAQ Categories",
|
|
|
|
'function' => "faqCategories"
|
2009-11-20 05:01:51 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return $links;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function faqCategories()
|
|
|
|
{
|
|
|
|
$sql = e107::getDb();
|
2012-12-12 21:30:43 -08:00
|
|
|
$tp = e107::getParser();
|
2009-11-20 05:01:51 +00:00
|
|
|
$sublinks = array();
|
|
|
|
|
2013-05-20 01:06:52 -07:00
|
|
|
$sql->select("faqs_info","*","faq_info_id != '' ORDER BY faq_info_order");
|
2009-11-20 05:01:51 +00:00
|
|
|
|
2013-05-20 01:06:52 -07:00
|
|
|
while($row = $sql->fetch())
|
2009-11-20 05:01:51 +00:00
|
|
|
{
|
|
|
|
$sublinks[] = array(
|
2012-12-12 21:30:43 -08:00
|
|
|
'link_name' => $tp->toHtml($row['faq_info_title'],'','TITLE'),
|
2013-03-07 14:56:37 +02:00
|
|
|
'link_url' => e107::getUrl()->sc('faqs/list/all', array('category' => $row['faq_info_id'])),
|
2009-11-20 05:01:51 +00:00
|
|
|
'link_description' => $row['faq_info_about'],
|
2013-07-12 09:07:56 -07:00
|
|
|
'link_button' => $row['faq_info_icon'],
|
2009-11-20 05:01:51 +00:00
|
|
|
'link_category' => '',
|
|
|
|
'link_order' => '',
|
|
|
|
'link_parent' => '',
|
|
|
|
'link_open' => '',
|
|
|
|
'link_class' => intval($row['faq_info_class'])
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $sublinks;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|