Hi My Name is Vinh , I want to get support with sh404sef .
1. I want to see Class Diagram , Database Diagram Sh404sef , Helper class ? what type of cache on sh404sef ? is this same with Joomla 3 when i use it with code below:
$cache = JFactory::getCache();
$list = $cache->call(array('mod_slideshowHelper','getList'),$params);
[/code]
2. I have write my component , call it com_product .
- On View List Catalog: I want to rewrite to www.mydomain/catalog-name/
- On View Detail Product: I want to rewrite to www.mydomain/catalog-name/product-name.html
but I got www.mydomain/catalog-name.html and www.mydomain/catalog-name/product-name.html with code below:
<?php
/**
* sh404SEF - SEO extension for Joomla!
*
* @author Yannick Gaultier
* @copyright (c) Yannick Gaultier - Weeblr llc - 2015
* @package sh404SEF
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @version 4.4.8.2409
* @date 2015-04-05
*/
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
// ------------------ standard plugin initialize function - don't change ---------------------------
global $sh_LANG;
$sefConfig = & Sh404sefFactory::getConfig();
$shLangName = '';
$shLangIso = '';
$title = array();
$shItemidString = '';
$dosef = shInitializePlugin( $lang, $shLangName, $shLangIso, $option);
if ($dosef == false) return;
// ------------------ standard plugin initialize function - don't change ---------------------------
$view = isset($view) ? $view : null;
$layout = isset($layout) ? $layout : null;
$task = isset($task) ? $task : null;
switch($view){
case 'catalog':
try{
$catid = isset($catid) ? $catid : null;
$catobj = ShlDbHelper::selectObject( '#__categories', array( 'id', 'title'), array( 'id' => $catid));
}
catch(Exception $e)
{
ShlSystem_Log::error( 'sh404sef', '%s::%s::%d: %s', __CLASS__, __METHOD__, __LINE__, $e->getMessage());
}
if($catobj) $title[] = $catobj->title;
shRemoveFromGETVarsList('catid');
break;
case 'product':
try{
$id = isset($id) ? $id : null;
$productobj = ShlDbHelper::selectObject( '#__product', array( 'id', 'title','catid'), array( 'id' => $id));
$catid = $productobj->catid;
$catobj = ShlDbHelper::selectObject( '#__categories', array( 'id', 'title'), array( 'id' => $catid));
}
catch(Exception $e)
{
ShlSystem_Log::error( 'sh404sef', '%s::%s::%d: %s', __CLASS__, __METHOD__, __LINE__, $e->getMessage());
}
if($id){
$title[] = $catobj->title;
$title[] = $productobj->title;
}
shRemoveFromGETVarsList('id');
break;
default:
break;
}
shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('view');
shRemoveFromGETVarsList('Itemid');
shRemoveFromGETVarsList('lang');
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($dosef){
$string = shFinalizePlugin( $string, $title, $shAppendString, $shItemidString,
(isset($limit) ? @$limit : null), (isset($limitstart) ? @$limitstart : null),
(isset($shLangName) ? @$shLangName : null));
}
// ------------------ standard plugin finalize function - don't change ---------------------------
?>
Can you support me for this problem ? thanks you
1. I want to see Class Diagram , Database Diagram Sh404sef , Helper class ? what type of cache on sh404sef ? is this same with Joomla 3 when i use it with code below:
$cache = JFactory::getCache();
$list = $cache->call(array('mod_slideshowHelper','getList'),$params);
[/code]
2. I have write my component , call it com_product .
- On View List Catalog: I want to rewrite to www.mydomain/catalog-name/
- On View Detail Product: I want to rewrite to www.mydomain/catalog-name/product-name.html
but I got www.mydomain/catalog-name.html and www.mydomain/catalog-name/product-name.html with code below:
<?php
/**
* sh404SEF - SEO extension for Joomla!
*
* @author Yannick Gaultier
* @copyright (c) Yannick Gaultier - Weeblr llc - 2015
* @package sh404SEF
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @version 4.4.8.2409
* @date 2015-04-05
*/
defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );
// ------------------ standard plugin initialize function - don't change ---------------------------
global $sh_LANG;
$sefConfig = & Sh404sefFactory::getConfig();
$shLangName = '';
$shLangIso = '';
$title = array();
$shItemidString = '';
$dosef = shInitializePlugin( $lang, $shLangName, $shLangIso, $option);
if ($dosef == false) return;
// ------------------ standard plugin initialize function - don't change ---------------------------
$view = isset($view) ? $view : null;
$layout = isset($layout) ? $layout : null;
$task = isset($task) ? $task : null;
switch($view){
case 'catalog':
try{
$catid = isset($catid) ? $catid : null;
$catobj = ShlDbHelper::selectObject( '#__categories', array( 'id', 'title'), array( 'id' => $catid));
}
catch(Exception $e)
{
ShlSystem_Log::error( 'sh404sef', '%s::%s::%d: %s', __CLASS__, __METHOD__, __LINE__, $e->getMessage());
}
if($catobj) $title[] = $catobj->title;
shRemoveFromGETVarsList('catid');
break;
case 'product':
try{
$id = isset($id) ? $id : null;
$productobj = ShlDbHelper::selectObject( '#__product', array( 'id', 'title','catid'), array( 'id' => $id));
$catid = $productobj->catid;
$catobj = ShlDbHelper::selectObject( '#__categories', array( 'id', 'title'), array( 'id' => $catid));
}
catch(Exception $e)
{
ShlSystem_Log::error( 'sh404sef', '%s::%s::%d: %s', __CLASS__, __METHOD__, __LINE__, $e->getMessage());
}
if($id){
$title[] = $catobj->title;
$title[] = $productobj->title;
}
shRemoveFromGETVarsList('id');
break;
default:
break;
}
shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('view');
shRemoveFromGETVarsList('Itemid');
shRemoveFromGETVarsList('lang');
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($dosef){
$string = shFinalizePlugin( $string, $title, $shAppendString, $shItemidString,
(isset($limit) ? @$limit : null), (isset($limitstart) ? @$limitstart : null),
(isset($shLangName) ? @$shLangName : null));
}
// ------------------ standard plugin finalize function - don't change ---------------------------
?>
Can you support me for this problem ? thanks you