Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1263 xoModuleIcons32 cannot show the image link

_inactive
open
nobody
None
1
2015-01-26
2013-03-09
irmtfan
No

there is an obvious bug in xoModuleIcons32 smarty. In xoops 255 and xoops 26 latest rev.
eg:
in XOOPS26/Xoops_lib/Smarty/xoops_plugins/compiler.xoModuleIcons32.php

the solution is very easy just change with this like compiler.xoModuleIcons16.php codes.

[code]
<?php
/*
You may not change or alter any portion of this comment or credits
of supporting developers from this source code or any supporting source code
which is considered copyrighted (c) material of the original comment or credit authors.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/
/

* xoModuleIcons32 Smarty compiler plug-in

* @copyright The XOOPS project http://www.xoops.org/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @author Andricq Nicolas (AKA MusS)
* @since 2.5.2
* @version $Id: compiler.xoModuleIcons32.php 10765 2013-01-11 19:52:44Z trabis $
*/

function smarty_compiler_xoModuleIcons32($argStr, &$smarty)
{
$xoops = Xoops::getInstance();
//$icons = $xoops->getModuleConfig('typeicons', 'system');
//if ($icons == '') {
//$icons = 'default';
//}

if (XoopsLoad::fileExists($xoops->path('media/xoops/images/icons/32/index.html'))) {
    $url = $xoops->url('media/xoops/images/icons/32/' . $argStr);
} else {
    if (XoopsLoad::fileExists($xoops->path('modules/system/images/icons/default/' . $argStr))) {
        $url = $xoops->url('modules/system/images/icons/default/' . $argStr);
    } else {
        $url = $xoops->url('modules/system/images/icons/default/xoops/xoops.png');
    }
}
return "\necho '" . addslashes($url) . "';";

}
[/code]

Discussion