Seite 1 von 1
News-Vorschau
Verfasst: 14.04.2007 14:05
von rabby
Hallo,
im
Zune Forum habe ich u.a. eine News-Sektion. Nun würde ich gerne (außerhalb vom Forum), nämlich auf der Startseite
www.zune-info.de einen Kasten einbinden, worin dann z.B. die letzten 5 News-Titel erscheinen und verlinkt sind. Noch besser wäre natürlich, wenn auch noch eine Kurzbeschreibung dranstünde, also z.B. die ersten 15 Wörter des Artikels

Könnt Ihr mir hierfür etwas schickes Empfehlen, was sich in die Seite einbinden lässt?
Danke für Antworten.
mfg rabby
Verfasst: 14.04.2007 15:10
von Mahony
Hallo
Der
phpBB Fetch All MOD kann das was du möchtest.
MOD Description: phpBB Fetch All is a modification to phpBB that displays data from the forum on any page of a website.
Hier noch ein Link zum lesen für dich--->
http://www.phpbb.de/viewtopic.php?p=87585
Na und als Alternative dazu gibt es noch den
Topics Anywhere MOD, damit kannst Du Thementitel, Autor, Datum etc. auf jeder beliebigen Website per Javascript oder RSS anzeigen lassen.
Grüße: Mahony
Verfasst: 14.04.2007 15:30
von rabby
hallo,
danke für Deine Antwort!
habe das aus dem Posting mal übernommen und eine test.php erstellt:
<?
//
// This path points to the directory where phpBB is installed. Do
// not enter an URL here. The path must end with a trailing
// slash.
//
// Examples:
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ccc/
// --> $phpbb_root_path = './';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/
// --> $phpbb_root_path = './ccc/';
// forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ddd/
// --> $phpbb_root_path = '../ccc/';
//
$phpbb_root_path = './forum/';
define ('IN_PHPBB', true);
if (!file_exists($phpbb_root_path . 'extension.inc'))
{
die ('<tt><b>phpBB Fetch All:</b>
$phpbb_root_path is wrong and does not point to your forum.</tt>');
}
//
// phpBB related files
//
include_once ($phpbb_root_path . 'extension.inc');
include_once ($phpbb_root_path . 'common.' . $phpEx);
error_reporting(0);
include_once ($phpbb_root_path . 'includes/bbcode.' . $phpEx);
//
// Fetch All related files - we do need all these because the portal is a
// huge example
//
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/common.' . $phpEx);
include_once ($phpbb_root_path . 'mods/phpbb_fetch_all/posts.' . $phpEx);
//
// start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $session_length);
init_userprefs($userdata);
// fetch latest postings
$CFG['posts_trim_topic_number'] = 15;
$recent = phpbb_fetch_posts(null, POSTS_FETCH_LAST);
?>
<!-- RECENT -->
<?php if ($recent) { ?>
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="28"><span class="cattitle">Latest Discussion</span></td>
</tr>
<tr>
<td class="row1" align="left" width="100%">
<span class="gensmall">
<?php for ($i = 0; $i < count($recent); $i++) { ?>
<?php echo date($CFG['date_format'] . ' ' . $CFG['time_format'], $recent[$i]['post_time']); ?> <a href="<?php echo $phpbb_root_path; ?>profile.php?mode=viewprofile&u=<?php echo $recent[$i]['user_id']; ?>"><?php echo $recent[$i]['username']; ?></a><br /><img src="<?php echo $phpbb_root_path; ?>templates/subSilver/images/icon_latest_reply.gif" border="0" align="absmiddle" /> <a href="<?php echo $phpbb_root_path; ?>viewtopic.php?p=<?php echo $recent[$i]['post_id']; ?>#<?php echo $recent[$i]['post_id']; ?>"><b><?php echo $recent[$i]['topic_title']; ?><?php if ($recent[$i]['topic_trimmed']) { echo '...'; } ?></b></a><br />
<?php } ?>
</span>
</td>
</tr>
</table>
<p />
<?php }
?>
<!-- RECENT -->
Dort erscheinen die letzten Postings FAST schon so wie erwünscht.
Habe mein phpBB Forum suchmaschinenfreundlich gestaltet; doch das Ergebnis dieses Scripts verzichtet auf statische URLs

Kann man das auch noch in den Griff bekommen?
Wäre super.
Danke nochmal!