hab ich auch seeeehr lange nach gesucht und dann (glücklicherweise) gefunden
ist seit paar monaten auch erfolgreich bei mir im einsatz (news, termine, spielberichte etc.)

daher nachfolgend das script für alle suchenden

(leider gibts m-i-x.net und das zugehörige support-forum nich mehr)
Code: Alles auswählen
##############################################################
## MOD Title: Topic Extraction (MTE)
## MOD Author: mix1 < liamdawe@gmail.com > (Liam Dawe) http://www.m-i-x.net
## MOD Description: This mod will enable you to grab posts from any forum and display them on your website. Useful for news, articles, shoutbox, latest topic links etc.
## MOD Version: 1.4.2
##
## Installation Level: Easy
## Installation Time: 2-5 Minutes
## Files To Edit: topic.php
## Included Files: topic.php
##
##############################################################
## Before Use
#############
If you use this mod/like this mod please link back to my site at http://www.m-i-x.net
And please do not claim this to be your own work!
###############
## Instructions
###############
This mod will enable you to display topics from a forum on your website. Useful for displaying news, articles, recent topics etc
You will first need to open up topic.php, here is what you can use;
// Things you can change at the top
$forum - whatever forum(s) you want topics from
$date_time - for this use either short or long (names are obvious)
$topic_link - use either topic or phpbb (topic will make the link send you to a page with just the topic and phpbb will send you to the actual phpbb topic on your forum)
$comment - comment link (topic when clicked will send them to the topic and reply will send them to a direct reply box)
$phpbb_root_path - where your phpbb is located
// To edit the look and feel
To edit what it looks like find lines 129, 136 and 151 these are where you can edit the look and feel.
Line 129 is if you are just using it to display a link.
Line 136 is the start of what it looks like when you click a link from line 129.
Line 151 is what it looks like showing all posts e.g. news listing.
// Including the page
The defualt display for including is showing the full topics to change go to line 14 and edit $show
$show = ''; - To display topic links
$show = 'full'; - Display the full topics
#####################
## Things you can use
#####################
These are all things you can use for displaying the posts.
Things that you shouldn't need are not shown here.
You should use them like this (Unless you have your own way) for example - {$echo_topic['topic_title']}.
$echo_topic - Using this can give you;
topic_title (would probably be needed if using for news)
topic_views (added extras?)
topic_replies (can be used for comments)
$echo_post - Using this can give you;
topic_id (articles/news number, also used for comments link)
forum_id (to show what forum its in?)
post_time (could be needed for news)
$echo_text - Using this can give you;
post_subject
post_text (to show the news or article)
$echo_user - Using this can give you;
username (news/articles poster)
user_sig
(these below could be used as general author info for news/articles?)
user_email
user_aim
user_yim
user_msnm
Comments link;
{$comment_link}
Topic link;
{$topic_link}
und hier die vorlage für die php-datei, welche du dann includen musst:
Code: Alles auswählen
<?php
## Mod Title: Topic Extraction (MTE)
## Version: 1.4.2
#############
## Edit Below
#############
// Where to take the topics from
// Always a number
$forum = '4';
// How to show the topics
// full or blank ('')
$show = 'full';
// How to display the date and time if used
// short or long
$date_time = 'short';
// How top display the topic link if usede
// topic or phpbb
$topic_link = 'topic';
// Comments link - how to send them to comments
// topic or reply
$comment = 'topic';
// Path to your forums directory
// Usually ./forum/ or ./phpBB/ or ./forums/
$phpbb_root_path = './forum/';
#############################################
## No Editing unless you know what your doing
#############################################
if ( !defined('IN_PHPBB') )
{
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'config.'.$phpEx);
}
if ($show == '' || $show == 'full')
{
// Select the topic information from the correct forum and set it to $grab_topics
$grab_topics = $db->sql_query("select * from {$table_prefix}topics where forum_id = '{$forum}' order by topic_id desc limit 1");
}
else if ($show == 'topic')
{
$grab_topics = $db->sql_query("select * from {$table_prefix}topics where forum_id = '{$forum}' and topic_id = '{$_GET['t']}' order by topic_id desc limit 1");
}
// Grab the information using an array and set it to $echo_topic
while ($echo_topic = $db->sql_fetchrow($grab_topics))
{
// Select the post information from the correct forum and set it to $grab_posts
$grab_posts = $db->sql_query("select * from {$table_prefix}posts where forum_id = '{$forum}' and topic_id = '{$echo_topic['topic_id']}' limit 1");
// Grab the information using an array and set it to $echo_post
while ($echo_post = $db->sql_fetchrow($grab_posts))
{
// Now get the post_text using the post_id were looking at and sort it info $grab_posts_text
$grab_posts_text = $db->sql_query("select * from {$table_prefix}posts_text where post_id = '{$echo_post['post_id']}'");
// Grab the information using an array and set it to $echo_text
while($echo_text = $db->sql_fetchrow($grab_posts_text))
{
// Find the user the posted
$find_user = $db->sql_query("select * from {$table_prefix}users where user_id = '{$echo_post['poster_id']}'");
// Sort this users info into array for the post
while ($echo_user = $db->sql_fetchrow($find_user))
{
// Get rid of all those annoying characters from bbcode
$echo_text = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $echo_text);
// BBCode
$echo_text = str_replace("[b]","<strong>",$echo_text);
$echo_text = str_replace("[/b]","</strong>",$echo_text);
$echo_text = str_replace("[i]","<em>",$echo_text);
$echo_text = str_replace("[/i]","</em>",$echo_text);
$echo_text = str_replace("[u]","<u>",$echo_text);
$echo_text = str_replace("[/u]","</u>",$echo_text);
$echo_text = preg_replace('/\[quote=(.*)\](.*)\[\/quote\]/Usi','<div style=\"padding: 7px\">$2</div>',$echo_text);
$echo_text = str_replace("[quote]","<strong>Quote</strong><em>",$echo_text);
$echo_text = str_replace("[/quote]","</em>",$echo_text);
$echo_text = str_replace("[code]","<strong>Code</strong><em>",$echo_text);
$echo_text = str_replace("
","</em>",$echo_text);
$echo_text = preg_replace('/\[list\](.*)\[\/list\]/si',"<div style=\"padding: 7px\">$1</div>",$echo_text);
$echo_text = preg_replace('/\
- (.*)\[\/list\]/si',"<div style=\"padding: 7px\">$1</div>",$echo_text);
$echo_text = str_replace("[img]","<img src=\"",$echo_text);
$echo_text = str_replace("[/img]","\" alt=\"image\" />",$echo_text);
$echo_text = preg_replace('/\[url\](.*)\[\/url\]/Usi','<a href="$1">$1</a>',$echo_text);
$echo_text = preg_replace('/\(.*)\[\/url\]/Usi','<a href="$1">$2</a>',$echo_text);
$echo_text = str_replace("\n", "\n<br />\n", $echo_text);
// Way to display date and time
// long
if($date_time == "long")
{
$echo_topic['topic_time'] = strftime("%A %e %B %H:%M",$echo_topic['topic_time']);
}
// short
if ($date_time == "short")
{
$echo_topic['topic_time'] = strftime("%a %e %b %H:%M",$echo_topic['topic_time']);
}
// Way to display comment link
// Go right to the topic
if ($comment == 'topic')
{
$comment_link = "{$phpbb_root_path}viewtopic.php?t={$echo_topic['topic_id']}";
}
// Go right to the reply box
if ($comment == 'reply')
{
$comment_link = "{$phpbb_root_path}posting.php?mode=reply&t={$echo_topic['topic_id']}";
}
// Topic link types
// This link goes to the topic display
if ($topic_link == 'topic')
{
$topic_link = "?show1=topic&t={$echo_post['topic_id']}";
}
// This link goes to the actual phpbb topic
if ($topic_link == 'phpbb')
{
$topic_link = "{$phpbb_root_path}viewtopic.php?t={$echo_topic['topic_id']}";
}
##################################
## Edit for look and feel of topic
##################################
// Display just the title
if ($show != 'full' && !isset($_GET['show1']))
{
echo "<a href=\"{$topic_link}\">{$echo_text['post_subject']}</a><br />";
}
// Display many topics - for news, shoutbox etc
else if ($show == 'full')
{
echo "
<strong>{$echo_text['post_subject']}</strong> by <strong>{$echo_user['username']}</strong> at <strong>{$echo_topic['topic_time']}</strong>
<br />
<br />
{$echo_text['post_text']}
<br />
<br />
<a href=\"{$comment_link}\">Comments {$echo_topic['topic_replies']}</a>
<hr size=\"1\">
";
}
// Display the topic for when used with the one above, click link and go here
if ($_GET['show1'] == 'topic')
{
echo "
<strong>{$echo_text['post_subject']}</strong> by <strong>{$echo_user['username']}</strong> at <strong>{$echo_topic['topic_time']}</strong>
<br />
<br />
{$echo_text['post_text']}
<br />
<br />
<a href=\"{$comment_link}\">Comments {$echo_topic['topic_replies']}</a>
<hr size=\"1\">
";
}
}
}
}
}
?>[/code]
das ganze kannst du auch noch anpassen:
"order by topic_id desc limit 1" = anzahl der beiträge, welche "extrahiert" werden
oder z.b. bb-code um die farbangaben erweitern (css-datei entsprechend erweitern):
Code: Alles auswählen
$echo_text = str_replace("[color=green]","<em id='kleingruen'>",$echo_text);
$echo_text = str_replace("[/color]","</em>",$echo_text);
alternativ gibt es da noch was ähnliches von bizzarescripts (bizzar ssi) - hab ich allerdings nich probiert 
greetz schlubiz