That looks tasty lolAn invalid character was found in text content.
Line: 102 Character: 4710
<description><![CDATA[<span style="text-decoration: underline"><span style="font-family:Arial Black;"><span style="color: #ff0000"><span style="font-size: 120%; line-height: 116%;">I AM LEGEND</span></span></span></span> <br /><br /><img src="http://i185.photobucket.com/albums/x19/ ... d_ver4.jpg" alt="Image" /> <br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;"><blockquote class="uncited"><div> </span></span></span><br /><span style="font-family:Arial Black;"></span><br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">Robert Neville is a brilliant scientist, but even he could not contain the terrible virus that was unstoppable, incurable, and man-made. Somehow immune, Neville is now the last human survivor in what is left of New York City and maybe the world. For three years, Neville has faithfully sent out daily radio messages, desperate to find any other survivors who might be out there. But he is not alone. Mutant victims of the plague -- The Infected -- lurk in the shadows... watching Neville's every move... waiting for him to make a fatal mistake. Perhaps mankind's last, best hope, Neville is driven by only one remaining mission: to find a way to reverse the effects of the virus using his own immune blood. But he knows he is outnumbered... and quickly running out of time. </span></span></span><br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;"></div></blockquote></span></span></span> <br /><span style="font-family:Arial Black;"></span><br /><span style="font-family:Arial Black;"></span><br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">IMDb Info >>> </span></span></span><a href="http://www.imdb.com/title/tt0480249/plotsummary" class="postlink"><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">http://www.imdb.com/title/tt0480249/plo ... </span></a> <br /><span style="font-family:Arial Black;"></span><br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">Movie Links >>></span></span></span> <br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">Part 1 </span></span></span><a href="http://www.veoh.com/videos/v16476728PXzbZy6" class="postlink"><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">http://www.veoh.com/videos/v16476728PXz ... </span></a> <br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">Part 2 </span></span></span><a href="http://www.veoh.com/videos/v1647676fnk8trbJ" class="postlink"><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">http://www.veoh.com/videos/v1647676fnk8 ... </span></a> <br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">Part 3 </span></span></span><a href="http://www.veoh.com/videos/v1647696EMq3knzW" class="postlink"><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">http://www.veoh.com/videos/v1647696EMq3 ... </span></a> <br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">Part 4 </span></span></span><a href="http://www.veoh.com/videos/v1647681et6mwTSP" class="postlink"><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">http://www.veoh.com/videos/v1647681et6m ... </span></a> <br /><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">Part 5 </span></span></span><a href="http://www.veoh.com/videos/v16477007zQqKQNX" class="postlink"><span style="font-family:Arial Black;"><span style="color: #00b050"><span style="font-size: 100%; line-height: 116%;">http://www.veoh.com/videos/v16477007zQq ... </span></a> <br /><br /><br /><img src="http://i185.photobucket.com/albums/x19/ ... d_ver6.jpg" alt="Image" /> <br /><br /><br /><span style="font-family:Arial Black;"><span style="color: #ff0000"><span style="font-size: 100%; line-height: 116%;">Enjoy! </span></span></span>
also in the demo board, if no fid the page is blank:angelside wrote:MOD Title: simple syndication
MOD Description: phpBB 3.0 rss/atom content syndicator
MOD Version: 1.1.1b
MOD Download: http://downloads.sourceforge.net/canver ... .1b.tar.gz
Demo Board: http://www.phpbbturkiye.net/syndication.php?fid=20&t=1
changelog from 1.0.0b
* fix minor error
* add new parameter for show topic only first post
Updated on: 2007-06-20 - Version 1.1.1b
Code: Select all
$sql = 'SELECT p.poster_id, p.post_subject,
Code: Select all
p.poster_id
Code: Select all
t.topic_last_post_id, p.post_id,
Code: Select all
'LINK' => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
'IDENTIFIER' => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
Code: Select all
'LINK' => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']. '&p=' . $row['post_id'] .'#p' . $row['topic_last_post_id']),
'IDENTIFIER' => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']. '&p=' . $row['post_id'] .'#p' . $row['topic_last_post_id']),
General Error
SQL ERROR [ mysqli ]
Unknown column 't.topic_last_post_id' in 'field list' [1054]
SQL
SELECT t.topic_last_post_id, p.post_id, p.poster_id, p.post_subject, p.post_text, p.bbcode_uid, p.bbcode_bitfield, p.topic_id, p.forum_id, p.post_time, f.forum_name, f.forum_desc_options, u.username FROM phpbb3_posts as p, phpbb3_forums as f, phpbb3_users as u WHERE (u.user_id = p.poster_id) AND p.post_approved = 1 AND (f.forum_id = p.forum_id) ORDER BY post_time DESC LIMIT 30
BACKTRACE
FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()
FILE: includes/db/mysqli.php
LINE: 185
CALL: dbal_mysqli->sql_query()
FILE: includes/db/dbal.php
LINE: 157
CALL: dbal_mysqli->_sql_query_limit()
FILE: syndication2.php
LINE: 134
CALL: dbal->sql_query_limit()
Code: Select all
$topics_only = '1';
Code: Select all
$CFG['max_topics'] = '30';
Code: Select all
#'LINK' => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
#'IDENTIFIER' => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
Code: Select all
'LINK' => "$board_url/viewtopic.$phpEx" ."?". 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']."&p=".$row['post_id']."#p".$row['post_id'],
'IDENTIFIER' => "$board_url/viewtopic.$phpEx" ."?". 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']."&p=".$row['post_id']."#p".$row['post_id'],
seite7 wrote:The coding for the Atom feed is a little bit strange. Because it uses sessions, every time you reload the feed in the feed reader all post will be marked new.
You should change:To:Code: Select all
#'LINK' => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']), #'IDENTIFIER' => append_sid("$board_url/viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
This will remove the session_ids and create a link that not only links to the topic but also to the right post. Make sure to also include p.post_id in the sql query.Code: Select all
'LINK' => "$board_url/viewtopic.$phpEx" ."?". 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']."&p=".$row['post_id']."#p".$row['post_id'], 'IDENTIFIER' => "$board_url/viewtopic.$phpEx" ."?". 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']."&p=".$row['post_id']."#p".$row['post_id'],
Ralf
Code: Select all
<?php
/*
*
* @package phpBB3
* @version $Id: syndication.php,v 1.0 2006/11/27 22:29:16 angelside Exp $
* Modified by CK for holographyforum.org
* @copyright (c) Canver Software
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
*/
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// Begin configuration
$CFG['exclude_forums'] = '';
$CFG['max_topics'] = '20';
// End configuration
// requests
$fid = request_var('fid', '');
$count = request_var('count', 0);
$chars = request_var('chars', 200);
$type = request_var('type', '');
$topics_only = request_var('t', '');
// If not set, set the output count to max_topics
$count = ( $count == 0 ) ? $CFG['max_topics'] : $count;
// maximum text char limit
if($chars<0 || $chars>500) $chars=500; //Maximum
// generate url
$board_url = generate_board_url();
$index_url = $board_url . '/index.' . $phpEx;
$viewtopic_url = $board_url . '/viewtopic.' . $phpEx;
// below three function barroved on "Full Syndication Suite 0.9.4a"
/**
* parse a message
*/
function parse_message($row, $bbcode_options, $bbcode_uid, $bbcode_bitfield)
{
global $board_url;
$row = html_entity_decode(generate_text_for_display($row, $bbcode_uid, $bbcode_bitfield, $bbcode_options));
// smilies contain relative URL, we need it to be absolute
return str_replace('<img src="./', '<img src="' . $board_url . '/', $row);
}
/**
* encode message for usage with RSS
*/
function rss_prepare_message(&$message)
{
// embed message into CDATA tags in case it contains HTML tags or entities
if (preg_match('/<[^>]+>|&#?[\w]+;/', $message))
{
// replace any ]]>
$message = str_replace(']]>', ']]>', $message);
$message = '<![CDATA[' . $message . ']]>';
}
}
/**
* create a date according to RFC 3339 or 822
*/
function format_date($timestamp)
{
global $type;
if ($type == 'atom')
{
// RFC 3339 for ATOM
return date('Y-m-d\TH:i:s\Z', $timestamp);
}
else
{
// RFC 822 for RSS2
return date('D, d M Y H:i:s O', $timestamp);
}
}
$sql_where = '';
// only topic first post
if ($topics_only == 1)
{
$sql_where = 'AND p.post_id = t.topic_first_post_id';
$sql_from = 'FROM ' . POSTS_TABLE . ' as p, ' . FORUMS_TABLE . ' as f, ' . USERS_TABLE . ' as u, ' . TOPICS_TABLE . ' as t';
}
else
{
$sql_from = 'FROM ' . POSTS_TABLE . ' as p, ' . FORUMS_TABLE . ' as f, ' . USERS_TABLE . ' as u';
}
// Exclude forums
if ($CFG['exclude_forums'])
{
$exclude_forums = explode(',', $CFG['exclude_forums']);
foreach ($exclude_forums as $i => $id)
{
if ($id > 0)
{
$sql_where .= ' AND p.forum_id != ' . trim($id);
}
}
}
if ($fid != '')
{
$select_forums = explode(',', $fid);
$sql_where .= ( sizeof($select_forums)>0 ) ? ' AND f.forum_id IN (' . $fid . ')' : '';
}
// SQL posts table
$sql = 'SELECT p.post_id, p.poster_id, p.post_subject, p.post_text, p.bbcode_uid, p.bbcode_bitfield, p.topic_id, p.forum_id, p.post_time, f.forum_name, f.forum_desc_options, u.username
' . $sql_from . '
WHERE (u.user_id = p.poster_id)
AND p.post_approved = 1
AND (f.forum_id = p.forum_id)
' . $sql_where . '
ORDER BY post_time DESC';
$result = $db->sql_query_limit($sql, $count);
while( ($row = $db->sql_fetchrow($result)) )
{
if (!$auth->acl_get('f_list', $row['forum_id']))
{
// if the user does not have permissions to list this forum, skip everything until next branch
continue;
}
($type != 'atom') ? rss_prepare_message($row['post_text']) : '';
$template->assign_block_vars('item', array(
'AUTHOR' => $row['username'],
'TIME' => format_date($row['post_time']),
'LINK' => "$board_url/viewtopic.$phpEx" ."?". 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']."&p=".$row['post_id']."#p".$row['post_id'],
'IDENTIFIER' => "$board_url/viewtopic.$phpEx" ."?". 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']."&p=".$row['post_id']."#p".$row['post_id'],
'TITLE' => $row['post_subject'],
'TEXT' => parse_message($row['post_text'], $row['forum_desc_options'], $row['bbcode_uid'], $row['bbcode_bitfield']),
)
);
}
if ($type == 'atom')
{
$template->assign_var('FEED_LINK', $board_url);
$content_type = 'application/atom+xml';
$tpl = 'atom';
}
else
{
$content_type = 'application/rss+xml';
$tpl = 'rss2';
}
$template->set_filenames(array(
'body' => 'syndication_' . $tpl . '.xml')
);
// get time, use current time
$last_build_date = mktime();
$template->assign_vars(array(
'HEADER' => '<?xml version="1.0" encoding="UTF-8"?>' . "\n", // workaround for remove_php_tags() removing this line from the template
'TITLE' => strip_tags($config['sitename']),
'DESCRIPTION' => strip_tags($config['site_desc']),
'LINK' => $board_url,
'LAST_BUILD' => format_date($last_build_date)
)
);
// gzip compression
if ($config['gzip_compress'])
{
if (@extension_loaded('zlib') && !headers_sent())
{
ob_start('ob_gzhandler');
}
}
// start output
header ('Content-Type: ' . $content_type . '; charset=UTF-8');
$template->display('body');
exit;
?>