[ Midtown Madness 2 Central ] [ Midtown Madness 2 Central ]

Midtown Madness 2 Central > News & Announcements > RDF Syndication
Goto page Previous  1, 2
View previous topic | View next topic
Author
Message Post new topicReply to topic
Vchat20
I Love Chickens Eddie!!

Joined: 30 Sep 2002
Posts: 1071
Location: Somewhere between reality and fantasy

Status: Offline


Post subject: Reply with quote

also. i forgot to mention this. if you have a phpnuke site, you can also utilize this on your site. not exactly sure how to add this myself as I have not touched it. but if you have an mm2 related phpnuke site, this is a plus for you.
_________________
Post 05 Jun 2003 04:42 pm
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Chadwick
Not An Administrator

Joined: 21 Jul 2002
Posts: 834


Status: Offline


Post subject: Reply with quote

hey rippance can you make something similar that will generate it in standard html for mobile devices. right now the xml isn't interpretated and nothing works when viewing this offline on a palm. code should be similar but just html.
_________________
[dA][Chadwick]
Post 13 Jun 2003 01:49 pm
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Legoguy
Lego Maniac
Administrator

Joined: 21 Jul 2002
Posts: 1081
Location: Computer Chair (Spruce Grove, Alberta, Canada)

Status: Offline


Post subject: Reply with quote

I'll see if I can mod my forums rdf.php to generate html.
_________________
"There is no loneliness on this planet. All the dark things are in your mind. This place is colorful and neutral; brutal, nice, caring and destructive -- all at the same time. Start to think a little." -- Pete Namlook; The Dark Side of the Moog X: Astro Know Me Domina, Part I
Post 14 Jun 2003 04:27 pm
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chadwick
Not An Administrator

Joined: 21 Jul 2002
Posts: 834


Status: Offline


Post subject: Reply with quote

rippance is doing it already anyway Wink

i wrote a php script that will grab hte last 10 topics and all their replys, but its for invisionboard forums Sad

i can probably easily modify it for phpbb though.
_________________
[dA][Chadwick]
Post 15 Jun 2003 10:54 pm
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Legoguy
Lego Maniac
Administrator

Joined: 21 Jul 2002
Posts: 1081
Location: Computer Chair (Spruce Grove, Alberta, Canada)

Status: Offline


Post subject: Reply with quote

Rippance: all you need to do is copy rdf.php to *.php (maybe html.php?) and modify the internals of the copied file to have the template point to html_body.tpl in the templates folder, which is a copy of rdf_body.tpl, but modified to output html.

[edit]
Also in the modified html.php, make sure to change the bottom where it outputs the header "text/xml" to "text/html."


[edit 2]

I did it for my forum: http://legographics.idwt.net/discussion/html.php

html_body.tpl looks like this:

