网络摘记 - Joomla相关 |  Date:2007-12-16 |  View:10830 一 首先这个不属于remository,但我在最近的这几天整理网站首页时有此现象产生,利用这个方法解决。
There are no items to display 问题解决方法(就是如果首页没有发布任何文章,会出现“没有可以显示的条目”字符,很难看)当没有一篇文章在Front Page显示时,Joomla的首页会出现There are no items to display的提示,令人心烦,解决办法有2种。
1、编辑language/english.php,大约119行,找到代码
DEFINE('_EMPTY_BLOG','There are no Items to display');
删除There are no items to display。
2、编辑components\com_content\content.php,大约1138行,找到代码
echo _EMPTY_BLOG;
删除这行代码。
适用于:Joomla 1.0.x
二 Remository 组件的首页标题问题
Remository下载组件的首页title是固定的 为“sitename - Remository”,无法在后台控制面板里修改,我们只得编辑组件的php文件了。
找到 com_remository/remository.php 大约190行
$admin =& new remositoryUserAdmin('remository', 'func', $alternatives, 'select', 'Remository');
把最后的 Remository 修改为你自己想要的title就可以了。
三 ReMOSitory 默认的CSS在IE6下显示错位
ReMOSitory 默认的CSS在IE6下显示错位,而Firefox和Opera就没有问题。
可以在ReMOSitory.CSS文件里除去以下代码:
/* IE hack to get round ignoring right margin */
* html .remositoryfilesummary
{
width: 100%;
}
.remositorypagenav {
clear: both;
width: 100%;
text-align: right;
padding-top: 10px;
}
和
/* IE hack to control icons */
* html #remositoryiconlist div
{
width: 70%;
}
#remositoryeditor {
clear: left;
margin-left: 10px;
}
我试了下,修改之后在IE7下显示效果比原来有所改观,但中文仍呈现竖排,在添加文件时。
四 Remository 自定义文件信息显示
下载组件的文件列表显示信息如下: Published / Submitted By / Submitted On/ File Size / Downloads,如何自定义显示哪些信息?方法如下:
文件 remository.html.php 删除或者注释以下代码
1. if ($remUser->isAdmin()) $this->fileOutputBox(_DOWN_PUB, ($file->published == 1 ? _YES : _NO), false);
2. if ($file->submittedby) {
$submitter =& new remositoryUser($file->submittedby);
$this->fileOutputBox(_DOWN_SUB_BY, $submitter->name);
}
3. if ($file->submitdate<>'') $this->fileOutputBox(_DOWN_SUB_DATE, date ($this->repository->Date_Format, $this->controller->revertFullTimeStamp($file->submitdate)));
4. if ($file->filesize<>'') $this->fileOutputBox(_DOWN_FILE_SIZE, $file->filesize);
5. $this->fileOutputBox(_DOWN_DOWNLOADS, $file->downloads);
文件 /v-classes/remositoryFileInfoHTML.php 删除或者注释以下代码
1. if ($this->remUser->isAdmin()) $this->fileOutputBox(_DOWN_PUB, ($file->published ? _YES : _NO));
2. if ($file->submittedby<>'') $this->fileOutputBox (_DOWN_SUB_BY, $submitter->fullname().' ('.$submitter->name.')');
3. if ($file->submitdate<>'') $this->fileOutputBox (_DOWN_SUB_DATE, date ($this->repository->Date_Format, $this->controller->revertFullTimeStamp($file->submitdate)));
4. if ($file->filesize<>'') $this->fileOutputBox (_DOWN_FILE_SIZE, $file->filesize);
5. $this->fileOutputBox (_DOWN_DOWNLOADS, $file->downloads);
五 Remository 3.42 无法删除 Orphans 文件 (孤儿文件)
用FTP client上传文件到指定目录下,可以在 ReMOSitory Orphans中看到上传的文件,但是却无法删除,解决办法如下:
修改 ../components/com_remository/c-admin-classes/remositoryAdminUnlinked.php
找到代码
foreach ($cfid as $file) {
if (isset($OrphanDownloads[$file]) OR isset($OrphanUploads[$file])) @unlink($file);
}
改为
foreach ($cfid as $file) {
if (in_array($file, $OrphanDownloads) OR in_array($file,$OrphanUploads)) @unlink($file);
}
六 Remository 3.42 会 Adding file ID to filename 添加文件ID到文件名
先ftp上传文件,然后通过控制面板处理孤儿文件,添加文件后发现上传的文件名后面加上了ID号,但是在发布页面上正常,点击下载后提示保存的文件名也正常,这是作者特意添加的功能,但是使用非常不便。 解决办法如下:
CHANGE_01
../com_remository/p-classes/remositoryFile.php
lines 342-351
change:
function nameWithID () {
if ($this->realwithid) {
$elements = explode ('.', $this->realname);
if (1 < count($elements)) $extension = array_pop($elements);
else $extension = '';
array_push ($elements, (string) $this->id);
if ($extension) array_push ($elements, $extension);
return implode('.', $elements);
}
else return $this->realname;
}
to:
function nameWithID () {
return $this->realname;
}
CHANGE_02
../com_remository/p-classes/remositoryPhysicalFile.php
lines 145-153
change:
function basicNameWithID ($id, $name) {
$elements = explode ('.', $name);
if (1 < count($elements)) $extension = array_pop($elements);
else $extension = '';
array_push ($elements, (string) $id);
if ($extension) array_push ($elements, $extension);
return implode('.', $elements);
}
to:
function basicNameWithID ($id, $name) {
return $name;
}
七 Joomla 1.5上如何安装 Remository 3.42
将 Remository 3.42 安装在 Joomla 1.5 上会出现错误"Fatal error: Cannot redeclare class JConfig in C:localhostxampphtdocsxamppjaconfiguration.php on line 2" 解决方法如下:
1) 解压缩 Remository到临时目录.
2) 编辑 remository.interface.php ,大约 48-50 行
if (is_a($this->mainframe,'mosMainFrame')) return $this->mainframe->getCfg($string);
更改为
if (is_a($this->mainframe,'mosMainFrame') OR is_a($this->mainframe, 'JAdministrator') OR is_a($this->mainframe, 'JSite')) return $this->mainframe->getCfg($string);
3) 重新打包文件
4) 安装组件
八 Remository 3.4.x 与 Joomla 1.0.13 的兼容问题
使用 Remository 组件的用户请主意,Joomla 1.0.13与 Remository 有兼容性问题,国外有用户遇到此类问题。
The error occurs when :
After I have pressed the validate button, the page is reloaded and at the bottom of the page I get 2 or 3 php warning messages like "'Warning: Cannot send session cookie - headers already sent.."
在添加 file 后,页面底部出现上述警告,并且反复要求重新登录。我也亲自测试了下,我把Joomla 从1.0.12升级到1.0.13 之后,也出现了这个问题,不得已重新恢复数据库。
http://forum.joomla.org/index.php/topic,200725.0.html 1.0.13. Admin session problem and FIX 发布了
http://forum.joomla.org/index.php/topic,193707.msg943504.html#msg943504 这是详细的帖子
web article Joomla相关 Remository常见问题解决方法 Related Articles 网摘:
|