JoomSEF 1.5.1 - PatchedJoomsef 1.5.1 Meta Generator Patch - Joomla SEO |
Background The Problem The Joomsef 1.5.1 version still has a file called "signature.b64" included with it. This file is checked in every call or click on the website links. The signature file is a base 64 encoded string that, when decoded, contains the a HTML link to Artio. Simply removing the base 64 file will not work and removing the mention of the base 64 file from within the calling PHP code will not work so I have modified the code to not even look for the file and removed all checking for it. The code is quicker as it doesnt do a all the processing, decoding, placement, checking and the display of the advert that would normally happen on every click. During the Artio install it actually mentions the inclusion of these adverts: "The latest open-source version of JoomSEF may contain links to ARTIO webpages or some of the JoomSEF development sponsors. Based on our policy, the older versions of JoomSEF available from our pages will be kept free of these links. You can also get the latest version without links of the JoomSEF from our webshop" To gain a latest version without these sponsors shown in the output code you have to pay for it , that is unless you follow the directions in this patch at your own free will because this patch is. Replace the contents of the whole file with the following. |
| <?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.'); $debug = 0; // IIS patch. if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL']; } // OpenSEF patch. define('_OPENSEF', 1); if ($mosConfig_sef) { // VirtueMart redirection hack if( file_exists($GLOBALS['mosConfig_absolute_path'].'/components/com_virtuemart/virtuemart.php') ) { @session_start(); $_SESSION['vmhack'] = 1; } $sefDirAdmin = $GLOBALS['mosConfig_absolute_path'].'/administrator/components/com_sef/'; // Load language file. if (file_exists($sefDirAdmin.'language/'.$mosConfig_lang.'.php')){ include($sefDirAdmin.'language/'.$mosConfig_lang.'.php'); } else { include($sefDirAdmin.'language/english.php'); } // load config data $sef_config_class = $sefDirAdmin.'sef.class.php'; $sef_config_file = $sefDirAdmin.'config.sef.php'; if (!is_readable($sef_config_file)) die(_COM_SEF_NOREAD."($sef_config_file)<br />"._COM_SEF_CHK_PERMS); if (is_readable($sef_config_class)) require_once($sef_config_class); else die(_COM_SEF_NOREAD."( $sef_config_class )<br />"._COM_SEF_CHK_PERMS); $sefConfig = new SEFConfig(); // check for kind of SEF or no SEF at all // test if this is Joomla! style URL if (strstr($_SERVER['REQUEST_URI'], 'index.php/content/') || strstr($_SERVER['REQUEST_URI'], '/content/') || strstr($_SERVER['REQUEST_URI'], 'index.php/component/option,') || strstr($_SERVER['REQUEST_URI'], '/component/option,')) { require_once('functions.php'); decodeurls_mambo(); } // or TIM style url elseif (strstr($_SERVER['REQUEST_URI'], 'index.php/view/')) { require_once('functions.php'); decodeurls_tim(); } // otherwise operate as with JoomSEF URL else { } $sef404 = $GLOBALS['mosConfig_absolute_path']."/components/com_sef/joomsef.php"; if (is_readable($sef404)) { $index = str_replace($GLOBALS['mosConfig_live_site'], '', $_SERVER['PHP_SELF']); $base = dirname($index); if ($base == '//') $base = '/'; if (substr($base , -1) != '/' || $base == '') $base .= '/'; $index = basename($index); $URI = array(); if (isset($_SERVER['REQUEST_URI'])) { //strip out the base $REQUEST = str_replace($GLOBALS['mosConfig_live_site'], '', $_SERVER['REQUEST_URI']); $REQUEST = preg_replace("/^".preg_quote($base,'/').'/', '', $REQUEST); $URI = new Net_URL($REQUEST); } else { $QUERY_STRING = isset($_SERVER['QUERY_STRING']) ? '?'.$_SERVER['QUERY_STRING'] : ''; $URI = new Net_URL($index.$QUERY_STRING); } if ($debug) { echo('<pre>'); print_r($URI); print_r($_SERVER); echo('</pre>'); die(); } // Make sure host name matches our config, we need this later. if (strpos($GLOBALS['mosConfig_live_site'], $URI->host) === false) { header('HTTP/1.0 301 Moved Permanently'); header('Location: '.$GLOBALS['mosConfig_live_site']); } else include_once($sef404); if (($URI->path == $base) || ($URI->path == ($base.$index)) || (@$option == 'com_frontpage')) { } else { } } else die(_COM_SEF_NOREAD."($sef404)<br />"._COM_SEF_CHK_PERMS); } else { /** * Translate URL. * * @param string $string * @return string */ function sefRelToAbs($string) { return $string; } } ?> |
Or you can download the full Joomsef modified component here.Remember to uninstall the old component then install this one. |

