Rss mod

Hulp nodig bij een modificaties of op zoek naar een MOD? Bekijk ons archief. Support wordt helaas niet meer verleend.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
EviL
Berichten: 8
Lid geworden op: 14 sep 2004, 22:46
Contacteer:

Rss mod

Bericht door EviL » 29 sep 2004, 11:36

ik heb laast hier een rss mod gedownload maar daar zat de datum van de topic niet in dat vind ik jammer wie kan mij helpen om een rss mod te maken met topic datum er in

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 29 sep 2004, 18:30

http://www.phpbb.com/phpBB/viewtopic.php?t=144548

rss.php

Code: Selecteer alles

// BEGIN SQL statement to fetch active posts of public forums
//
$sql = "SELECT f.forum_name, t.topic_title, u.user_id, u.username, u.user_sig, u.user_sig_bbcode_uid, p.post_id, pt.post_text, pt.post_subject, pt.bbcode_uid, p.post_time, t.topic_replies, t.topic_first_post_id
	FROM " . FORUMS_TABLE . " AS f, " . TOPICS_TABLE . " AS t, " . USERS_TABLE . " AS u, " . POSTS_TABLE . " AS p, " . POSTS_TEXT_TABLE . " as pt
	WHERE
		t.forum_id = f.forum_id
			AND f.auth_view = " . AUTH_ALL . "
			AND p.poster_id = u.user_id
			AND pt.post_id = p.post_id
			AND p.topic_id = t.topic_id
			$sql_topics_only_where
			$sql_forum_where
	ORDER BY p.post_time DESC LIMIT $count";
$posts_query = $db->sql_query($sql);
//
// END SQL statement to fetch active posts of public forums

Code: Selecteer alles

// Assign "item" variables to template
		$template->assign_block_vars('post_item', array(
			'POST_URL' => $viewpost_url . '?' . POST_POST_URL . '=' . $post['post_id'] . '#' . $post['post_id'],
			'TOPIC_TITLE' => htmlspecialchars($topic_title),
			'AUTHOR' => htmlspecialchars($author),
			'POST_TIME' => create_date($board_config['default_dateformat'], $post['post_time'], $board_config['board_timezone']).' (GMT ' . $board_config['board_timezone'] . ')',
			'POST_SUBJECT' => htmlspecialchars($post_subject),
			'FORUM_NAME' => htmlspecialchars($post['forum_name']),
			'POST_TEXT' => htmlspecialchars($post_text),
			'USER_SIG' => htmlspecialchars($user_sig),
			'TOPIC_REPLIES' => $post['topic_replies']
)
		);
rss_body.tpl

Code: Selecteer alles

<!-- BEGIN post_item -->
<item>
	<title>{post_item.FORUM_NAME} :: {post_item.TOPIC_TITLE}</title>
	<link>{post_item.POST_URL}</link>
	<description>{L_AUTHOR}: {post_item.AUTHOR}<br />
{post_item.POST_SUBJECT}
{L_POSTED}: {post_item.POST_TIME}<br />
{L_TOPIC_REPLIES}: {post_item.TOPIC_REPLIES}<br /><br />
<span class="postbody">{post_item.POST_TEXT}
{post_item.USER_SIG}</span><br />
</description>
</item>
<!-- END post_item -->
Hierboven vind je de secties waar de RSS gegevens per item worden klaargezet, hier kan je zelf gemakkelijk de topic datum aan toevoegen. Gebruik wat logica, en het gegeven dat het veld dat je moet hebben "t.topic_time" heet.

MarlyNL
Berichten: 454
Lid geworden op: 06 feb 2004, 22:14
Locatie: Achterhoek
Contacteer:

Bericht door MarlyNL » 29 sep 2004, 19:43

Hallo,
Is dat RSS van dat nieuws van ander sites?
Die je dan op je site kunt plaatsen?

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 29 sep 2004, 19:45

Als je dat installeert op je forum kunnen je bezoekers met behulp van een RSS-reader de actieve topics op je forum bijhouden.

