$firstpostlist = "pid IN(".$db->escape_string(implode(',', $firstposts)).")"; $query = $db->simple_select("posts", "message, edittime, tid, fid", $firstpostlist, array('order_by' => 'dateline', 'order_dir' => 'desc')); while($post = $db->fetch_array($query)) {
| $firstpostlist = "pid IN(".$db->escape_string(implode(',', $firstposts)).")"; $query = $db->simple_select("posts", "message, edittime, tid, fid, pid", $firstpostlist, array('order_by' => 'dateline', 'order_dir' => 'desc')); while($post = $db->fetch_array($query)) {
|
$parser_options = array( "allow_html" => $forumcache[$post['fid']]['allowhtml'], "allow_mycode" => $forumcache[$post['fid']]['allowmycode'],
| $parser_options = array( "allow_html" => $forumcache[$post['fid']]['allowhtml'], "allow_mycode" => $forumcache[$post['fid']]['allowmycode'],
|
$items[$post['tid']]['description'] = $parser->parse_message($post['message'], $parser_options); $items[$post['tid']]['updated'] = $post['edittime']; $feedgenerator->add_item($items[$post['tid']]); }
| $parsed_message = $parser->parse_message($post['message'], $parser_options);
$query2 = $db->simple_select("attachments", "*", "pid=".$post['pid']); while($attachment = $db->fetch_array($query2)) { $ext = get_extension($attachment['filename']); $attachment['icon'] = get_attachment_icon($ext); if($ext == "jpeg" || $ext == "gif" || $ext == "bmp" || $ext == "png" || $ext == "jpg") { if(stripos($parsed_message, "[attachment=".$attachment['aid']."]") !== false) { eval("\$attbit = \"".$templates->get("postbit_attachments_thumbnails_thumbnail")."\";"); $parsed_message = preg_replace("#\[attachment=".$attachment['aid']."]#si", $attbit, $parsed_message); } } else { if(stripos($parsed_message, "[attachment=".$attachment['aid']."]") !== false) { eval("\$attbit = \"".$templates->get("postbit_attachments_attachment")."\";"); $parsed_message = preg_replace("#\[attachment=".$attachment['aid']."]#si", $attbit, $parsed_message); } } } $items[$post['tid']]['description'] = $parsed_message; $items[$post['tid']]['updated'] = $post['edittime']; $feedgenerator->add_item($items[$post['tid']]); }
|