mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
FAQs: SEF URL fixes.
This commit is contained in:
@@ -53,7 +53,7 @@ class faqs_sitelink // include plugin-folder in the name.
|
|||||||
{
|
{
|
||||||
$sublinks[] = array(
|
$sublinks[] = array(
|
||||||
'link_name' => $tp->toHtml($row['faq_info_title'],'','TITLE'),
|
'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_description' => $row['faq_info_about'],
|
||||||
'link_button' => $row['faq_info_icon'],
|
'link_button' => $row['faq_info_icon'],
|
||||||
'link_category' => '',
|
'link_category' => '',
|
||||||
|
@@ -19,7 +19,7 @@ if (!defined('e107_INIT'))
|
|||||||
require_once("../../class2.php");
|
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');
|
$url = e107::getUrl()->create('faqs/list/all', false, 'full=1&noencode=1');
|
||||||
header('Location: '.$url);
|
header('Location: '.$url);
|
||||||
|
@@ -108,7 +108,7 @@ class faqs_shortcodes extends e_shortcode
|
|||||||
function sc_faq_question_link($parm='')
|
function sc_faq_question_link($parm='')
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$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()
|
function sc_faq_answer()
|
||||||
@@ -149,7 +149,8 @@ class faqs_shortcodes extends e_shortcode
|
|||||||
$urlparms = array();
|
$urlparms = array();
|
||||||
if($this->category) $urlparms['category'] = $this->category;
|
if($this->category) $urlparms['category'] = $this->category;
|
||||||
$urlparms['tag'] = $tag;
|
$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;
|
if($parm == 'url') return $url;
|
||||||
|
|
||||||
return '<a href="'.$url.'" title="'.$tag.'">'.$tag.'</a>';
|
return '<a href="'.$url.'" title="'.$tag.'">'.$tag.'</a>';
|
||||||
@@ -206,7 +207,7 @@ class faqs_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
function sc_faq_caturl()
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user