EviL
Berichten: 8
Lid geworden op: 14 sep 2004, 22:46
Contacteer:

Bericht door EviL » 29 sep 2004, 19:58

Dit heb ik gedaan maar werkt dus niet

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 29 sep 2004, 20:00

Ik ga je het niet voorzeggen, dit is iets wat je goed zelf moet kunnen.

Wat heb je nu geprobeerd? Gaf het errors? Zo nee, wat werkte er dan niet?

EviL
Berichten: 8
Lid geworden op: 14 sep 2004, 22:46
Contacteer:

Bericht door EviL » 29 sep 2004, 20:08

mosymuis schreef:Ik ga je het niet voorzeggen, dit is iets wat je goed zelf moet kunnen.

Wat heb je nu geprobeerd? Gaf het errors? Zo nee, wat werkte er dan niet?
Hij gaf aan dat der in regel 1 item 35 een fout zat die ik niet heb kunnen vinden. ik ben nog maar een newby in dit soort dingen ik hoop het in de tijd te leren vadaar dat ik hulp vraag ik heb al wel het beetje zitten vernieuwen naar nieuwe php versie

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 29 sep 2004, 20:13

EviL schreef:Hij gaf aan dat der in regel 1 item 35 een fout zat die ik niet heb kunnen vinden.
Kijk, hier kunnen we wat mee. Wat was je aangepaste script?

EviL
Berichten: 8
Lid geworden op: 14 sep 2004, 22:46
Contacteer:

Bericht door EviL » 29 sep 2004, 20:21

ik heb dit nu het weer terug gezet hoe ik het had de tijd snap ik nog niet helemaal hoe die der in moet

Code: Selecteer alles

<?php
//
// BEGIN Configuration
//
// Set the relative path from this file to your phpBB root folder
$phpbb_root_path = './';
// How many posts do you want to returnd (count)?  Specified in the URL with "c=".  Defaults to 15, upper limit of 50.
$count = ( isset($_GET['c']) ) ? intval($_GET['c']) : 15;
$count = ( $count == 0 ) ? 15 : $count;
$count = ( $count > 50 ) ? 50 : $count;
// Which forum do you want posts from (forum_id)?  specified in the url with "f=".  Defaults to all (public) forums.
$forum_id = ( isset($_GET['f']) ) ? intval($_GET['f']) : '';
$sql_forum_where = ( !empty($forum_id) ) ? ' AND f.forum_id = ' . $forum_id : ' ';
// Return topics only, or all posts?  Specified in the URL with "t=".  Defaults to all posts (0).
$topics_only = (isset($_GET['t']) ) ? intval($_GET['t']) : 0;
$sql_topics_only_where = '';
if ( $topics_only == 1 )
{
	$sql_topics_only_where = 'AND p.post_id = t.topic_first_post_id';
}
//
// END Configuration
//

