Brandon Alexander Version: 0.1 Author: Nick [LINICKX] Bettison Author URI: http://www.linickx.com */ function phpbb_topics($limit = 10) { //Obviously we can't grab the PHPBB settings, so type them here ! $PHPBBDB = "phpbb_database"; // phpBB db name $TOPIC_TABLE = "phpbb_topics"; // phpbb topics table $SITEURL = "http://www.domain.com/phpbb"; //Forum (phpbb) URL // // Do not edit beyond this point // ----------------------------- global $wpdb; $wpdb->select($PHPBBDB); $results = $wpdb->get_results("SELECT * FROM $TOPIC_TABLE ORDER BY topic_time DESC LIMIT $limit"); if ($results){ echo ""; } $wpdb->select(DB_NAME); } function phpbb_inlinetopics( $content = '' ) { ob_start(); // Enable output buffering to supress echos phpbb_topics(5); // run function $result = ob_get_contents(); ob_end_clean(); // Empty the Buffer echo str_replace("{phpbb_recent_topics}", $result, $content); } add_filter('the_content', 'phpbb_inlinetopics'); ?>