Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Writing plugin for sh404SEF
Pages: [1]   Go Down
  Print  
Author Topic: Writing plugin for sh404SEF  (Read 5279 times)
0 Members and 1 Guest are viewing this topic.
korb
Newbie
*

Karma: 3
Offline Offline

Posts: 30



WWW
« on: December 28, 2008, 19:07:38 »

Ok, as promised, I started to code the plugin for sh404SEF according to it's documentation and links from jComments.

So far I noticed only RSS links need to turn to SEF so these are the only cases I think it needs SEF rewriting rules, but links don't get rewritten! What is wrong with this code?

Code:
<?php
defined
'_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );

// ------------------  standard plugin initialize function - don't change 
global $sh_LANG$sefConfig

$shLangName '';;
$shLangIso '';
$title = array();
$shItemidString '';
$dosef shInitializePlugin$lang$shLangName$shLangIso$option);

// ------------------  standard plugin initialize function - don't change 

// ------------------  load language file - adjust as needed ----------------------------------------
$shLangIso shLoadPluginLanguage'com_jcomments'$shLangIso'_Jcomments');
// ------------------  load language file - adjust as needed ----------------------------------------

global $mainframe;

if (isset(
$task) && ($task == 'rss_full')) {
  
$title[] = 'rss';
  
$title[] = 'all-comments';
  
shRemoveFromGETVarsList('task');
  }
if (isset(
$task) && ($task == 'rss')) {
  
$title[] = 'rss';
  
shRemoveFromGETVarsList('task');
  }  
if (isset(
$object_id)  shRemoveFromGETVarsList('object_id');

if (isset(
$tmpl)  shRemoveFromGETVarsList('tmpl');


shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('lang');
if (!empty(
$Itemid)) 
  
shRemoveFromGETVarsList('Itemid');
// optional removal of limit and limitstart
if (!empty($limit))      // use empty to test $limit as $limit is not allowed to be zero
  
shRemoveFromGETVarsList('limit'); 
if (isset(
$limitstart))  // use isset to test $limitstart, as it can be zero
  
shRemoveFromGETVarsList('limitstart');

// ------------------  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 
?>


According to this plugin, links should be really great, but no change.
This line
shRemoveFromGETVarsList('something');
removes variables that I saw were set (isset), but nothing happends.

Help a little!
Danny
Logged

Visit my JComments powered website
PC Adviser - IT Info & Shop in one place.
korb
Newbie
*

Karma: 3
Offline Offline

Posts: 30



WWW
« Reply #1 on: January 23, 2009, 19:07:18 »

Hey please help this development, I cannot do it without your help. Should be a switch constructor for task? Should be somehow different?
Danny
« Last Edit: January 23, 2009, 19:09:58 by korb » Logged

Visit my JComments powered website
PC Adviser - IT Info & Shop in one place.
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    JComments component    Integration with third-party extensions    Topic: Writing plugin for sh404SEF
 
Jump to: