Probleem met laatste 10 posts

Installatie lukt niet? Plotseling een foutmelding. Of weet je niet hoe iets werkt. Problemen met phpBB2 kun je in dit archief opzoeken.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
lievenn
Berichten: 4
Lid geworden op: 25 jan 2007, 20:31

Probleem met laatste 10 posts

Bericht door lievenn » 25 jan 2007, 20:39

Support Template
  • Wat is het probleem?
    Ik wil mijn Laatste Posts In mijn website zetten maar dit lukt niet.
    Wanneer ontstond het probleem?
    Vanmiddag
    Adres van je forum:
    http://www.fc-dordrecht.nl/phpbb/
    Modifications op je forum:
    -
    Huidige stijl:
    Subsilver
    phpBB versie:
    2.0.22
    Waar is je forum gehost:
    Flexhosting
    Heb je onlangs iets verandert aan je forum?
    Nee
Overige opmerkingen:
Informatie voor laatse posts van:
http://www.mastercode.nl/artikel/61/#vb

Code voor in het aparte bestand recent.php:
<?php
define('IN_PHPBB', true);
////////////////////////////////////////////
// DE LAATSTE x AANTAL FORUM ONDERWERPEN
// DOOR: TED [WEBMASTER@MASTERCODE.NL]
// http://WWW.MASTERCODE.NL
////////////////////////////////////////////
// INSTELLINGEN
////////////////////////////////////////////
// Pad naar je forum (inclusief SLASH aan het einde) Bijv: forum/
$phpbb_root_path = 'phpbb/';
// Maximum lengte van een onderwerp naam
$maxlen =60;
// Aantal weer te geven berichten
$limiet =51;

////////////////////////////////////////////
// HIERONDER NIETS MEER VERANDEREN TENZIJ JE VERSTAND VAN ZAKEN HEBT ;)
////////////////////////////////////////////

include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.' . $phpEx);

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

$query = "SELECT `t`.`topic_id`, `t`.`topic_title`, `t`.`topic_poster`, `t`.`topic_time`, `t`.`topic_type`, `t`.`topic_vote`, `u`.`user_id`, `u`.`username`, `c`.`config_value` as `df`
FROM ".TOPICS_TABLE." as `t`, ".USERS_TABLE." as `u`, ".CONFIG_TABLE." as `c`
WHERE `t`.`topic_poster` = `u`.`user_id`
AND `c`.`config_name` = 'default_dateformat'
ORDER BY `t`.`topic_id` DESC
LIMIT 0,".$limiet;

$sql = mysql_query($query) or die("Error: ".mysql_error());


// DE OUTPUT
echo "<ul id='laatsteonderwerpen'>\n";
while($temp = mysql_fetch_array($sql))
{
extract($temp);
$topic_title = strlen($topic_title) > $maxlen ? substr($topic_title,0,$maxlen) . "…" : $topic_title;
switch($topic_type)
{
case 2: $topic_type = '<strong>'.$lang['Topic_Announcement'].'</strong> '; break;
case 1: $topic_type = '<strong>'.$lang['Topic_Sticky'].'</strong> '; break;
case 0: $topic_type = ''; break;
}
if($topic_vote == 1)
{
$topic_type = $topic_type.' '.$lang['Topic_Poll'].' ';
}

echo "\t<li>".$topic_type."<a href='".$phpbb_root_path."viewtopic.php?t=".$topic_id."'>".$topic_title."</a> ";
echo "gestart door <a href='".$phpbb_root_path."profile.php?mode=viewprofile&u=".$user_id."'>".$username."</a> ";
echo "op " . date($df,$topic_time);
echo "</li>\n";
}
echo "</ul>\n\n";
?>
En in de index deze:
<?php
include("recent.php");
?>
Kunnen jullie vertellen wat ik moet doen?

Alvast bedankt

Lieven Anthonise

sjefie
Berichten: 68
Lid geworden op: 10 jan 2007, 22:18

Bericht door sjefie » 25 jan 2007, 21:07

<?php
include("recent.php");
?>

Op je webpagina zetten en opslaan als .php
Het werkt namelijk alleen in php, anders heb je er niks aan

lievenn
Berichten: 4
Lid geworden op: 25 jan 2007, 20:31

bedankt

Bericht door lievenn » 25 jan 2007, 21:58

Heel erg bedankt !!

Ik heb nog een kleine vraag nu zijn de links op mijn site blauw ik wil ze graag in het wit hoe doe ik dit?

lievenn
Berichten: 4
Lid geworden op: 25 jan 2007, 20:31

fout

Bericht door lievenn » 26 jan 2007, 12:34

Ik heb nu wel de laatste 10 oum berichten maar deze foutmelding staat ervoor

Laatste Forum berichten:

Warning: Cannot modify header information - headers already sent by (output started at /home/dordrecht/domains/fc-dordrecht.nl/public_html/index.php:4) in /home/dordrecht/domains/fc-dordrecht.nl/public_html/phpbb/includes/sessions.php on line 254

Warning: Cannot modify header information - headers already sent by (output started at /home/dordrecht/domains/fc-dordrecht.nl/public_html/index.php:4) in /home/dordrecht/domains/fc-dordrecht.nl/public_html/phpbb/includes/sessions.php on line 255

wat kan ik hieraan doen?

lievenn
Berichten: 4
Lid geworden op: 25 jan 2007, 20:31

?

Bericht door lievenn » 26 jan 2007, 16:32

geen oplossingen?

Gesloten