TableOfContents

Components

Joomla

Full menu too short in the backend

Component installation failure due to ending slashes

/**
* @param string An existing base path
* @param string A path to create from the base path
* @param int Directory permissions
* @return boolean True if successful
*/
function mosMakePath($base, $path='', $mode = NULL) {
        global $mosConfig_dirperms;

        // convert windows paths
        $path = str_replace( '\\', '/', $path );
        $path = str_replace( '//', '/', $path );

        // check if dir exists
        if (file_exists( $base . $path )) return true;

        // set mode
        $origmask = NULL;
        if (isset($mode)) {
                $origmask = @umask(0);
        } else {
                if ($mosConfig_dirperms=='') {
                        // rely on umask
                        $mode = 0777;
                } else {
                        $origmask = @umask(0);
                        $mode = octdec($mosConfig_dirperms);
                } // if
        } // if

        $parts = explode( '/', $path );
        $n = count( $parts );
        $ret = true;
        if ($n < 1) {
                if (substr( $base, -1, 1 ) == '/') {
                        $base = substr( $base, 0, -1 );
                }
                $ret = @mkdir(trimEndingSlashes($base), $mode);
        } else {
                $path = $base;
                for ($i = 0; $i < $n; $i++) {
                        $path .= $parts[$i] . '/';
                        if (!file_exists( $path )) {
                                if (!@mkdir(trimEndingSlashes(substr($path,0,-1)),$mode)) {
                                        $ret = false;
                                        break;
                                }
                        }
                }
        }
        if (isset($origmask)) {
                @umask($origmask);
        }

        return $ret;
}

function trimEndingSlashes($base){
                if (substr( $base, -1, 1 ) == '/') {
                        return substr( $base, 0, -1 );
                } else {
                        return $base;
                }

}

Live bookmarks problem (Firefox 1.5, Joomla 1.0.7)

UTF-8 feeds

将Joomla!修改为UTF-8编码之后,发现新闻聚合导出(如rss 0.91 , rss 1.0 , rss 2.0 , atom , opml 等)中文字符为乱码显示。

该问题产生的原因是虽然在语言文件设置了变量DEFINE('_ISO','charset=utf-8');,但新闻聚合模块COM_RSS页面硬编码为iso-8859-1(西欧编码)。

解决方法为: 1、将/modules目录下的mod_rssfeed.xml的第一行 <?xml version="1.0" encoding="iso-8859-1"?> 更改为 <?xml version="1.0" encoding="UTF-8"?> ,同时将该文件转为UTF-8格式。 2、最重要:将/includes/feedcreator.class.php的第514行、 var $encoding = "UTF-8"; 改为 var $encoding = "UTF-8"; 3、

ps1:新闻聚合模块涉及到的文件如下: 1、/modules目录下的mod_rssfeed.xml和mod_rssfeed.php 2、/components/com_rss/rss.php 3、/includes/feedcreator.class.php

ps2:/includes/feedcreator.class.php第1181-1184行有如下函数

暂时不知何用。

Tooltip color

"Written by" should be "Published by"