08.07.2009, 19:39
|
#18 (permalink)
|
| WPD-Team
Registriert seit: 05.10.2006
Beiträge: 12.943
| Zitat:
Zitat von SVPWoody Danke für die Hilfe.
Wo muss ich das einfügen, wenn ich es in meinem PHP-Code der Forumsausgabe bzw. einen eigenen php- tag anlege passiert gar nichts... | Vollständig: Code: <?php
/*
Plugin Name: WP-Phpbb Last Topics
Plugin URI: http://www.4mj.it/wordpress-phpbb-last-topics-plugin/
Description: Display the most recent topics of your phpBB forum.
Version: 1.1
Author: Peppe Argento
Author URI: http://www.4mj.it
****************************
Sorry for my english!
To exclude a category of the forum, like private forum, add AND forum_id !='2', whith the id you want exclude.
You can set the number of post to display in DESC LIMIT 0,10, where 10 is the number.
For example if you wanna exlude (id 2 e 11) write
$phpbbq = "SELECT * FROM ".$table_prefix."topics WHERE forum_id !='2' AND forum_id !='11' ORDER BY topic_last_post_id DESC LIMIT 0,10";
****************************
*/
function wpphpbb_topics() {
//set forum path, forum host
$forum_path = "/homepages/9/d24061424/htdocs/phpBB3";
$host = "http://www.sektion-hair.de/phpBB3";
include("".$forum_path."/config.php");
$connection = mysql_connect($dbhost, $dbuser, $dbpasswd);
$s_db = mysql_select_db($dbname, $connection);
$phpbbq = "SELECT * FROM ".$table_prefix."topics WHERE forum_id !='9' AND forum_id !='10' AND forum_id !='11' ORDER BY topic_last_post_id DESC LIMIT 0,15";
$results = mysql_query($phpbbq, $connection);
while ($resultsow = mysql_fetch_array($results)) {
$topic_tit = utf8_encode($resultsow[topic_title]);
// You can wrap long words below, where 20 is the lenght.
$topics_title = substr($topic_tit, 0, 20);
echo "<font size=-5><a href=\"$host"."/viewtopic.php?t=$resultsow[topic_id]\" target=new>$topics_title...</a><br>";
}
}
?> Das sollte schon irgendeine Wirkung zeigen. Tuts das nicht dann ist noch irgendwas ganz andres faul. In dem Fall würde ich mit definitiv eine Lösung suchen, die ohne RunPHP etc. auskommt (Seitentemplate?) |
| |