последно коментирани теми - phpbb3

Код:
<?php
$query = mysql_query("SELECT c.topic_time , c.topic_title,c.forum_id,c.topic_id, c.topic_replies,c.topic_type FROM phpbb_topics c , phpbb_forums f WHERE c.forum_id=f.forum_id and f.prune_freq like '0' ORDER BY c.topic_time DESC LIMIT 0,5") or die(mysql_error());
	while($row = mysql_fetch_array($query)) {
	if (strlen($row['c.topic_title'])>35) {
		$totchki="...";
	}
	else {
		$totchki="";
	}
	$row['c.topic_title']=substr($tema,0 , 35);
echo "<a href=\"forum/viewtopic.php?t=$row[topic_id]\" title=\"$row[topic_title]\">$row[topic_title]$totchki</a>";
					}
?>
 
IzKuFeLiQqQqQ написа:
http://web-tourist.net/login/login/view.php?st=2156


Това не ми трябва, това е за последните теми, а не последните коментирани,

колкото до nom3r1, това небачка, тоест седи си само така не искарва нищо, пътя до форума е точно такъв какъвто си го задал ти, сложих му горе 1 include за config за да се свързва с db-то, но седи така

<?php
define('IN_VALID', true);
include ('conf.php');
$query = mysql_query("SELECT c.topic_time , c.topic_title,c.forum_id,c.topic_id, c.topic_replies,c.topic_type FROM phpbb_topics c , phpbb_forums f WHERE c.forum_id=f.forum_id and f.prune_freq like '0' ORDER BY c.topic_time DESC LIMIT 0,5") or die(mysql_error());
while($row = mysql_fetch_array($query)) {
if (strlen($row['c.topic_title'])>35) {
$totchki="...";
}
else {
$totchki="";
}
$row['c.topic_title']=substr($tema,0 , 35);
echo "<a href=\"forum/viewtopic.php?t=$row[topic_id]\" title=\"$row[topic_title]\">$row[topic_title]$totchki</a>";
}
?>
 
last_topic.php (примерен файл)
Код:
<?php
define('IN_PHPBB', true);
define('IN_VALID', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

//Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$query = mysql_query("SELECT c.topic_time , c.topic_title,c.forum_id,c.topic_id, c.topic_replies,c.topic_type FROM phpbb_topics c , phpbb_forums f WHERE c.forum_id=f.forum_id and f.prune_freq like '0' ORDER BY c.topic_time DESC LIMIT 0,5") or die(mysql_error());
    while($row = mysql_fetch_array($query)) {
    if (strlen($row['c.topic_title'])>35) {
        $totchki="...";
    }
    else {
        $totchki="";
    }
    $row['c.topic_title']=substr($tema,0 , 35);
echo "<div class=\"arrow\"> <a href=\"forum/viewtopic.php?t=$row[topic_id]\" title=\"$row[topic_title]\">$row[topic_title]$totchki</a></div>";
                    }
?>




или


Код:
<?php
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = 'dbport';
$dbname = 'dbname';
$dbuser = 'root';
$dbpasswd = 'dbpass';
$table_prefix = 'phpbb_';
$acm_type = 'file';
$load_extensions = '';

$connect = mysql_connect($dbhost, $dbuser, $dbpasswd);
$db = mysql_select_db($dbname,$connect) or die ("Could not select database");
$chars = mysql_query("SET CHARACTER SET cp1251");


$query = mysql_query("SELECT c.topic_time , c.topic_title,c.forum_id,c.topic_id, c.topic_replies,c.topic_type FROM phpbb_topics c , phpbb_forums f WHERE c.forum_id=f.forum_id and f.prune_freq like '0' ORDER BY c.topic_time DESC LIMIT 0,5") or die(mysql_error());
    while($row = mysql_fetch_array($query)) {
    if (strlen($row['c.topic_title'])>35) {
        $totchki="...";
    }
    else {
        $totchki="";
    }
    $row['c.topic_title']=substr($tema,0 , 35);
echo "<div class=\"arrow\"> <a href=\"forum/viewtopic.php?t=$row[topic_id]\" title=\"$row[topic_title]\">$row[topic_title]$totchki</a></div>";
                    }
?>

При мен с интеграция на phpBB3 първия код, който ти дадох работи без проблеми. Пробвай тези по-горе кодове, които ти дадох :?:
 
Ами нестават, сайта също е интегриран с форума, но без ефект, с горните кодове десните менюта изчезват и нищо не се показва, седи си празно менюто.
 

Back
Горе