Hızlı Konu Açma

Hızlı Konu Açmak için tıklayınız.

Son Mesajlar

Konulardaki Son Mesajlar

Reklam

Forumda Reklam Vermek İçin Bize Ulaşın

İndexinize Forumunuzdan Son 10 Konuyu Ekleme

BOMBFACTORY

Uzman Üye
Uzman Üye
Trabzonspor
Katılım
5 Ocak 2014
Mesajlar
3,333
Tepkime puanı
6
Puanları
136
<?
## sitenize göre güncelleyin ##
$db_host = "localhost"; // localhost olarak kalsın
$db_name = "dbad"; // db adınızdır
$db_user = "dbuser"; // db user
$db_pw = "dbsifre"; // db şifrenizdir

$forum_url = "http://www.forumadresi.com"; // forum sitenizin url sidir
$forum_id = ""; // hangi İd ler gelecek 0 seçerseniz tüm id ler gelir (tavsiyem 0 kalsın )
$limit = "10"; //forumdan kaçtane konu gelecek.
$titlecolor = "#ff0000"; // konu renginiz.
$postedcolor = "#000000"; // msj renginiz.
$txtlimit = "350"; // msj satır uzunlugu.
#######################################

// Databasenize bağlanıyoruz
mysql_connect($db_host, $db_user, $db_pw)
or die (
"db_host,db_user veya db_pw yanlış yazıldı");
mysql_select_db($db_name) or die("db_name yanlış");

// Aşağıdaki bir tablo başlangıcıdır. bunu istemiyorsanız,kaldırabilirsiniz.
echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";

if (
$forum_id) {
$forumid = "and forumid=$forum_id";
}

if (
$limit) {
$limited = "limit $limit";
}
$thread_sql = mysql_query("select threadid,title,lastpost,lastposter from thread where visible=1 and open=1 $forumid order by lastpost desc $limited");

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 ("m/d/y h:i a" ,$lastpost);
$title = $thread_get['title'];
$title = substr($title,0,$txtlimit);
echo
"<tr><td><font size=\"2\" face=\"arial,verdana,geneva\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\"><font size=\"2\" color=\"$titlecolor\" face=\"arial,verdana,geneva\">$title</font></a></font><br /><font color=\"$postedcolor\" face=\"arial,verdana,geneva\" size='1'>gonderen: $poster <i>$date2</i></font></td></tr>";
}
echo
"</table>";
?>
 

Users Who Are Viewing This Konu (Users: 0, Guests: 1)

Üst