Etiketler: cevaplanmayan konular hakkında
| Author | Message |
Sender
334 posts |
#713 2007-03-25 22:56 GMT |
|
Bu sitedeki gibi cevaplanmayan konular bölümü yapmak istiyorum.Şöyle bir şey çok mu yanlış olur ? Code: if ( !defined('LDU_CODE') ) { die("Wrong URL."); }
$plimit = "1"; $sql = ldu_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 ORDER by t.ft_updated DESC LIMIT $plimit"); $latestposts = "<table border='1' width='100%' cellspacing='0' cellpadding='1' align='center'>"; $latestposts .= "<tr><td>Konu</td><td>Okunma</td><td>Cevaplanmayan konular</td><td>Tarih</td></tr>"; $ii=0; while ($row = ldu_fetch_array($sql)) { $ii++; $img = ($usr['id']>0 && $row['ft_updated']>$usr['lastvisit']) ? "<a href=\"forums.php?m=posts&q=".$row['ft_id']."&n=unread#unread\"><img src=\"skins/$skin/img/system/arrow-unread.gif\" alt=\"\" /></a>" : "<a href=\"forums.php?m=posts&q=".$row['ft_id']."\"><img src=\"skins/$skin/img/system/arrow-follow.gif\" alt=\"\" /></a> "; $latestposts .= "<tr><td> "; $latestposts .= $img." <a href=\"forums.php?m=posts&q=".$row['ft_id']."\">".ldu_cc(ldu_cutstring(stripslashes($row['ft_title']),38))."</a></td>"; $latestposts .="<td> (" .$row["ft_postcount"]. ") </td>"; $latestposts .="<td> (" .$row["ft_viewcount"]. ")</td>"; $latestposts .= "<td> <a href='users.php?m=details&id=".$row["ft_lastposterid"]."'>".$row["ft_lastpostername"]."</a></td>";$latestposts .= "<td> ".date($cfg['formatmonthdayhourmin'], $row['ft_updated'] + $usr['timezone'] * 3600)."</td></tr>"; } |
|
Dvdbil
2,179 posts |
#714 2007-03-25 23:51 GMT |
|
postcount kontrolü yap <2 (2 den az ise gibi..)
|
|
Sender
334 posts |
#715 2007-03-25 23:55 GMT |
|
if mi kullanıcam?Biraz daha açık olabilirsen? |
|
Dvdbil
2,179 posts |
#716 2007-03-26 00:01 GMT |
|
Sqlde WHERE ile yer belirlerken t.ft_postcount<2 işini görür.
Code: $sql = ldu_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s
WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 AND t.ft_postcount<2 ORDER by t.ft_updated DESC LIMIT $plimit"); |
|
Sender
334 posts |
#717 2007-03-26 00:07 GMT |
|
Sadece bu kod yeterlimi?Bunun için bir etiket belirlemem gerekir mi?
|
|
Dvdbil
2,179 posts |
#718 2007-03-26 00:10 GMT |
|
Dene..
|
|
Sender
334 posts |
#719 2007-03-26 11:20 GMT |
|
olmadı
|
|
Dvdbil
2,179 posts |
#726 2007-03-26 17:12 GMT |
|
Anlayamadım tam olarak ne çıkmıyor ?
Cevaplanmayan konun yoktur ? |
|
Sender
334 posts |
#727 2007-03-26 17:13 GMT |
|
dvdbil şöyle bir şey yaptım ama, http://rapidshare.com/files/22872908/unlastestpost.rar.html olmadı :S |
|
Dvdbil
2,179 posts |
#729 2007-03-26 17:16 GMT |
|
Yahu sırf sql kodu ile nasıl forumu almayı düşünüyorsun ?
sana verdiğim örnek sql kodlarını, en üstte verdiğin sql ile değiştirip diğer kodlarla beraber çalıştıracaksın. |
|
Sender
334 posts |
#732 2007-03-26 18:51 GMT |
|
Kurulum dosyası bulunamıyor diyor.Dediğin gibi yaptım
Code: <?PHP
/* ==================== Land Down Under - Website engine Copyright Neocrome http://www.neocrome.net [BEGIN_LDU] File=plugins/extended/unlatestposts/unlatestposts.php Version=2 Updated= Type=Plugin Author=***** Description= [END_LDU] [BEGIN_LDU_EXTPLUGIN] Code=unlatestposts Part=main File=unlatestposts Hooks=index.tags Tags=index.tpl:{PLUGIN_unlatestposts} Minlevel=0 Order=10 [END_LDU_EXTPLUGIN] ==================== */ if ( !defined('LDU_CODE') ) { die("Wrong URL."); } $plimit = "1"; $sql = ldu_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, t.ft_postcount, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 AND t.ft_postcount<2 ORDER by t.ft_updated DESC LIMIT $plimit"); $latestposts = "<table border='1' width='100%' cellspacing='0' cellpadding='1' align='center'>"; $latestposts .= "<tr><td>Konu</td><td>Okunma</td><td>Cevaplanmayan konular</td><td>Tarih</td></tr>"; $ii=0; while ($row = ldu_fetch_array($sql)) { $ii++; $img = ($usr['id']>0 && $row['ft_updated']>$usr['lastvisit']) ? "<a href=\"forums.php?m=posts&q=".$row['ft_id']."&n=unread#unread\"><img src=\"skins/$skin/img/system/arrow-unread.gif\" alt=\"\" /></a>" : "<a href=\"forums.php?m=posts&q=".$row['ft_id']."\"><img src=\"skins/$skin/img/system/arrow-follow.gif\" alt=\"\" /></a> "; $latestposts .= "<tr><td> "; $latestposts .= $img." <a href=\"forums.php?m=posts&q=".$row['ft_id']."\">".ldu_cc(ldu_cutstring(stripslashes($row['ft_title']),38))."</a></td>"; $latestposts .="<td> (" .$row["ft_postcount"]. ") </td>"; $latestposts .="<td> (" .$row["ft_viewcount"]. ")</td>"; $latestposts .= "<td> <a href='users.php?m=details&id=".$row["ft_lastposterid"]."'>".$row["ft_lastpostername"]."</a></td>";$latestposts .= "<td> ".date($cfg['formatmonthdayhourmin'], $row['ft_updated'] + $usr['timezone'] * 3600)."</td></tr>"; } |
|
Dvdbil
2,179 posts |
#733 2007-03-26 18:57 GMT |
|
Sen önce plugini normal bir şekilde çalıştır sonra cevaplanmayan olayını dediğim gibi yap.
Pluginin çalışmamasının konuyla ilgisi yok. |
|
Sender
334 posts |
#737 2007-03-26 21:30 GMT |
|
Dvdbil halletim.Ama Forumdaki konular içerisinde cevaplanmayanlarda çıkıyor bunu nasıl engellerim? |
|
Dvdbil
2,179 posts |
#738 2007-03-26 23:41 GMT |
|
AND t.ft_postcount>2 tam tersini uygulayacaksın.
|
|
Sender
334 posts |
#758 2007-03-27 23:34 GMT |
|
Latestpost'da
$sql = ldu_query("SELECT t.ft_id, t.ft_sectionid, t.ft_title, t.ft_updated, AND t.ft_postcount<2, t.ft_viewcount, t.ft_lastposterid, t.ft_lastpostername, s.fs_id, s.fs_title, s.fs_category FROM $db_forum_topics t,$db_forum_sections s WHERE t.ft_sectionid=s.fs_id AND t.ft_movedto=0 AND t.ft_mode=0 ORDER by t.ft_updated DESC LIMIT $plimit"); şeklinde yaptım ama olmadı |
|
Benzer konular (Similar topics) #BETA
| Konular | Mesajlar | Son Yazar | Güncelleme |
| Cevaplanmayan Konular | 19 | Aragorn-pc | 146 Gün |
| cevaplanmayan konular eklentisi | 2 | Dvdbil | 55 Gün |
| Cevaplanmayan konular eklentisi | 2 | Dvdbil | 217 Gün |
| son konular | 2 | WoMaNiZeR | 266 Gün |
| ÖnemLi konuLar | 6 | alikoza | 164 Gün |