Code:
<html>
<head>
<title>{FORUM_TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<b><a href="{U_FORUM}">{FORUM_TITLE}</a></b><br>{FORUM_DESCRIPTION}<br><br>

<b>Latest Posts:</b>
<br>
<!-- BEGIN topic_item -->
{topic_item.TOPIC_TITLE}
<blockquote><a href="{topic_item.U_TOPIC}">{topic_item.U_TOPIC}</a></blockquote>
<!-- END topic_item -->
</body>
</html>

_________________
"There is no loneliness on this planet. All the dark things are in your mind. This place is colorful and neutral; brutal, nice, caring and destructive -- all at the same time. Start to think a little." -- Pete Namlook; The Dark Side of the Moog X: Astro Know Me Domina, Part I
Post 15 Jun 2003 11:20 pm
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chadwick
Not An Administrator

Joined: 21 Jul 2002
Posts: 834


Status: Offline


Post subject: Reply with quote

can u post ur html.php file, i just wanna see how u use the forums objects like u did, i never bothered to look into it but i find it interesting.
_________________
[dA][Chadwick]
Post 16 Jun 2003 03:07 pm
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Legoguy
Lego Maniac
Administrator

Joined: 21 Jul 2002
Posts: 1081
Location: Computer Chair (Spruce Grove, Alberta, Canada)

Status: Offline


Post subject: Reply with quote

uh ok...

NOTICE: the majority of the code is not mine, just modified one line, the last header output, to text/html. I am not taking credit for the code and I left the original coder's name in the header to show that.

The only thing majorly modified was the tpl file adapted from the original code's, which I already posted.
[php]
<?php
/***************************************************************************
* rdf.php
* -------------------
* begin : Saturday, Mar 2, 2002
* copyright : (C) 2002 Matthijs van de Water
* Sascha Carlin
* email : phpbb@matthijs.net
* sc@itst.org
*
* $Id: html.php,v 1.3.1 2003/02/16 14:43:11 mvdwater Exp $
*
*
***************************************************************************/

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

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

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

// If not set, set the output count to 15
$count = ( isset($HTTP_GET_VARS['c']) ) ? intval($HTTP_GET_VARS['c']) : 15;
$count = ( $count == 0 ) ? 15 : $count;

// Check for forum_id in query
$forum_id = ( isset($HTTP_GET_VARS['f']) ) ? intval($HTTP_GET_VARS['f']) : '';
$sql_where = ( !empty($forum_id) ) ? ' AND f.forum_id = ' . $forum_id : ' ';

// Create main board url (some code borrowed from functions_post.php)
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
$viewtopic = ( $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']) . '/' : '/';

$site_name = strip_tags($board_config['sitename']);
$site_description = strip_tags($board_config['site_desc']);

$index_url = $server_protocol . $server_name . $server_port . $index;
$viewtopic_url = $server_protocol . $server_name . $server_port . $viewtopic;

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

$template->assign_vars(array(
'S_CONTENT_ENCODING' => $lang['ENCODING'],
'U_FORUM' => $index_url,
'FORUM_TITLE' => $site_name,
'FORUM_DESCRIPTION' => $site_description)
);

// SQL statement to fetch active topics of public forums
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f
WHERE
t.forum_id = f.forum_id
AND f.auth_view = " . AUTH_ALL . "
AND p.topic_id = t.topic_id
AND p.post_id = t.topic_last_post_id
$sql_where
ORDER BY p.post_time DESC LIMIT $count";
$topics_query = $db->sql_query($sql);

if ( !$topics_query )
{
message_die(GENERAL_ERROR, "Could not query list of active topics", "", __LINE__, __FILE__, $sql);
}
else if ( !$db->sql_numrows($topics_query) )
{
message_die(GENERAL_MESSAGE, $lang['No_match']);
}
else
{
while ($topic = $db->sql_fetchrow($topics_query))
{
$template->assign_block_vars('topic_item', array(
'U_TOPIC' => $viewtopic_url . '?' . POST_POST_URL . '=' . $topic['topic_last_post_id'] . '#' . $topic['topic_last_post_id'],
'TOPIC_TITLE' => $topic['topic_title'])
);
}
}

// 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/html');

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

?>[/php]
_________________
"There is no loneliness on this planet. All the dark things are in your mind. This place is colorful and neutral; brutal, nice, caring and destructive -- all at the same time. Start to think a little." -- Pete Namlook; The Dark Side of the Moog X: Astro Know Me Domina, Part I


Last edited by Legoguy on 24 Feb 2005 03:28 am; edited 3 times in total
Post 17 Jun 2003 12:49 am
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chadwick
Not An Administrator

Joined: 21 Jul 2002
Posts: 834


Status: Offline


Post subject: Reply with quote

so basically u just use a previously made php file that wiill generate a page based upon your .tpl file, not bad Smile
_________________
[dA][Chadwick]
Post 17 Jun 2003 02:24 am
View user's profile Send private message Send e-mail AIM Address MSN Messenger
mm1guy
­

Joined: 04 Aug 2003
Posts: 1558


Status: Offline


Xbox Live Gamertag:
mm2guy
Post subject: Reply with quote

any other oftware I can use as a rdf news ticker?
Post 11 Sep 2003 10:02 pm
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Bladerunner
‍ ‍ ‍ ‍ spice of life

Joined: 15 Jul 2002
Posts: 808


Status: Offline


Xbox Live Gamertag:
CunningAbyss482
Post subject: Reply with quote

No, as far as I know only Trillian.
_________________
Bladerunner
Remember, bubble gum may double as an adhesive but adhesives do not double as bubble gum.

Post 11 Sep 2003 10:34 pm
View user's profile Send private message Send e-mail
mm1guy
­

Joined: 04 Aug 2003
Posts: 1558


Status: Offline


Xbox Live Gamertag:
mm2guy
Post subject: Reply with quote

ok Crying or Very sad
Post 11 Sep 2003 10:39 pm
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous: Post new topicReply to topic

Page 2 of 2 All times are GMT
Goto page Previous  1, 2


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Home - MM2C.com - Contact - Staff & Seniors - FAQ - Community Rules - Syndication


Powered by phpBB © 2001, 2005 phpBB Group