Return to Snippet

Revision: 29536
at July 31, 2010 06:53 by trepmal


Updated Code
<?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');

?>

<div id="k2ModuleBox<?php echo $module->id; ?>" class="k2TagCloudBlock <?php echo $params->get('moduleclass_sfx'); ?>">
        <?php foreach ($tags as $tag): ?>
        <?php if(!empty($tag->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; ?>">
                <?php echo $tag->tag; ?>
        </a>
        <?php endif; ?>
        <?php endforeach; ?>
        <div class="clr"></div>
</div>

Revision: 29535
at July 31, 2010 06:53 by trepmal


Updated Code
<?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');

?>

<div id="k2ModuleBox<?php echo $module->id; ?>" class="k2TagCloudBlock <?php echo $params->get('moduleclass_sfx'); ?>">
        <?php foreach ($tags as $tag): ?>
        <?php if(!empty($tag->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; ?>">
                <?php echo $tag->tag; ?>
        </a>
        <?php endif; ?>
        <?php endforeach; ?>
        <div class="clr"></div>
</div>

Revision: 29534
at July 31, 2010 06:50 by trepmal


Initial Code
<?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 ***
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

?>

<div id="k2ModuleBox<?php echo $module->id; ?>" class="k2TagCloudBlock <?php echo $params->get('moduleclass_sfx'); ?>">
        <?php foreach ($tags as $tag): ?>
        <?php if(!empty($tag->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; ?>">
                <?php echo $tag->tag; ?>
        </a>
        <?php endif; ?>
        <?php endforeach; ?>
        <div class="clr"></div>
</div>

Initial URL

                                

Initial Description
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.20_Beta – build_237\r\n\r\nsource shows this file: /modules/mod_k2_tools/tmpl/tags.php\r\nbut it’s the same basic fix for the other files:\r\n/components/com_k2/templates/default/item.php\r\n/components/com_k2/templates/default/category_item.php

Initial Title
Joomla K2 Tags Mod

Initial Tags
joomla

Initial Language
PHP