| Author | Message |
emremix
483 posts |
#27545 2008-05-23 18:01 GMT |
|
Bunun sayesinde tüm forumlara birden başlık açabiliyoruz vbulletin tarzı duyuru sistemi oluyor yani. Hemen başlayalım yapmaya 1.Phpmyadmine girip bunu sorgulatıyoruz Code: ALTER TABLE sed_forum_topics ADD COLUMN global smallint(5) unsigned NOT NULL default '0'; 2. /system/core/forums/forums.topics.inc.php dosyasını açın Code: case 'announcement': sed_check_xg(); $sql = sed_sql_query("UPDATE $db_forum_topics SET ft_sticky=1, ft_state=1 WHERE ft_id='$q'"); sed_log("Announcement topic #".$q, 'for'); header("Location: forums.php?m=topics&s=$s"); exit; break; Altına ekleyin Code: case 'global': sed_check_xg(); $sql = sed_sql_query("UPDATE $db_forum_topics SET global=1, ft_sticky=1, ft_state=1 WHERE ft_id='$q'"); sed_log("Global Announcement topic #".$q, 'for'); header("Location: forums.php?m=topics&s=$s"); exit; break; 3. /system/core/forums/forums.topics.inc.php dosyasını açın Bunu Bulun Code: $mskin = sed_skinfile(array('forums', 'topics', $fs_category, $s)); $t = new XTemplate($mskin); Altına ekleyin Code: $sql4 = sed_sql_query("SELECT * FROM $db_forum_topics WHERE global='1' $cond ORDER by global DESC, ft_".$o." ".$w." LIMIT $d, ".$cfg['maxtopicsperpage']); while ($row4 = sed_sql_fetcharray($sql4)) { $row4['ft_icon'] = 'posts'; $row4['ft_postisnew'] = FALSE; $row4['ft_pages'] = ''; $ft_num++; if ($row4['ft_mode']==1) { $row4['ft_title'] = "# ".$row4['ft_title']; } if ($row4['ft_movedto']>0) { $row4['ft_url'] = "forums.php?m=posts&q=".$row4['ft_movedto']; $row4['ft_icon'] = "<img src=\"skins/$skin/img/system/posts_moved.gif\" alt=\"\" />"; $row4['ft_title']= $L['Moved'].": ".$row4['ft_title']; $row4['ft_lastpostername'] = " "; $row4['ft_postcount'] = " "; $row4['ft_replycount'] = " "; $row4['ft_viewcount'] = " "; $row4['ft_lastpostername'] = " "; $row4['ft_lastposturl'] = "<a href=\"forums.php?m=posts&q=".$row4['ft_movedto']."&n=last#bottom\"><img src=\"skins/$skin/img/system/arrow-follow.gif\" alt=\"\" /></a> ".$L['Moved']; $row4['ft_timago'] = sed_build_timegap($row4['ft_updated'],$sys['now_offset']); } else { $row4['ft_title']= "Announcement: ".$row4['ft_title']; $row4['ft_url'] = "forums.php?m=posts&q=".$row4['ft_id']; $row4['ft_lastposturl'] = ($usr['id']>0 && $row4['ft_updated'] > $usr['lastvisit']) ? "<a href=\"forums.php?m=posts&q=".$row4['ft_id']."&n=unread#unread\"><img src=\"skins/$skin/img/system/arrow-unread.gif\" alt=\"\" /></a>" : "<a href=\"forums.php?m=posts&q=".$row4['ft_id']."&n=last#bottom\"><img src=\"skins/$skin/img/system/arrow-follow.gif\" alt=\"\" /></a>"; $row4['ft_lastposturl'] .= @date($cfg['formatmonthdayhourmin'], $row4['ft_updated'] + $usr['timezone'] * 3600); $row4['ft_timago'] = sed_build_timegap($row4['ft_updated'],$sys['now_offset']); $row4['ft_replycount'] = $row4['ft_postcount'] - 1; if ($row4['ft_updated']>$usr['lastvisit'] && $usr['id']>0) { $row4['ft_icon'] .= '_new'; $row4['ft_postisnew'] = TRUE; } if ($row4['ft_postcount']>=$cfg['hottopictrigger'] && !$row4['ft_state'] && !$row4['ft_sticky']) { $row4['ft_icon'] = ($row4['ft_postisnew']) ? 'posts_new_hot' : 'posts_hot'; } else { if ($row4['ft_sticky']) { $row4['ft_icon'] .= '_sticky'; } if ($row4['ft_state']) { $row4['ft_icon'] .= '_locked'; } } $row4['ft_icon'] = "<img src=\"skins/$skin/img/system/".$row4['ft_icon'].".gif\" alt=\"\" />"; $row4['ft_lastpostername'] = sed_build_user($row4['ft_lastposterid'], sed_cc($row4['ft_lastpostername'])); } $row4['ft_firstpostername'] = sed_build_user($row4['ft_firstposterid'], sed_cc($row4['ft_firstpostername'])); if ($row4['ft_poll']>0) { $row4['ft_title'] = $L['Poll'].": ".$row4['ft_title']; } if ($row4['ft_postcount']>$cfg['maxtopicsperpage']) { $row4['ft_maxpages'] = ceil($row4['ft_postcount'] / $cfg['maxtopicsperpage']); $row4['ft_pages'] = $L['Pages'].":"; for ($a = 1; $a <= $row4['ft_maxpages']; $a++) { $row4['ft_pages'] .= (is_int($a/5) || $a<10 || $a==$row4['ft_maxpages']) ? " <a href=\"".$row4['ft_url']."&d=".($a-1) * $cfg['maxtopicsperpage']."\">".$a."</a>" : ''; } } $t-> assign(array( "FORUMS_TOPICS_GLOBAL_ROW_ID" => $row4['ft_id'], "FORUMS_TOPICS_GLOBAL_ROW_STATE" => $row4['ft_state'], "FORUMS_TOPICS_GLOBAL_ROW_ICON" => $row4['ft_icon'], "FORUMS_TOPICS_GLOBAL_ROW_TITLE" => sed_cc($row4['ft_title']), "FORUMS_TOPICS_GLOBAL_ROW_CREATIONDATE" => @date($cfg['formatmonthdayhourmin'], $row4['ft_creationdate'] + $usr['timezone'] * 3600), "FORUMS_TOPICS_GLOBAL_ROW_UPDATED" => $row4['ft_lastposturl'], "FORUMS_TOPICS_GLOBAL_ROW_TIMEAGO" => $row4['ft_timago'], "FORUMS_TOPICS_GLOBAL_ROW_POSTCOUNT" => $row4['ft_postcount'], "FORUMS_TOPICS_GLOBAL_ROW_REPLYCOUNT" => $row4['ft_replycount'], "FORUMS_TOPICS_GLOBAL_ROW_VIEWCOUNT" => $row4['ft_viewcount'], "FORUMS_TOPICS_GLOBAL_ROW_FIRSTPOSTER" => $row4['ft_firstpostername'], "FORUMS_TOPICS_GLOBAL_ROW_LASTPOSTER" => $row4['ft_lastpostername'], "FORUMS_TOPICS_GLOBAL_ROW_URL" => $row4['ft_url'], "FORUMS_TOPICS_GLOBAL_ROW_PAGES" => $row4['ft_pages'], "FORUMS_TOPICS_GLOBAL_ROW_MAXPAGES" => $row4['ft_maxpages'], "FORUMS_TOPICS_GLOBAL_ROW_ODDEVEN" => sed_build_oddeven($ft_num), "FORUMS_TOPICS_GLOBAL_ROW" => $row, )); $t->parse("MAIN.FORUMS_GLOBAL.FORUMS_TOPICS_GLOBAL_ROW"); } $t->parse("MAIN.FORUMS_GLOBAL"); 4. /system/core/forums/forums.topics.inc.php dosyasını açın Bunu bulun Code: case 'clear': sed_check_xg(); sed_log("Resetted topic #".$q, 'for'); $sql = sed_sql_query("UPDATE $db_forum_topics SET ft_sticky=0, ft_state=0, ft_mode=0 WHERE ft_id='$q'"); header("Location: forums.php?m=topics&s=$s"); exit; break; Bununla Değiştirin Code: case 'clear': sed_check_xg(); sed_log("Resetted topic #".$q, 'for'); $sql = sed_sql_query("UPDATE $db_forum_topics SET ft_sticky=0, ft_state=0, global=0, ft_mode=0 WHERE ft_id='$q'"); header("Location: forums.php?m=topics&s=$s"); exit; break; 5. /system/core/forums/forums.posts.inc.php açın (Not: Dosya Değişti Dikkat Edin) Code: if ($usr['isadmin']) { $adminoptions = "<form id=\"movetopic\" action=\"forums.php?m=topics&a=move&".sed_xg()."&s=".$s."&q=".$q."\" method=\"post\">"; $adminoptions .= $L['Topicoptions']." : <a href=\"forums.php?m=topics&a=bump&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Bump']; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=lock&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Lock']; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=sticky&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Makesticky']; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=announcement&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Announcement']; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=private&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Private']." (#)"; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=clear&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Default']; $adminoptions .= "</a> ".$L['Delete'].":[<a href=\"forums.php?m=topics&a=delete&".sed_xg()."&s=".$s."&q=".$q."\">x</a>] ".$movebox."</form>"; } Bununla Değiştirin Code: if ($usr['isadmin']) { $adminoptions = "<form id=\"movetopic\" action=\"forums.php?m=topics&a=move&".sed_xg()."&s=".$s."&q=".$q."\" method=\"post\">"; $adminoptions .= $L['Topicoptions']." : <a href=\"forums.php?m=topics&a=bump&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Bump']; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=lock&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Lock']; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=sticky&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Makesticky']; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=announcement&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Announcement']; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=global&".sed_xg()."&q=".$q."&s=".$s."\">Global Announcement"; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=private&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Private']." (#)"; $adminoptions .= "</a> <a href=\"forums.php?m=topics&a=clear&".sed_xg()."&q=".$q."&s=".$s."\">".$L['Default']; $adminoptions .= "</a> ".$L['Delete'].":[<a href=\"forums.php?m=topics&a=delete&".sed_xg()."&s=".$s."&q=".$q."\">x</a>] ".$movebox."</form>"; } Çekirdek Kodlama Tamamlandı.Şimdi sıra skinimizi düzenlemede; Son işlemimiz 6. /skins/YOURSKIN/forums.topics.tpl bunu açıyoruz ve uygun bir yere ekliyoruz Code: <!-- BEGIN: FORUMS_GLOBAL --> <table class="cells"> <tr> <td colspan="2" class="coltop"> {FORUMS_TOPICS_TITLE_TOPICS} / {FORUMS_TOPICS_TITLE_STARTED}</td> <td class="coltop" style="width:176px;"> {FORUMS_TOPICS_TITLE_LASTPOST}</td> <td class="coltop" style="width:56px;"> {FORUMS_TOPICS_TITLE_POSTS}</td> <td class="coltop" style="width:56px;"> {FORUMS_TOPICS_TITLE_VIEWS}</td> </tr> <!-- BEGIN: FORUMS_TOPICS_GLOBAL_ROW --> <tr> <td style="width:32px;" class="centerall {FORUMS_TOPICS_GLOBAL_ROW_ODDEVEN}"> {FORUMS_TOPICS_GLOBAL_ROW_ICON} </td> <td class="{FORUMS_TOPICS_GLOBAL_ROW_ODDEVEN}"> <strong><a href="{FORUMS_TOPICS_GLOBAL_ROW_URL}">{FORUMS_TOPICS_GLOBAL_ROW_TITLE}</a></strong><br /> {FORUMS_TOPICS_GLOBAL_ROW_PAGES} {FORUMS_TOPICS_GLOBAL_ROW_CREATIONDATE} : {FORUMS_TOPICS_GLOBAL_ROW_FIRSTPOSTER} </td> <td class="centerall {FORUMS_TOPICS_GLOBAL_ROW_ODDEVEN}"> {FORUMS_TOPICS_GLOBAL_ROW_UPDATED} {FORUMS_TOPICS_GLOBAL_ROW_LASTPOSTER}<br /> {FORUMS_TOPICS_GLOBAL_ROW_TIMEAGO}</span> </td> <td class="centerall {FORUMS_TOPICS_GLOBAL_ROW_ODDEVEN}"> {FORUMS_TOPICS_GLOBAL_ROW_POSTCOUNT} </td> <td class="centerall {FORUMS_TOPICS_GLOBAL_ROW_ODDEVEN}"> {FORUMS_TOPICS_GLOBAL_ROW_VIEWCOUNT} </td> </tr> <!-- END: FORUMS_TOPICS_GLOBAL_ROW --> </table> <!-- END: FORUMS_GLOBAL --> Bu makale Trustmaster tarafından hazırlanmış olup Emremix yani ben tarafınndan Seditio-tr üyeleri için Türkçe'ye çevrilmiştir. Kolay Gelsin Biraz uzun bir işlem olsada herkesin kolaylıkla yapabileceğini düşünüyorum. Orjinal Makale için; http://www.seditioforge.com/tutorials/core-hacks/global-forums-posts-i112.html Linkini kullanabilirsiniz. |
|
|
Sudo apt-get Alcohol
Forever Ubuntu :) |
|
The_PcDelisi
237 posts |
#27554 2008-05-23 19:49 GMT |
|
saol emre
|
|
|
TeknoPaylasim.NET Biraz özenti oldu ama idare edin :)
5 Gün Deneme Hosting Veriyoruz Memnun kalırsanız Alıyorsunuz( Linux Windows ) Morelim Bozuk :( Pr 3 den/1e Düştü Lanet olsun bu içimdeki insan sevgisi |
> 1 <
Benzer konular (Similar topics) #BETA
| Konular | Mesajlar | Son Yazar | Güncelleme |
| Sed Url Core Hack(Seo) | 18 | hakan | 521 Gün |
| Benzer konular core hack | 17 | noob | 26 Gün |
| Seditio Maintance Core Hack ? | 8 | Darkworm | 531 Gün |
| Otomatik Link Gizleme Core hack | 12 | phpcoding | 397 Gün |
| Core hack, html kodlari pasiflestirmek | 2 | Dvdbil | 441 Gün |




