Hi ,
I have created extension for portfolio component .
It is working only for index page of portfolio means convert only portfolio link and not the category and subcategory link .
please have a look at
www.opengeers.com .
my code is as follows ,is there any way to track its working .
i have used file write method to track its working...
<?php
/**
* SEF module for Joomla!
*
* @author $Author: michal $
* @copyright ARTIO s.r.o.,
www.artio.cz
* @package JoomSEF
* @version $Name$, ($Revision: 4994 $, $Date: 2005-11-03 20:50:05 +0100 (??t, 03 XI 2005) $)
*/
// Security check to ensure this file is being included by a parent file.
if (!defined('_VALID_MOS')) die('Direct Access to this location is not allowed.');
/**
* Toevoegen:
* viewforum en viewtopic weghalen?
* support voor: index.php?option=com_forum&Itemid=26&c=1
*/
class sefext_com_portfol extends sef_404
{
function create($string, &$vars) {
extract($vars);
$title=array();
// JF translate extension.
// $jfTranslate = $sefConfig->translateNames ? ', `id`' : '';
if (!empty($refid)) {
$query = \"
SELECT `title`
FROM `jos_portfol`
WHERE `id` = '$refid'\";
$database->setQuery($query);
$page = $database->loadResult();
fwrite($handle,$query);
}
// First subdir
if (!empty($option)) {
$title[] = getMenuTitle($option, @$this_task);
unset($vars['option']);
if (empty($title)) {
$comp_name = str_replace('com_', '', $option);
$title = $comp_name;
}
}
// Category
if (!empty($vcatid)) {
$title[] = '/';
$title[] = $category;
//unset($vars['vcatid']);
}
// Sub Category
if (!empty($vcatid)) {
$title[] = \"/\".$subcategory;
unset($vars['vcatid']);
}
// Handle nonSef variables
$nonSefVars = array();
if (isset($prev)) $nonSefVars['prev'] = $prev;
if (isset($next)) $nonSefVars['next'] = $next;
echo \"title==\".$title;
fwrite($handle,$title);
if (count($title) > 0) $string = sef_404::sefGetLocation($string, $title, $task, (isset($limit) ? @$limit : null), (isset($limitstart) ? @$limitstart : null), (isset($lang) ? @$lang : null),$nonSefVars);
return $string;
}
}
?>