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