文章关键字 ‘ez publish’

Website Toolbar not showing up

2009年07月31日,星期五

In our 4.1 installation, the toolbar was not available due to the following fetch:

$website_toolbar_access = fetch( 'user', 'has_access_to', hash( 'module', 'websitetoolbar', 'function', 'use' ) )

Module "websitetoolbar" was not registered, to solve this, just set the
following lines in your settings/override/module.ini.append.php:
[ModuleSettings]
ModuleList[]=websitetoolbar

More information at: http://issues.ez.no/IssueView.php?Id=14705

Automatic object relation

2009年07月30日,星期四

Version 3.1 of eZ publish introduced a powerful datatype: keyword. This datatype can be used as an additional attribute in content classes to assign one or more keywords to an object.

Individual keywords need to be separated with a comma. Extra whitespace at the beginning or end of a keyword is stripped automatically when they are stored.

Objects which have one or more common keyword to the current node can be related in the templates as follows:

{let related=$node.object.data_map.keywords.content.related_objects}

{section show=$related}

<h2>Related documents</h2>

<ol>

{section name=Related loop=$related}

<li><a href={$:item.url_alias|ezurl}>{$:item.name}</a></li>

{/section}

</ol>

{/section}

{/let}

The first part is used to set an array of related objects. If there are no related objects through common keywords, the section is not producing any output (equivalent to php evaluation: empty arrays are considered “false”):

{let related=$node.object.data_map.keywords.content.related_objects}

{section show=$related}

The rest of the template code loops around any related objects and displays a link and their name.

安装EZ时站点选择

2009年06月29日,星期一

站点选择的列表从哪儿来的呢?

在package.ini中RemotePackagesIndexURL做了设置,试一下可不可以设定自己的(不从ez.no下载,太慢了)

默认的是RemotePackagesIndexURL=http://packages.ez.no/ezpublish/4.0/4.0.4(不同的版本号)

在该目录下有个index.xml的文件

内容如下:


<?xml version="1.0"?>
<packages vendor="eZ systems">
<package name="ezwebin_banners"
version="1.3-3"
type="contentobject"
summary="Demo content (banners) for the ezwebin extension"
description="This package contains the following nodes :
Banners - subtree"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_banners.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezwebin_banners.png" />
<package name="ezwebin_classes"
version="1.3-3"
type="contentclass"
summary="ezwebin content classes"
description="This package contains definitions of content classes used by the ezwebin extension"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_classes.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezwebin_classes.png" />
<package name="ezwebin_democontent"
version="1.3-3"
type="contentobject"
summary="Home, News and Events, Products, Partner, Community, Knowledge Base, Company"
description="This package contains the following nodes :
Home - subtree
News and Events - subtree
Products - subtree
Partner - subtree
Community - subtree
Knowledge Base - subtree
Company - subtree"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_democontent.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezwebin_democontent.png" />
<package name="ezwebin_design_blue"
version="1.3-3"
type="sitestyle"
summary="eZ Publish Website Interface design (blue)"
description="This site style package contains the design for the Website Interface"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_design_blue.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezwebin_design.png" />
<package name="ezwebin_design_gray"
version="1.3-3"
type="sitestyle"
summary="eZ Publish Website Interface design (gray)"
description="This site style package contains the design for the Website Interface"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_design_gray.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezwebin_design.png" />
<package name="ezwebin_extension"
version="1.3-3"
type="extension"
summary="ezwebin extension"
description="ezwebin extension"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_extension.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezwebin_extension.png" />
<package name="ezwebin_site"
version="1.3-3"
type="site"
summary="Website Interface"
description="Website Interface is a web based CMS solution based on eZ Publish. It contains templates and settings that meets the most common requirements for content management systems."
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_site.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezwebin_site.png">
<requires>
<require name="ezwebin_classes"
min-version="1.3"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_classes.ezpkg" />
<require name="ezwebin_extension"
min-version="1.3"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_extension.ezpkg" />
<require name="ezwebin_banners"
min-version="1.3"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_banners.ezpkg" />
<require name="ezwebin_democontent"
min-version="1.3"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_democontent.ezpkg" />
<require name="ezwebin_design_blue"
min-version="1.3"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_design_blue.ezpkg" />
<require name="ezwebin_design_gray"
min-version="1.3"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_design_gray.ezpkg" />
</requires>
</package>
<package name="ezflow_classes"
version="1.0-4"
type="contentclass"
summary="ezflow content classes"
description="This package contains definitions of content classes used by the ezflow extension"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezflow_classes.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezflow_classes.png" />
<package name="ezflow_democontent"
version="1.0-4"
type="contentobject"
summary="Home, Conference, Discussion Forum, Conference Blog, Live Video"
description="This package contains the following nodes:
Home - node
Conference - subtree
Discussion Forum - subtree
Conference Blog - subtree
Live Video - subtree"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezflow_democontent.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezflow_democontent.png" />
<package name="ezflow_design"
version="1.0-4"
type="sitestyle"
summary="eZ Flow design"
description="This site style package contains the design for the eZ Flow"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezflow_design.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezflow_design.png" />
<package name="ezflow_extension"
version="1.0-4"
type="extension"
summary="ezflow extension"
description="ezflow extension"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezflow_extension.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezflow_extension.png" />
<package name="ezflow_site"
version="1.0-4"
type="site"
summary="eZ Flow"
description="The eZ Flow extension to eZ Publish enables editors to build complex page layouts and pre-plan the publication schedule to ensure a constant flow of rich content."
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezflow_site.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/4.0/4.0.4/thumbnails/ezflow_site.png">
<requires>
<require name="ezflow_extension"
min-version="1.0"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezflow_extension.ezpkg" />
<require name="ezwebin_extension"
min-version="1.3"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezwebin_extension.ezpkg" />
<require name="ezflow_classes"
min-version="1.0"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezflow_classes.ezpkg" />
<require name="ezflow_democontent"
min-version="1.0"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezflow_democontent.ezpkg" />
<require name="ezflow_design"
min-version="1.0"
url="http://packages.ez.no/ezpublish/4.0/4.0.4/ezflow_design.ezpkg" />
</requires>
</package>
<package name="plain_site"
version="1.1-2"
type="site"
summary="Plain site"
description="Stripped install. Contains no special toolbar or menu choices"
url="http://packages.ez.no/ezpublish/3.8/plain_site.ezpkg"
thumbnail_url="http://packages.ez.no/ezpublish/3.8/thumbnails/plain_site.png" />
</packages>

