Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

how build own sef extension for my own component
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: how build own sef extension for my own component

how build own sef extension for my own component 14 years, 11 months ago #9869

hello

i followed the instructions for creating new joomsef extension for my own component but iam failed .

Please check the code below that i used for my extension

<?php
/**
* SEF module for Joomla!
*
* @author $Author: michal $
* @copyright ARTIO s.r.o., http://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.');
 
class sefext_com_testvideo extends sef_joomsef
 
{
//print_r($_REQUEST);
//exit;
function Create($string, &$vars) {
global $sefConfig, $debug, $debug_string;
 
extract($vars); $title = array();
 
switch ($task) {
case 'showclasses':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-0';}else {
$title[] = 'myclass-/'.$classid.'-0';}
break;
case 'showcomments':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-1';}else {
$title[] = 'myclass-/'.$classid.'-1';}
break;
case 'showvocabularies':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-2';}else {
$title[] = 'myclass-/'.$classid.'-2';}
break;
case 'showdialogues':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-3';}else {
$title[] = 'myclass-/'.$classid.'-3';}
break;
case 'showphrases':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-4';}else {
$title[] = 'myclass-/'.$classid.'-4';}
break;
case 'showwiki':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-5';}else {
$title[] = 'myclass-/'.$classid.'-5';}
break;
case 'showcomprehensions':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-6';}else {
$title[] = 'myclass-/'.$classid.'-6';}
break;
case 'showpictures':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-7';}else {
$title[] = 'myclass-/'.$classid.'-7';}
break;
case 'showhanzi':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-8';}else {
$title[] = 'myclass-/'.$classid.'-8';}
break;
case 'showtranslate':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-9';}else {
$title[] = 'myclass-/'.$classid.'-9';}
break;
case 'showlistening':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-10';}else {
$title[] = 'myclass-/'.$classid.'-10';}
break;
case 'showmatching':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-11';}else {
$title[] = 'myclass-/'.$classid.'-11';}
break;
case 'showfillin':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-12';}else {
$title[] = 'myclass-/'.$classid.'-12';}
break;
case 'showgrammar':
if(($row->classid)%2==0){
$title[] = 'myclass-/'.$classid.'-13';}else {
$title[] = 'myclass/'.$classid.'-13';}
break;
}
 
// $title[] = $sefConfig->suffix;
 
$nonSefVars = array();
if (count($title) > 0) {
if (isset($classid)) $nonSefVars['classid'] = $classid;
$string = sef_joomsef::sefGetLocation($string, $title, @$task, null, null, null);}
 
 
//$string = sef_joomsef::sefGetLocation($string, $title, @$task, @$limit, @$limitstart, @$lang);
 
if ($debug) { $GLOBALS['JOOMSEF_DEBUG']['CLASS_SEF_JOOMSEF'][$debug_string]['STRING'] = $string; }
 
 
 
 
return $string;
}
}
?>
  • Page:
  • 1
User Login Empty