/ Published in: PHP
Just a quick fix for a tag link issue I came across.\r\n\r\nbroken url:\r\ndomain.com/tag/two word.html\r\n\r\nif you take the spaces in the URL and replace them with pluses (‘+’) it’ll work. For example:\r\n\r\nfixed url:\r\ndomain.com/tag/two+word.html\r\n\r\ntested and working on Joomla 1.5.15, with K2 2.1 and sh404sef 1.0.20Beta – build237\r\n\r\nsource shows this file: /modules/modk2tools/tmpl/tags.php\r\nbut it’s the same basic fix for the other files:\r\n/components/comk2/templates/default/item.php\r\n/components/comk2/templates/default/category_item.php
Expand |
Embed | Plain Text
<?php /* // "K2 Tools" Module by JoomlaWorks for Joomla! 1.5.x - Version 2.1 // Copyright (c) 2006 - 2009 JoomlaWorks Ltd. All rights reserved. // Released under the GNU/GPL license: http://www.gnu.org/copyleft/gpl.html // More info at http://www.joomlaworks.gr and http://k2.joomlaworks.gr // Designed and developed by the JoomlaWorks team // *** Last update: September 9th, 2009 *** */ //*****/ //the key part is: `<?php echo str_replace(' ','+',$tag->link); ?>` //*****/ // no direct access defined('_JEXEC') or die('Restricted access'); ?> <?php foreach ($tags as $tag): ?> <a href="<?php echo str_replace(' ','+',$tag->link); ?>" style="font-size:<?php echo $tag->size; ?>%" title="<?php echo $tag->count.' '.JText::_('items tagged with').' '.$tag->tag; ?>"> </a> <?php endif; ?> <?php endforeach; ?> <div class="clr"></div> </div>
You need to login to post a comment.