template不被cache

2009年04月30日,星期四

{set-block scope=global variable=cache_ttl}0{/set-block}

RemoveSiteAccessIfDefaultAccess

2009年04月28日,星期二

site.ini中,[SiteAccessSettings]设置

# Wheter to add siteaccess to the url if current siteaccess
# is the same as default siteaccess. Changing this setting will
# require clearing the cache.
#
# For instance if the default siteaccess is ‘en’ and you enable
# this you can access the siteacccess with ‘index.php’ instead of
# ‘index.php/en/’.
RemoveSiteAccessIfDefaultAccess=disabled

change_mysql_character.php

2008年09月12日,星期五

安装ez publish的时候,有时候需要修改mysql数据库的character,留个纪念:

<?php

// This program will alter the default character set to UTF8, which is required for the
// default settings of eZ Publish

$link = mysql_connect(”localhost”, “uername”, “password”)
or die(”Could not connect: ” . mysql_error());
$result = mysql_query(”ALTER DATABASE `database` DEFAULT CHARACTER SET utf8″, $link);
if($result) {
echo “Success :-) ”;
} else
echo “Failure :-( ”;
mysql_close($link);

?>

玩了下FluxBB,一个字——快

2008年09月9日,星期二

从ez上面看到一个fluxbb的extension,通过ez的template operator把论坛的东东与ez关联起来。就这样,偶遇fluxbb,顺便找到了FluxBB 中文下载了个测试了把,速度真不错。关于FluxBB的介绍如下:

PHP论坛,我想接触过的人大多不会陌生。国外,PHPBB, IPB, vBulletin 等杰出论坛程序群雄逐鹿,国内则是Discuz! 的一统天下。然而听说过 FluxBB 的人则比较少。

那么就先让我们来了解一下历史,FluxBB 原名为 PunBB,由于之前 PunBB 被一家俄国公司(informer)收购后,几位主要的开发人员对现状产生了不满的情绪(开发的过程不想让他人干扰),因此分道扬镳,成立了 FluxBB。 PunBB 的产生也纯属偶然,当时其创始人 Rickard Andersson 正在为一个项目寻找一套论坛程序,然而在现有论坛程序中,他并没有找到合适的 (有效的 XHTML 输出,快速,简洁)论坛程序。因此他决定自己开发一套轻量级的论坛程序,PunBB 于2003年8月诞生了。

根据 PunBB 的简洁理念,其论坛程序只包含最最基本的功能,就连论坛短信,附件,投票这些功能都不存在。当然,因为遵循 GPL 开源协议,任何人都可以对程序经行修改,再发布,因而很多第三方的MOD孕育而生。这些MOD的出现,解决了 PunBB 功能上的缺陷,不过由于添加 MOD 需要修改大量的核心代码,因此每次程序上的升级都让人苦不堪言。因而就出现了随后的 1.3 版本,以及随后的 FluxBB

1.3版本的出现,对于 PunBB 或者 FluxBB 来说无疑是一个质的飞跃,最值得一提的便是其强大的插件扩展系统,和FireFox 一 样,几乎所有的功能都可以以扩展(Extension)的形式来开发,并且论坛管理员可以轻松地通过一键式的扩展安装系统来无限制地扩充论坛的功能。并且 论坛内核程序的更新并不会影响到扩展的使用。用户可以根据自己的需要来下载所需的插件,或者通过插件开发,来扩展论坛的功能。和其他论坛程序相比,从扩展 性,执行效率,以及易用性来看,FluxBB 有着明显的优势。

几大论坛的成功我们有目共睹,然而 FluxBB 所带来的体验,是前所未有的。其他论坛在实际运用中,半数甚至多的数功能并不被经常使用,可是为了满足所有用户的需求,这些功能则必须强制性地被安装在论 坛程序中,而管理员所能做的,只是选择关闭或开启部分功能。对于初级用户来说,设置一个论坛程序无疑是一次挑战,面对数目繁多的设置选项,往往会无从下 手。而对于高级用户来说,扩展论坛也不是一件轻松的事情。更重要的是,这些让人无从下手的设置往往是不必要的,比如,在一个非娱乐性论坛上计算用户在线时 长或等级是一件很难理解的事情,而且这些多余的功能应用在专业性比较强论坛上,不免有些滑稽。而 FluxBB 则有效地避免了这些尴尬。

http://www.fluxbb.cn/blog/2008/06/03/%E6%AC%A2%E8%BF%8E%E6%9D%A5%E5%88%B0-fluxbb-%E4%B8%AD%E5%9B%BD/

eab的eZ publish站点地图(sitemap)

2008年09月8日,星期一

1、修改title,默认的是home

编辑page_head.tpl,改为

<title>{if eq($module_result.uri, ‘/content/view/sitemap’)}Sitemap / Home{else}{$site_title}{/if}</title>

2、修改breadcrumb trail,默认的是home

编辑path/path.tpl

<!– Path content: START –>
<p>
{if eq($module_result.uri, ‘/content/view/sitemap’)}
<a href={”/”|ezurl}>Home</a> / Sitemap

{else}
{foreach $module_result.path as $path}
{if $path.url}
<a href={cond( is_set( $path.url_alias ), $path.url_alias,
$path.url )|ezurl}>{$path.text|wash}</a>
{else}
{$path.text|wash}
{/if}
{delimiter}&gt;{/delimiter}
{/foreach}
{/if}
</p>
<!– Path content: END –>

3、(可选)显示3层,默认是2层

编辑node/view/sitemap.tpl

sitemap

eZ Publish在FF3下顶部链接错位的解决办法

2008年09月8日,星期一

修改ezwebin中的pagelayout.css为

div#languages
{
background-image: url(../images/header_bg_left.png);
background-position: bottom left;
background-repeat: no-repeat;
float: left;
clear: left;
width: 24%;
height: 25px;
font-size: 0.85em;
}

div#languages ul li
{
margin-left: 8px;
}

div#languages a
{
padding-right: 2px;
}

div#links
{
background-image: url(../images/header_bg_right.png);
background-position: right bottom;
background-repeat: no-repeat;
float: right;
clear: right;
text-align: right;
padding-right: 0;
font-size: 0.9em;
font-weight: bold;
height: 25px;
width: 75%;
}

div#links a
{
color: #515346;
border-left: 1px solid #CECEC2;
padding-left: 8px;
padding-right: 8px;
height: 18px;
}

div#links ul li
{
float: right;
}