//
// BEGIN Includes of phpBB scripts
//
define ('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
//
// END Includes of phpBB scripts
//

//
// BEGIN Session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
// BEGIN Create main board information (some code borrowed from functions_post.php)
//
// Build URL components
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$viewpost = ( $script_name != '' ) ? $script_name . '/viewtopic.' . $phpEx : 'viewtopic.'. $phpEx;
$index = ( $script_name != '' ) ? $script_name . '/index.' . $phpEx : 'index.'. $phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
// Assemble URL components
$index_url = $server_protocol . $server_name . $server_port . $script_name . '/';
$viewpost_url = $server_protocol . $server_name . $server_port . $viewpost;
// Reformat site name and description
$site_name = strip_tags($board_config['sitename']);
$site_description = strip_tags($board_config['site_desc']);
// Set the fully qualified url to your smilies folder
$smilies_path = $board_config['smilies_path'];
$smilies_url = $index_url . $smilies_path;
$smilies_path = preg_replace("/\//", "\/", $smilies_path);
//
// END Create main board information
//

//
// BEGIN Initialise template
//
$template->set_filenames(array(
	"body" => "rss_body.tpl")
);
//
// END Initialise template
//

//
// BEGIN Assign static variables to template
//
// Variable reassignment for Topic Replies
$l_topic_replies = $lang['Topic'] . ' ' . $lang['Replies'];
$template->assign_vars(array(
	'S_CONTENT_ENCODING' => $lang['ENCODING'],
	'BOARD_URL' => $index_url,
	'BOARD_TITLE' => $site_name,
	'BOARD_DESCRIPTION' => $site_description,
	'BOARD_MANAGING_EDITOR' => $board_config['board_email'],
	'BOARD_WEBMASTER' => $board_config['board_email'],
	'BUILD_DATE' => gmdate('D, d M Y H:i:s', time()) . ' GMT', 
	'L_AUTHOR' => $lang['Author'],
	'L_POSTED' => $lang['Posted'],
	'L_TOPIC_REPLIES' => $l_topic_replies,
	'L_POST' => $lang['Post'])
);
//
// END Assign static variabless to template
//

//
// BEGIN SQL statement to fetch active posts of public forums
//
$sql = "SELECT f.forum_name, t.topic_title, u.user_id, u.username, u.user_sig, u.user_sig_bbcode_uid, p.post_id, pt.post_text, pt.post_subject, pt.bbcode_uid, p.post_time, t.topic_replies, t.topic_first_post_id
	FROM " . FORUMS_TABLE . " AS f, " . TOPICS_TABLE . " AS t, " . USERS_TABLE . " AS u, " . POSTS_TABLE . " AS p, " . POSTS_TEXT_TABLE . " as pt
	WHERE
		t.forum_id = f.forum_id
			AND f.auth_view = " . AUTH_ALL . "
			AND p.poster_id = u.user_id
			AND pt.post_id = p.post_id
			AND p.topic_id = t.topic_id
			$sql_topics_only_where
			$sql_forum_where
	ORDER BY p.post_time DESC LIMIT $count";
$posts_query = $db->sql_query($sql);
//
// END SQL statement to fetch active posts of public forums
//

//
// BEGIN Query failure check
//
if ( !$posts_query )
{
	message_die(GENERAL_ERROR, "Could not query list of active posts", "", __LINE__, __FILE__, $sql);
}
else if ( !$db->sql_numrows($posts_query) )
{
	message_die(GENERAL_MESSAGE, $lang['No_match']);
}
else
{
//
// END Query failure check
//

//
// BEGIN "item" loop
//
	while ($post = $db->sql_fetchrow($posts_query))
	{

// Variable reassignment and reformatting for post text
$post_text = $post['post_text'];
$post_text = str_replace("\n", "\n<br />\n", $post_text);
$post_text = bbencode_second_pass($post_text, $post['bbcode_uid']);
$post_text = smilies_pass($post_text);
$post_text = preg_replace("/$smilies_path/", $smilies_url, $post_text);
$post_text = make_clickable($post_text);
// Variable reassignment and reformatting for user sig
$user_sig = $post['user_sig'];
$user_sig = bbencode_second_pass($user_sig, $post['user_sig_bbcode_uid']);
$user_sig = smilies_pass($user_sig);
$user_sig = preg_replace("/$smilies_path/", $smilies_url, $user_sig);
$user_sig = make_clickable($user_sig);
	if ( $user_sig != '' )
{
		$user_sig = '<br />_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig);
}
// Variable reassignment and reformatting for post subject
$post_subject = $post['post_subject'];
	if ( $post_subject != '' )
{
		$post_subject = $lang['Subject'] . ': ' . htmlspecialchars($post_subject) . '<br />';
}
// Variable reassignment for topic title, and show whether it is the start of topic, or a reply
$topic_title = $post['topic_title'];
if ( $post['post_id'] != $post['topic_first_post_id'] )
{
	$topic_title = 'RE: ' . $topic_title;
}
// Variable reassignment and reformatting for author
$author = $post['username'];
if ( $post['user_id'] != -1 )
{
        $author = '<a href="' . $index_url . 'profile.' . $phpEx . '?mode=viewprofile&u=' . $post['user_id'] . '" target="_blank">'
 . $author . '</a>';
}
$author = make_clickable($author);
// Assign "item" variables to template
		$template->assign_block_vars('post_item', array(
			'POST_URL' => $viewpost_url . '?' . POST_POST_URL . '=' . $post['post_id'] . '#' . $post['post_id'],
			'TOPIC_TITLE' => htmlspecialchars($topic_title),
			'AUTHOR' => htmlspecialchars($author),
			'POST_TIME' => create_date($board_config['default_dateformat'], $post['post_time'], $board_config['board_timezone']).' (GMT ' . $board_config['board_timezone'] . ')',
			'POST_SUBJECT' => htmlspecialchars($post_subject),
			'FORUM_NAME' => htmlspecialchars($post['forum_name']),
			'POST_TEXT' => htmlspecialchars($post_text),
			'USER_SIG' => htmlspecialchars($user_sig),
			'TOPIC_REPLIES' => $post['topic_replies']
)
		);
	}
}
//
// END "item" loop
//

//
// BEGIN XML and nocaching headers (copied from page_header.php)
//
if (!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2'))
{
	header ('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0');
}
else
{
	header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header ('Content-Type: text/xml');
//
// End XML and nocaching headers
//

//
// BEGIN Output XML page
//
$template->pparse('body');
//
// END Output XML page
//

?>
ik krijg nu een vaag vermoede hoe die tijd der bij moet door dit aan te passen:

Code: Selecteer alles

<!-- BEGIN post_item -->
<item>
	<title>{post_item.FORUM_NAME} :: {post_item.TOPIC_TITLE}</title>
	<link>{post_item.POST_URL}</link>
	<description>{L_AUTHOR}: {post_item.AUTHOR}<br />
{post_item.POST_SUBJECT}
{L_POSTED}: {post_item.POST_TIME}<br />
{L_TOPIC_REPLIES}: {post_item.TOPIC_REPLIES}<br /><br />
<span class="postbody">{post_item.POST_TEXT}
{post_item.USER_SIG}</span><br />
</description>
en dit toe te voegen ?

Code: Selecteer alles

<time>(POST_TIME)</time>

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 29 sep 2004, 20:28

Bestanden en code graag binnen

Code: Selecteer alles

-tags plaatsen, aub. :)

[quote="EviL"]ik heb dit nu het weer terug gezet hoe ik het had de tijd snap ik nog niet helemaal hoe die der in moet[/quote]
Wat heb je erin aangepast?


[quote="EviL"]en dit toe te voegen ?

[code]<time>(POST_TIME)</time>
[/quote]
Bijna; POST_TIME wordt al gebruikt en verwijst naar een andere timestamp en er moet nog iets bij binnen de {} brackets. Kijk nog eens goed.

EviL
Berichten: 8
Lid geworden op: 14 sep 2004, 22:46
Contacteer:

Bericht door EviL » 29 sep 2004, 20:28

ik heb nu dit

rss.php

Code: Selecteer alles

<?php
//
// BEGIN Configuration
//
// Set the relative path from this file to your phpBB root folder
$phpbb_root_path = './';
// How many posts do you want to returnd (count)?  Specified in the URL with "c=".  Defaults to 15, upper limit of 50.
$count = ( isset($_GET['c']) ) ? intval($_GET['c']) : 15;
$count = ( $count == 0 ) ? 15 : $count;
$count = ( $count > 50 ) ? 50 : $count;
// Which forum do you want posts from (forum_id)?  specified in the url with "f=".  Defaults to all (public) forums.
$forum_id = ( isset($_GET['f']) ) ? intval($_GET['f']) : '';
$sql_forum_where = ( !empty($forum_id) ) ? ' AND f.forum_id = ' . $forum_id : ' ';
// Return topics only, or all posts?  Specified in the URL with "t=".  Defaults to all posts (0).
$topics_only = (isset($_GET['t']) ) ? intval($_GET['t']) : 0;
$sql_topics_only_where = '';
if ( $topics_only == 1 )
{
	$sql_topics_only_where = 'AND p.post_id = t.topic_first_post_id';
}
//
// END Configuration
//

//
// BEGIN Includes of phpBB scripts
//
define ('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
//
// END Includes of phpBB scripts
//

//
// BEGIN Session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
// BEGIN Create main board information (some code borrowed from functions_post.php)
//
// Build URL components
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$viewpost = ( $script_name != '' ) ? $script_name . '/viewtopic.' . $phpEx : 'viewtopic.'. $phpEx;
$index = ( $script_name != '' ) ? $script_name . '/index.' . $phpEx : 'index.'. $phpEx;
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
// Assemble URL components
$index_url = $server_protocol . $server_name . $server_port . $script_name . '/';
$viewpost_url = $server_protocol . $server_name . $server_port . $viewpost;
// Reformat site name and description
$site_name = strip_tags($board_config['sitename']);
$site_description = strip_tags($board_config['site_desc']);
// Set the fully qualified url to your smilies folder
$smilies_path = $board_config['smilies_path'];
$smilies_url = $index_url . $smilies_path;
$smilies_path = preg_replace("/\//", "\/", $smilies_path);
//
// END Create main board information
//

//
// BEGIN Initialise template
//
$template->set_filenames(array(
	"body" => "rss_body.tpl")
);
//
// END Initialise template
//

//
// BEGIN Assign static variables to template
//
// Variable reassignment for Topic Replies
$l_topic_replies = $lang['Topic'] . ' ' . $lang['Replies'];
$template->assign_vars(array(
	'S_CONTENT_ENCODING' => $lang['ENCODING'],
	'BOARD_URL' => $index_url,
	'BOARD_TITLE' => $site_name,
	'BOARD_DESCRIPTION' => $site_description,
	'BOARD_MANAGING_EDITOR' => $board_config['board_email'],
	'BOARD_WEBMASTER' => $board_config['board_email'],
	'BUILD_DATE' => gmdate('D, d M Y H:i:s', time()) . ' GMT', 
	'L_AUTHOR' => $lang['Author'],
	'L_POSTED' => $lang['Posted'],
	'L_TOPIC_REPLIES' => $l_topic_replies,
	'L_POST' => $lang['Post'])
);
//
// END Assign static variabless to template
//

//
// BEGIN SQL statement to fetch active posts of public forums
//
$sql = "SELECT f.forum_name, t.topic_title, u.user_id, u.username, u.user_sig, u.user_sig_bbcode_uid, p.post_id, pt.post_text, pt.post_subject, pt.bbcode_uid, p.post_time, t.topic_replies, t.topic_first_post_id
	FROM " . FORUMS_TABLE . " AS f, " . TOPICS_TABLE . " AS t, " . USERS_TABLE . " AS u, " . POSTS_TABLE . " AS p, " . POSTS_TEXT_TABLE . " as pt
	WHERE
		t.forum_id = f.forum_id
			AND f.auth_view = " . AUTH_ALL . "
			AND p.poster_id = u.user_id
			AND pt.post_id = p.post_id
			AND p.topic_id = t.topic_id
			$sql_topics_only_where
			$sql_forum_where
	ORDER BY p.post_time DESC LIMIT $count";
$posts_query = $db->sql_query($sql);
//
// END SQL statement to fetch active posts of public forums
//

//
// BEGIN Query failure check
//
if ( !$posts_query )
{
	message_die(GENERAL_ERROR, "Could not query list of active posts", "", __LINE__, __FILE__, $sql);
}
else if ( !$db->sql_numrows($posts_query) )
{
	message_die(GENERAL_MESSAGE, $lang['No_match']);
}
else
{
//
// END Query failure check
//

//
// BEGIN "item" loop
//
	while ($post = $db->sql_fetchrow($posts_query))
	{

// Variable reassignment and reformatting for post text
$post_text = $post['post_text'];
$post_text = str_replace("\n", "\n<br />\n", $post_text);
$post_text = bbencode_second_pass($post_text, $post['bbcode_uid']);
$post_text = smilies_pass($post_text);
$post_text = preg_replace("/$smilies_path/", $smilies_url, $post_text);
$post_text = make_clickable($post_text);
// Variable reassignment and reformatting for user sig
$user_sig = $post['user_sig'];
$user_sig = bbencode_second_pass($user_sig, $post['user_sig_bbcode_uid']);
$user_sig = smilies_pass($user_sig);
$user_sig = preg_replace("/$smilies_path/", $smilies_url, $user_sig);
$user_sig = make_clickable($user_sig);
	if ( $user_sig != '' )
{
		$user_sig = '<br />_________________<br />' . str_replace("\n", "\n<br />\n", $user_sig);
}
// Variable reassignment and reformatting for post subject
$post_subject = $post['post_subject'];
	if ( $post_subject != '' )
{
		$post_subject = $lang['Subject'] . ': ' . htmlspecialchars($post_subject) . '<br />';
}
// Variable reassignment for topic title, and show whether it is the start of topic, or a reply
$topic_title = $post['topic_title'];
if ( $post['post_id'] != $post['topic_first_post_id'] )
{
	$topic_title = 'RE: ' . $topic_title;
}
// Variable reassignment and reformatting for author
$author = $post['username'];
if ( $post['user_id'] != -1 )
{
        $author = '<a href="' . $index_url . 'profile.' . $phpEx . '?mode=viewprofile&u=' . $post['user_id'] . '" target="_blank">'
 . $author . '</a>';
}
$author = make_clickable($author);
// Assign "item" variables to template
		$template->assign_block_vars('post_item', array(
			'POST_URL' => $viewpost_url . '?' . POST_POST_URL . '=' . $post['post_id'] . '#' . $post['post_id'],
			'TOPIC_TITLE' => htmlspecialchars($topic_title),
			'AUTHOR' => htmlspecialchars($author),
			'POST_TIME' => create_date($board_config['default_dateformat'], $post['post_time'], $board_config['board_timezone']).' (GMT ' . $board_config['board_timezone'] . ')',
			'POST_SUBJECT' => htmlspecialchars($post_subject),
			'FORUM_NAME' => htmlspecialchars($post['forum_name']),
			'POST_TEXT' => htmlspecialchars($post_text),
			'USER_SIG' => htmlspecialchars($user_sig),
			'TOPIC_REPLIES' => $post['topic_replies']
)
		);
	}
}
//
// END "item" loop
//

//
// BEGIN XML and nocaching headers (copied from page_header.php)
//
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
{
	header ('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0');
}
else
{
	header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header ('Content-Type: text/xml');
//
// End XML and nocaching headers
//

//
// BEGIN Output XML page
//
$template->pparse('body');
//
// END Output XML page
//

?>
rss_body

Code: Selecteer alles

<?xml version="1.0" encoding="{S_CONTENT_ENCODING}" ?>
<rss version="0.92">
<channel>
	<title>{BOARD_TITLE}</title>
	<link>{BOARD_URL}</link>
	<description>{BOARD_DESCRIPTION}</description>
	<managingEditor>{BOARD_MANAGING_EDITOR}</managingEditor>
	<webMaster>{BOARD_WEBMASTER}</webMaster>
	<lastBuildDate>{BUILD_DATE}</lastBuildDate>
<!-- BEGIN post_item -->
<item>
	<title>{post_item.FORUM_NAME} :: {post_item.TOPIC_TITLE}</title>
	<link>{post_item.POST_URL}</link>
	<description>{L_AUTHOR}: {post_item.AUTHOR}<br />
{post_item.POST_SUBJECT}
{L_POSTED}: {post_item.POST_TIME}<br />
{L_TOPIC_REPLIES}: {post_item.TOPIC_REPLIES}<br /><br />
<span class="postbody">{post_item.POST_TEXT}
{post_item.USER_SIG}</span><br />
</description>
<time>{post_item.POST_TIME}</time>
</item>
<!-- END post_item -->
</channel>
</rss>
Alleen de tijd word niet goed aan gegeven <time>Wo Sep 22 19:44:59 GMT 2004 (GMT 6)</time>

Gebruikersavatar
Inky
Berichten: 45
Lid geworden op: 07 aug 2004, 14:17
Locatie: Delft
Contacteer:

rss.mod installatie

Bericht door Inky » 19 nov 2004, 15:01

Ik heb de rss.mod gedownload en ik wil voor alle zekerheid nog wat dingen weten voordat ik het op mijn forum plaats.
  • - werkt de mod met PHPBB 2.0.10 ?
    - de rss_body.tpl zet ik in de map templates, moet ik diegene die het in een RSS reader willen hebben deze link doorgeven die naar deze template leiden?
    - het is mij nog onduidelijk in welk directory rss.php komt te staan?
    - moet ik aanpassingen doen in de files of kan ik ze gelijk in de desbetreffende directory's zetten?
Ik hoop dat iemand mij hierbij wil helpen en antwoord weet op deze vragen.
Forum voor de Grafimedia
http://www.grafischforum.nl

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Re: rss.mod installatie

Bericht door mosymuis » 19 nov 2004, 16:02

Inky schreef:- werkt de mod met PHPBB 2.0.10 ?
Jep
Inky schreef:- de rss_body.tpl zet ik in de map templates, moet ik diegene die het in een RSS reader willen hebben deze link doorgeven die naar deze template leiden?
Nee, naar http://www.jeforum.nl/rss.php
Inky schreef:- het is mij nog onduidelijk in welk directory rss.php komt te staan?
In je root, naast viewtopic.php en config.php
Inky schreef:- moet ik aanpassingen doen in de files of kan ik ze gelijk in de desbetreffende directory's zetten?
Geen aanpassingen nodig, anders zouden ze wel in de mod install staan.

Gebruikersavatar
Inky
Berichten: 45
Lid geworden op: 07 aug 2004, 14:17
Locatie: Delft
Contacteer:

Bericht door Inky » 20 nov 2004, 14:14

Mosymuis,

Alweer bedankt voor je hulp, het is gelukt en ik ben er erg blij mee.
Ik ga nog proberen om mijn forumlogo in de RSSreader te krijgen en dan is het helemaal af.

Nogmaals dank :thumb:
Forum voor de Grafimedia
http://www.grafischforum.nl

Gebruikersavatar
Inky
Berichten: 45
Lid geworden op: 07 aug 2004, 14:17
Locatie: Delft
Contacteer:

Bericht door Inky » 20 nov 2004, 21:51

Uhmm, ik dacht dat een logo in de de kop van mijn RSS leed wel makkelijk te doen was maar helaas is dit niet gelukt.

Weet iemand hoe ik dit kan doen?

Het gaat er dus om dat in de RSSreader het logo van mijn forum komt te staan.

Alvast bedankt voor jullie hulp.
Forum voor de Grafimedia
http://www.grafischforum.nl


Gebruikersavatar
Inky
Berichten: 45
Lid geworden op: 07 aug 2004, 14:17
Locatie: Delft
Contacteer:

Bericht door Inky » 22 nov 2004, 20:56

Beste Mosymuis,

De code had ik ondertussen via internet gevonden. Alleen krijg ik dan een foutmelding. Ik heb het volgende in mijn rss_body.tpl.

Code: Selecteer alles

<?xml version="1.0" encoding="{S_CONTENT_ENCODING}" ?>
<rss version="0.92">
<channel>
	<docs>http://backend.userland.com/rss092</docs>
	<title>{BOARD_TITLE}</title>
	<link>{BOARD_URL}
	<description>{BOARD_DESCRIPTION}</description>
	<managingEditor>{BOARD_MANAGING_EDITOR}</managingEditor>
	<webMaster>{BOARD_WEBMASTER}</webMaster>
	<lastBuildDate>{BUILD_DATE}</lastBuildDate>
<image>
	<title>Grafisch forum</title>
	<url>http://www.grafischforum.nl/imagesRSS/button_link_rss.gif</url>
 	<link>http://www.grafischforum.nl</link>
 	<width>126</width>
 	<height>31</height>
</image>	
<!-- BEGIN post_item -->
<item>
	<title>{post_item.FORUM_NAME} :: {post_item.TOPIC_TITLE}</title>
	<link>{post_item.POST_URL}
	<description>{L_AUTHOR}: {post_item.AUTHOR}<br />
{post_item.POST_SUBJECT}
{L_POSTED}: {post_item.POST_TIME}<br />
{L_TOPIC_REPLIES}: {post_item.TOPIC_REPLIES}<br /><br />
<span class="postbody">{post_item.POST_TEXT}
{post_item.USER_SIG}</span><br />
</description>
</item>
<!-- END post_item -->
</channel>
</rss>
Als ik dit doe dan krijg ik de volgende foutmelding in mijn feed:
http://www.grafischforum.nl/rss.php

Code: Selecteer alles

XML Parsing Error: mismatched tag. Expected: </link>.
Location: http://www.grafischforum.nl/rss.php
Line Number 29, Column 3:</item>
--^
Weet jij hoe dit verholpen kan worden.

Alvast bedankt.
Forum voor de Grafimedia
http://www.grafischforum.nl

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 22 nov 2004, 20:59

Waarschijnlijk heb je dat te danken aan een error in de topics die op dat moment opgehaald worden; nu is de error nergens te zien. Copiëer de browser source van je rss.php, zodra de error weer voorkomt.

Gebruikersavatar
Inky
Berichten: 45
Lid geworden op: 07 aug 2004, 14:17
Locatie: Delft
Contacteer:

Bericht door Inky » 22 nov 2004, 21:04

Ik had het weer even de oude rss_body.tpl teruggezet. Als je nu kijkt zie je de foutmelding.

Maar is de rss_body.tpl wel goed zo?
Forum voor de Grafimedia
http://www.grafischforum.nl

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 22 nov 2004, 21:19

<?xml version="1.0" encoding="{S_CONTENT_ENCODING}" ?>
<rss version="0.92">
<channel>
<docs>http://backend.userland.com/rss092</docs>
<title>{BOARD_TITLE}</title>
<link>{BOARD_URL}</link>
<description>{BOARD_DESCRIPTION}</description>
<managingEditor>{BOARD_MANAGING_EDITOR}</managingEditor>
<webMaster>{BOARD_WEBMASTER}</webMaster>
<lastBuildDate>{BUILD_DATE}</lastBuildDate>
<image>
<title>Grafisch forum</title>
<url>http://www.grafischforum.nl/imagesRSS/b ... s.gif</url>
<link>http://www.grafischforum.nl</link>
<width>126</width>
<height>31</height>
</image>
<!-- BEGIN post_item -->
<item>
<title>{post_item.FORUM_NAME} :: {post_item.TOPIC_TITLE}</title>
<link>{post_item.POST_URL}</link>
<description>{L_AUTHOR}: {post_item.AUTHOR}<br />
{post_item.POST_SUBJECT}
{L_POSTED}: {post_item.POST_TIME}<br />
{L_TOPIC_REPLIES}: {post_item.TOPIC_REPLIES}<br /><br />
<span class="postbody">{post_item.POST_TEXT}
{post_item.USER_SIG}</span><br />
</description>
</item>
<!-- END post_item -->
</channel>
</rss>

Gesloten