Показать сообщение отдельно
Старый 25.12.2003, 14:55     # 13
Navin
Registered User
 
Аватар для Navin
 
Регистрация: 10.10.2002
Адрес: Питер
Сообщения: 238

Navin Нимб уже пробиваетсяNavin Нимб уже пробивается
Для vBulletin есть уже готовые хаки RSS Feeds!!!! 10 мин. чтобы настроить под конкретные нужды.

Keep in touch

Добавлено через 20 минут:
PHP код:
<?php

        
// Have fun fellas. Don't hesitate and email me if you have any troubles
        // Kostik - [email]navin@g-alumni.com[/email]  ICQ - 7775620

        
$title="IMHO.ws - Best Forum";         //your site title
        
$link="http://www.imho.ws/";         // your Site url
        
$forumurl="http://www.imho.ws/";     // include a trailing slash! e.g. [url]http://www.vbulletin.com/forum/[/url]
        
$desc="IMHO.ws - Best Forum";       // Your site name
        
$img="http://g-alumni.com/rss/imhows.gif"// a logo
        
$user "";                 // db username
        
$password "";          // db  password
        
$vbdb ""    ;            //db name
        
$excludeforum ="13";     // forum to exclude from rdf-feed

        
$info.="<?xml version=\"1.0\" encoding=\"Windows-1251\" ?>\n\n";
        
$info.="<rdf:RDF\nxmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\nxmlns=\"http://my.netscape.com/rdf/simple/0.9/\">\n\n";
        
$info.="<channel>\n<title>".$title."</title>\n";
        
$info.="<link>".$link."</link>\n<description>".$desc."</description>\n</channel>\n\n";

        
$info.="<image>\n<title>".$title."</title>\n<url>".$img."</url>\n<link>".$link."</link>\n</image>\n\n";

echo 
$info;

$sql="SELECT thread.title AS threadtitle, threadid, dateline, postusername, postuserid, thread.replycount, thread.lastposter, views, thread.forumid AS threadforumid, thread.lastpost AS lastpost, votenum, votetotal, forum.title AS forumname FROM thread LEFT JOIN forum ON forum.forumid = thread.forumid WHERE thread.visible = 1 AND thread.open AND forum.forumid <> ".$excludeforum." ORDER BY LASTPOST DESC LIMIT 15 ";

        
$db=mysql_connect("localhost","$user","$password") or die ("cant connect");
        
mysql_select_db("$vbdb",$db);
        
$news=mysql_query($sql);
        while(
$rows=mysql_fetch_array($news)){
           echo 
"<item>\n<title>".htmlspecialchars($rows["threadtitle"])."</title>\n<link>".$forumurl."tl".$rows["threadid"].".html</link>\n</item>\n\n";
        }

        echo 
"</rdf:RDF>\n";
?>
Navin вне форума