Пример #1
0
	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
	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;
	}