• 01-03-2009, 17:52:44
    #1
    Üyeliği durduruldu
    Arkadaslar sitemin anasayfasına vbulletinde yazılan son 20 baslığı, kimin yazdığını nezaman yazıldığını vss cekmek istiyorum.

    Nasıl bir kodlama gerekli ?
  • 01-03-2009, 18:13:11
    #2
    Üyeliği durduruldu
    bu iş için vb eklentileri vardır sanırım. vbulletin kısmına baktınız mı?

    illa ben yazacam derseniz. thread tablosundan lastpost alanına göre tersten sıralatıp -order by desc- limit i de 20 yaptınızmı tamamdır. son mesajı yazan felan aynı tabloda var.
  • 01-03-2009, 18:35:02
    #3
    Üyeliği durduruldu
    Açıkcası ben vbulletini hiç bilmiyorum.Arkadasım rica etti, yapabilrsem yapıyım dedim.Bu yüzden tabloları falan hiç bilmiyorumda..Örnek bi kod varsa cok sevinirim die yazmıstım

    Bakınıyım bi tablolara bari.
  • 01-03-2009, 20:26:09
    #4
    Üyeliği durduruldu
    Arkadaslar gerekli kodlamayı yaptım fakat, cok geride kalıyor..yani foruma msj atıyorum...

    sonra kendi sayfama bakıyorum göstermiyor.phpmyadmine kaydetmiyor hemen...
    Yani mesj yazar yazmaz thread tablosuna msjı aktarmıyor

    Bunun bir ayarı varmı ?
  • 01-03-2009, 20:51:09
    #5
    Üyeliği durduruldu
    keriii adlı üyeden alıntı: mesajı görüntüle
    Arkadaslar gerekli kodlamayı yaptım fakat, cok geride kalıyor..yani foruma msj atıyorum...
    sonra kendi sayfama bakıyorum göstermiyor.phpmyadmine kaydetmiyor hemen...
    Yani mesj yazar yazmaz thread tablosuna msjı aktarmıyor
    Bunun bir ayarı varmı ?
    kendi sayfanıza birşey kaydetmesi gerekmiyor ki direk datadan çektirmeniz lazim
  • 01-03-2009, 21:02:53
    #6
    Üyeliği durduruldu
    öyle yaptırıyorum zaten...Ama forum'a msj atınca nedense thread baslığına kaydetmiyor.

    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" id="forumlardan_icerik">
    <tr>
    <td height="23" colspan="4" bgcolor="#b21516" id="forumlardan_baslik">Forumda
    Yazılan Son 20 Mesaj </td>
    </tr>
    <tr>
    <td width="41%"><strong>Konu</strong></td>
    <td width="22%"><strong>Kimden</strong></td>
    <td width="29%"><strong>Tarih</strong></td>
    <td width="8%"><div align="right"><strong>Okunma</strong></div></td>
    </tr>
    <?php
    include("ayarforum.php");
    $konusayisi = 30; // kaç adet başlığı çekmek istiyorsanız
    
    function unix2date($string){
    $string = date("d.m.Y",$string);
    return $string;
    }
    
    
    $sorgu = mysql_query("select * from thread order by threadid desc limit $konusayisi");
    while($r=mysql_fetch_array($sorgu)) {
    $threadid = (int)$r[threadid];
    $userid =(int)$r[postuserid];
    $username = $r[postusername];
    $title = $r[title];
    $hit = $r[views];
    $tarih = unix2date($r['dateline']);
    
    ?>
    <tr>
    <td><b><a href="forum/showthread.php?t=<?=$threadid?>" target="_blank"><?=$title?></a></b></td>
    <td><a href="forum/member.php?u=<?=$userid?>" target="_blank"><?=$username?></a></td>
    <td><?=$tarih?></td>
    <td><div align="right"><?=$hit?></div></td>
    </tr>
    <? } ?>
    </table>
    Kodlama bu..Nerde hata var acaba
  • 01-03-2009, 21:07:33
    #7
    EuK
    Üyeliği durduruldu
    Burada xml olarak hazırı var ;
    Ap - Latest Threads in Showtread from this forum - vBulletin.org Forum
    php olarak istiyorsan ;
    <? $db_host = "localhost"; // Change this if your MySQL database host is different. $db_name = "root"; // Change this to the name of your database. $db_user = "forum"; // Change this to your database username. $db_pw = ""; // Change this to your database password. $forum_url = "http://forum.shaltr.com"; // Change this to reflect to your forum's URL. $forum_id = ""; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank. $limit = "10"; // Number of posts displayed. $titlecolor = "#FF0000"; // This is the color of the title. $postedcolor = "#FFFFFF"; // This is the color of the bottom text. $txtlimit = "100"; // This is the character limit. ####################################### // 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"); // 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\" bgcolor=\"#000000\">"; 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=\"verdana,arial,geneva\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\" target=\"_blank\"><FONT SIZE=\"2\" COLOR=\"$titlecolor\" face=\"verdana,arial,geneva\">$title</FONT></a></font><br /><font color=\"$postedcolor\" face=\"verdana,arial,geneva\" size='1'>gönderen: $poster </FONT></td></tr>"; } echo "</table>"; ?>
    alıntıdır.
    https://www.r10.net/vbulletin/28460-v...n-konular.html
  • 01-03-2009, 21:10:56
    #8
    Üyeliği durduruldu
    cacheleme sistemi falan mi kullaniyorsunuz?
  • 01-03-2009, 21:14:15
    #9
    Üyeliği durduruldu
    EuK adlı üyeden alıntı: mesajı görüntüle
    Burada xml olarak hazırı var ;
    Ap - Latest Threads in Showtread from this forum - vBulletin.org Forum
    php olarak istiyorsan ;
    <? $db_host = "localhost"; // Change this if your MySQL database host is different. $db_name = "root"; // Change this to the name of your database. $db_user = "forum"; // Change this to your database username. $db_pw = ""; // Change this to your database password. $forum_url = "http://forum.shaltr.com"; // Change this to reflect to your forum's URL. $forum_id = ""; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank. $limit = "10"; // Number of posts displayed. $titlecolor = "#FF0000"; // This is the color of the title. $postedcolor = "#FFFFFF"; // This is the color of the bottom text. $txtlimit = "100"; // This is the character limit. ####################################### // 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"); // 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\" bgcolor=\"#000000\">"; 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=\"verdana,arial,geneva\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\" target=\"_blank\"><FONT SIZE=\"2\" COLOR=\"$titlecolor\" face=\"verdana,arial,geneva\">$title</FONT></a></font><br /><font color=\"$postedcolor\" face=\"verdana,arial,geneva\" size='1'>gönderen: $poster </FONT></td></tr>"; } echo "</table>"; ?>
    alıntıdır.
    https://www.r10.net/vbulletin/28460-v...n-konular.html
    Bu kodlamada $forum_id kısmında sorunum var.Orayı ne yapmam gerekli ?..
    Bir sayı koyuyorum hata veriyor..