示例#1
0
文件: rss.php 项目: 4otaku/4otaku
	function convert_post($item) {
		$worker = new Read_Post();
		$worker->get_item($item['id']);
		$post = $worker->get_data('items');
		$item = current($post);
		$item['type'] = 'post';

		$item['rss_link'] = 'http://'.$_SERVER['HTTP_HOST'].'/post/'.$item['id'].'/';
		$item['text'] = str_replace('href="/go?','href="',$item['text']);
		$item['text'] = $this->replace_spoilers($item['text'],$item['rss_link']);
		$item['comments_link'] = $item['rss_link'].'comments/all/';
		return $item;
	}
示例#2
0
文件: search.php 项目: 4otaku/4otaku
	function fetch_post($id) {
		$worker = new Read_Post();
		$worker->get_item($id);
		$post = $worker->get_data('items');
		$post = current($post);

		$post['template'] = 'post';
		$post['navi'] = '/post/';
		return $post;
	}