1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

FAQs: SEF URL fixes.

This commit is contained in:
Cameron 2016-01-26 16:07:35 -08:00
parent 7a38046e4e
commit be309cd7b8
3 changed files with 6 additions and 5 deletions

View File

@ -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' => e107::getUrl()->sc('faqs/list/all', array('category' => $row['faq_info_id'])),
'link_url' => e107::url('faqs', 'category', $row),
'link_description' => $row['faq_info_about'],
'link_button' => $row['faq_info_icon'],
'link_category' => '',

View File

@ -19,7 +19,7 @@ if (!defined('e107_INIT'))
require_once("../../class2.php");
}
if(file_exists(e_PLUGIN."faqs/controllers/list.php"))
if(file_exists(e_PLUGIN."faqs/controllers/list.php")) // bc for old controller.
{
$url = e107::getUrl()->create('faqs/list/all', false, 'full=1&noencode=1');
header('Location: '.$url);

View File

@ -108,7 +108,7 @@ class faqs_shortcodes extends e_shortcode
function sc_faq_question_link($parm='')
{
$tp = e107::getParser();
return "<a class='faq-question' href='". e107::getUrl()->create('faqs/view/item', array('id' => $this->var['faq_id']))."' >".$tp -> toHTML($this->var['faq_question'],true,'TITLE')."</a>";
return "<a class='faq-question' href='". e107::url('faqs', 'item', $this->var)."' >".$tp -> toHTML($this->var['faq_question'],true,'TITLE')."</a>";
}
function sc_faq_answer()
@ -149,7 +149,8 @@ class faqs_shortcodes extends e_shortcode
$urlparms = array();
if($this->category) $urlparms['category'] = $this->category;
$urlparms['tag'] = $tag;
$url = e107::getUrl()->create('faqs/list/all', $urlparms);
// $url = e107::getUrl()->create('faqs/list/all', $urlparms);
$url = e107::url('faqs', 'tag', $urlparms);
if($parm == 'url') return $url;
return '<a href="'.$url.'" title="'.$tag.'">'.$tag.'</a>';
@ -206,7 +207,7 @@ class faqs_shortcodes extends e_shortcode
function sc_faq_caturl()
{
return e107::getUrl()->create('faqs/list/all', array('category' => $this->var['faq_info_id']));
return e107::url('faqs', 'category', $this->var);
}