Tag Archives: moonmoon

js调用moonmoon

在前面的基础上进行的修改,这样就可以跨域进行调用。 title.tpl.php <?php $all_items = &$Planet->getItems(); $current_date = date(‘d/m/Y’, time()); ?> var title=’<div id=”content”><h2>Today</h2><ul class=”cheese”>’; <?php foreach ($all_items as $item): ?> <?php if (($item_date = date(‘d/m/Y’,$item->getDate())) != $current_date){ $current_date = $item_date; $t=’</ul>’; $t.=’<h2>’.$item_date.’</h2>’; $t.=’<ul>’; echo ‘title+=”‘.$t.’”;’; } ?> <?php $owner … Continue reading

Posted in Linux | Tagged , , | Leave a comment

moonmoon的修改

为了可以更好的给其他网站调用,对现在的moonmoon进行了一定的修改,使之可以通过js进行调用,也可以直接通过页面调用。 1. index.php 添加了: elseif (array_key_exists(‘type’, $_GET) && $_GET['type'] == ‘title’){ //Serve full cache content header(‘Content-type: text/html; charset=UTF-8′); if (!OutputCache::Start(‘title’, $first_item_url, $output_cache)) { include_once(dirname(__FILE__).’/custom/tpl/title.tpl.php’); OutputCache::End(); } } elseif (array_key_exists(‘type’, $_GET) && $_GET['type'] == ‘content’){ //Serve full cache content header(‘Content-type: text/html; … Continue reading

Posted in Linux | Tagged , | Leave a comment

RSS聚合程序

数据中心的BLOG系统采用RSS聚合程序,可以使个人还保留自己独立的BLOG系统。 目前最常用的是planetplanet系统,但是其是基于python开发的,而目前团队里还没有人了解python,因此就选择了moonmoon系统,虽然系统简陋一点,版本是0.2beta,但功能还是齐全的,开发语言是php。 tong的blog是msn space,而msn space目前还不支持基于分类的feed,因此只能进行代码端的定制。 修改app/classes/Planet.class.php文件,在286行附近添加一行: if (strpos($person->website,”spaces.live.com”)===false || $item->get_category()==”westdc”) 这样就可以专门针对msn space的blog系统,提取固定分类的日志,如我这里提取的就是westdc分类。 剩下的工作就是对界面的定制,使其和整个系统一致。

Posted in westdc | Tagged , , , , , | 1 Comment