
 
        Сообщение от 
jakal 
                        
 
                         
                  
           
              
       
    
  
      
  Тот для ДЛЕ 8.0 хак. На том форуме дали код
	PHP код:
 
	
		
			
<?php
$db_host = "адрес MySQL";
$db_name = "имя базы";
$db_user = "логин";
$db_pw = "пароль"; 
$forum_url = "http://site.ru/forum/"; 
$forum_id = ""; 
$limit = "10"; // число выводимых постов
$excludeforums = ""; 
$titlecolor = "#цвет тайтла"; 
$postedcolor = "#цвет текста"; 
$txtlimit = "длина текста (напр. 120)"
#######################################
// Connecting to your database
mysql_connect($db_host, $db_user, $db_pw)
OR die ("Cannot connect to your database");
mysql_select_db($db_name) OR die("Cannot connect to your database");
mysql_query("SET NAMES 'cp1251'");
// Below is the beginning of a table. If you feel you don't need it, you may remove it.
echo "<table border=0 width=100% cellspacing=0 cellpadding=2>";
if ($forum_id) {
    $forum_id = "AND forumid=$forum_id";
}
if ($limit) {
    $limited = "LIMIT $limit";
}
if ($excludeforums == "" or $excludeforums <= "0") {
    $quarter = "no";
} else {
    $excfid = explode(",",$excludeforums); $i = 0; $a = count($excfid);
    while ($i < $a) {
        $wheresql .= " AND thread.forumid!='$excfid[$i]'";    ++$i;
    }
}
$qw = "SELECT threadid,title,lastpost,lastposter,forumid FROM thread WHERE visible=1 AND open=1 $forum_id ORDER BY lastpost DESC $limited";
//PRINT $qw;
$thread_sql = mysql_query($qw);
while($thread_get=mysql_fetch_array($thread_sql))
{
$lastpost = $thread_get['lastpost'];
$poster = $thread_get['lastposter'];
$tid = $thread_get['threadid'];
$psql = mysql_query("SELECT postid FROM post WHERE threadid=$tid ORDER BY postid DESC");
$getp=mysql_fetch_array($psql);
$pid = $getp['postid'];
$date2 = date ("d/m H:i" ,$lastpost);
$title = $thread_get['title'];
$title = substr($title,0,$txtlimit);
echo "<tr><td><a href=$forum_url/showthread.php?p=$pid#post$pid/"><FONT COLOR=\"$titlecolor\"><b>$title</b></FONT></a></font><div align=right><font color=\"$postedcolor\" size='1'>$poster <i>$date2</i></FONT></div></td></tr>";
}
echo "</table>";
?>
		
	
 А куда его вставлять, если я хочу, чтобы в боковой панели был вывод?