[Verplaatst] Recente post op Index
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

[Verplaatst] Recente post op Index
Ik heb een verzoek, is het mogelijkk de laatst geposte topics te zetten op de index (beginpagina)??
- WebSiteNet
- Berichten: 6524
- Lid geworden op: 20 okt 2003, 16:56
- Locatie: Wieringerwerf
- Contacteer:
Wil het niet op me forum index maar op me index dus in mijn geval
niet op http://www.hotrid.nl/forum maar op http://www.hotrid.nl (dit is in php, c++ & html geschreven)
niet op http://www.hotrid.nl/forum maar op http://www.hotrid.nl (dit is in php, c++ & html geschreven)
- WebSiteNet
- Berichten: 6524
- Lid geworden op: 20 okt 2003, 16:56
- Locatie: Wieringerwerf
- Contacteer:
De code staat er in. wel de code ff wijzigen naar jouw standaards he!(zoals de url naar je forum)
http://www.phpbbhacks.com/forums/viewto ... ght=topics
http://www.phpbbhacks.com/forums/viewto ... ght=topics
Code: Selecteer alles
<? include_once ("JOUWFORUMMAP/config.php");
$mysql_connection = mysql_connect ($dbhost, $dbuser, $dbpasswd) or die ("Connection failed");
mysql_select_db ($dbname) or die ("Selecting database failed");
$query = "SELECT topic_id,topic_title FROM phpbb_topics order by topic_id desc limit 5
";
$res = mysql_query($query);
while($data = @mysql_fetch_array($res))
{
echo " <a href=\"JOUWFORUMMAP/viewtopic.php?t=".$data["topic_id"]."\">".$data['topic_title']."</a><br>";
}
?>

Code: Selecteer alles
Warning: main(/forum/config.php): failed to open stream: No such file or directory in /var/www/html/index.php on line 378
Warning: main(): Failed opening '/forum/config.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /var/www/html/index.php on line 378
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /var/www/html/index.php on line 379
Connection failed
- WebSiteNet
- Berichten: 6524
- Lid geworden op: 20 okt 2003, 16:56
- Locatie: Wieringerwerf
- Contacteer: