来源:http://trac.seagullproject.org/wiki/Integration/Gallery

Gallery2 Image Gallery

by Matti Tahvonen and revised on 24 Aug 06 by Karl Tiedt.

介绍

按照下列步骤你可以无缝集成著名的Gallery2应用程序到Seagull中。

安装

 1. 解压缩gallery-2<version>-typical.tar.gz到seagull/www/
 2. Follow detailed installer instructions 按照安装程序的指示一步下安装
 3. 在gallery2文件夹中或在(最好是在webroot目录上)webroot以上创建g2data目录,如seagull/g2data
 4. 在'Admin User Setup'界面,将你的管理员命名为'g2_admin'以避免名称冲突(不过要注意名称的最大长度)
 5. 像平常那样完成安装
 6. 设置一个测试相册(gallery)
 7. 以管理员登陆seagull
 8. 注册gallery2模块
 9. 修改seagull/modules/gallery2/conf.ini配置文件以和你的设置相对应 (下面是一个例子.)
10. 请求gallery页面,URL类似于 [[http://localhost/seagull/www/index.php//gallery2/]] 

下面的例子是我测试安装时的配置文件,例子中seagull的webroot可以通过http://localhost/sgl/www/访问。目前的格式,Gallery模块的mgr选项命名不太好。

[Gallery2Mgr]
requiresAuth=false
g2Dir=/var/www/seagull/www/gallery2
embedUri=/seagull/www/index.php/gallery2/action/list/
g2Uri=/seagull/www/gallery2/
loginRedirect=/seagull/www/index.php/user/login/

g2Dir是你的相册解压文件的物理目录。

embedUri是在seagull内显示图像的地址。

g2Uri我认为这个是查看相册的路径。

loginRedirect 就很清楚了。

Extra - clean URLs

  • 最难的部分;可能会破坏链接
  • 启用干净的url。
  • 将.htaccess替换成
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php/gallery2em/action/list/v/(.+)$  index.php/gallery2em/action/list/?g2_view=core.ShowItem&g2_path=$1   [QSA,L]
</IfModule>

下载

Todo

  • make custom header files (css, javascript) 0.5.x alike

Links / Resources

 
integration/gallery.txt · 最后更改: 2010/05/30 00:21 (外部编辑)
 
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2