1
kesikkafa
Latest Phpbb topics blog
  • 2005/2/7 16:34

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


hello

i have got a phpbb forum. i want to display latest 5 topics on my XOOPS home page. i have got a phpbb hack to display latest 5 topic. how can i make this as a block on my XOOPS home page.

code is::

/**
* Mod Title: Latest Topics
* Mod Version: phpBB 2.0.4
* Author: Charlie Page
* Description: Shows latest topics on any page
* Release: v1.0, 05.30.2004
***
* Demo: http://www.xboxassassin.com/e3
* Installation Level: Easy
* Installation Time: 1 minute
* Files To Edit: This one
* Included Files: php-latest.php
***
* Installation Notes:
* Upload this file and set $ppath and $url,
* Include this into a page and your done!
*/
$url = "/forum"; // If url is - http://www.yourforums.com/forums , then enter in "/forums"
$ppath = "/home/kesik/public_html/forum/config.php"; // Physical path to the config.php file
if(empty($count))
$count = "5"; // How many topics to link to

//-----------------[ DO NOT EDIT BELOW HERE ]-------------------------
include_once("$ppath");
$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("here we die at connection");
@mysql_select_db("$dbname",$db) or die("here we die");

$prefix = "$table_prefix";

$query="SELECT * FROM $prefix_topics ORDER BY `topic_id` DESC LIMIT 0, $count";
$result=mysql_query($query);
while($row = mysql_fetch_array($result)) {
$topicid = "$row[topic_id]";
$title = "$row[topic_title]";
$forumid = "$row[forum_id]";
$replies = "$row[topic_replies]";

echo "- $title ($replies)
";

}
?>

Login

Who's Online

328 user(s) are online (292 user(s) are browsing Support Forums)


Members: 0


Guests: 328


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits