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

集成Serendipity博客

Serendipity被广泛认为是PHP中的最好BLOG之一,它有可能已经被移植到所有的语言平台。现在你可以将它集成到你的seagull项目中:

安装

  • 在seagull/www/serendipity安装s9y
  • 像平常一样安装配置应用程序,除了下列的步骤有点变化:
        o 在 Appearance and Options -> Is serendipity embedded? 选择 'yes'
        o 设置Paths -> Index file 为 '../index.php/blog/' 
  • 以管理员登陆s9y 并选择 'Configure Plugins'
  • 将所有的'Sidebar Plugins'设置成'hidden' (记住admin连接是 serendipity/serendipity_admin.php)
  • 添加一些测试文章
  • 在seagull中注册'blog'模块(在写本文的时候,这注册相应于手工添加一条记录到module表,这都是自动完成的)
  • 修改seagull/www/serendipity/templates/default/index.tpl注释掉<div id=“serendipity_banner”>, 你博客的顶部可以通过seagull/modules/blog/conf.ini 设置

修改

用标准的seagull flexy模板来封装s9y的输出,所以你可以修改外观。

集成s9y插件到Seagull Blocks

在使用'embed'选项时一个比较明显的动作是插件面板没有生成。而且s9y也没有提供HTML的顶部和底部部分。

你必须在BlogMgr.php包含这些文件,这样它们在你的安装中才是可见的。

包含serendipity_config.inc.php使用下列代码片断:

<?php
serendipity_plugin_api::generate_plugins('left','div');
serendipity_plugin_api::generate_plugins('right','div');
?>

改进

这个集成方法需要改进,看 Garvin's 说明:

http://www.seagullproject.org/forum/index.php?t=msg&th=154

–Demian

 
integration/serendipity.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