UzmanWeb.Net
  ANA SAYFA   FORUM   RESİMLER   GÖRSEL DERSLER   TOPLİST   DERSLER   İLETİŞİM

Mayıs 16, 2008, 06:06:40 ÖÖ *
Merhaba, Ziyaretçi. Lütfen giriş yapın veya üye olun.

Kullanıcı adınızı, parolanızı ve aktif kalma süresini giriniz
 
   Forum   Yardım Oyun Giriş Yap Kayıt  
Sayfa: [1]   Aşağı git
  Yazdır  
Gönderen Konu: forum son konular bloğu  (Okunma Sayısı 169 defa)
0 Üye ve 1 Ziyaretçi konuyu incelemekte.
massive
Üye
**

Puan: 2
Offline Offline

Cinsiyet: Bay
İsim: Erhan
Meslek: Öğretmen
Mesaj Sayısı: 63


Aktiflik
Deneyim
Seviye
WWW Stats
« : Nisan 12, 2008, 21:24:03 ÖS »
Aşağıdaki listedeki kullanıcılar bu konu için teşekkür ediyorlar!Teşekkür Et

Arkadaşlar daha önce 2-3 blok yayınlandı. Bende bir sitede buldum kurulumu biraz değişik olduğu için paylaşayım dedim.

İlk önce Linkleri Görebilmek İçin
Kayıt Olun veya Giriş Yapın bu adrese girip bloğu indiriyorsunuz. içerisinde 3 dosya çıkacak. last_forum_topic.php bunun içindekilerini silip yerine aşağıdaki kodu ekliyorsunuz.
Kod:
<?php 
/*
+--------------------------------------------------------------------------
|   MkPortal
|   ========================================
|   by Meo aka Luponero <Amedeo de longis>
|
|   (c) 2004 mkportal.it
|   http://www.mkportal.it
|   Email: luponero@mclink.it
|
+---------------------------------------------------------------------------
|
|   > MKPortal
|   > Written By Amedeo de longis
|   > Date started: 9.2.2004
|
+--------------------------------------------------------------------------
*/
if (!defined("IN_MKP")) {
    die (
"Sorry !! You cannot access this file directly.");
}

require(
"forum/SSI.php");


$content "";
$content $mklib_board->get_last_topics();

?>

Değiştirdiğimiz bu dosyayı ve zipten çıkan istruzioni.txt dosyasını ftp den bloklara atıyoruz.

mkportal/include/SMF/ içerisinden smf_board_functions.php dosyasını indirip, aşağıdaki kodu arayoruz.
Kod:
function get_last_posts($by, $sdate)
kodunun üzerine

Kod:
function get_last_topics()
    {
        global $DB, $mklib, $mkportals, $db_prefix, $user_info, $modSettings;
        $limit = 10;
        $taglio = 80;
        $db_prefix = DBPREFIX;
ob_start();

$sql = "Select count(*) As anzahl FROM {$db_prefix}topics";
$row = mysql_fetch_array($DB->query($sql));
if ($row['anzahl'] < $limit)
$limit = $row['anzahl'];

$content = '
<tr>
<td height="14" style="background-color : #354D7F; color:#FFFFFF" width="25">&nbsp;</td>
<td height="14" style="background-color : #354D7F; color:#FFFFFF"><b>Topic</b></td>
<td height="14" style="background-color : #354D7F; color:#FFFFFF" width="130" align="center"><b>Ultimo Post</b></td>
<td height="14" style="background-color : #354D7F; color:#FFFFFF" width="70" align="center"><b>Risposte</b></td>
<td height="14" style="background-color : #354D7F; color:#FFFFFF" width="35" align="center"><b>Visto</b></td>
<td height="14" style="background-color : #354D7F; color:#FFFFFF" width="100"><b>Board</b></td>
</tr>';

$Output =  ssi_recentTopics(10, null, 'array');
                                if( count($Output) < $limit ) $limit = count($Output);
For ($i = 0; $i<$limit; $i=$i+1){
$ID_TOPIC = $Output[$i]['topic'];
$ID_BOARD = $Output[$i]['board']['id'];
$ID_MEMBER_UPDATED = $Output[$i]['poster']['id'];
$boardName = $Output[$i]['board']['name'];
$boardLink = $Output[$i]['board']['link'];
$MEMBER_UPDATED = $Output[$i]['poster']['name'];
$MEMBER_UPDATED_LINK = $Output[$i]['poster']['link'];
$subject = $Output[$i]['subject'];
$body = $Output[$i]['preview'];
$icon = $Output[$i]['icon'];
$posterTime = $Output[$i]['timestamp'];

$sql = "Select ID_FIRST_MSG, ID_LAST_MSG, ID_MEMBER_STARTED, numViews, numReplies FROM {$db_prefix}topics Where ID_TOPIC = $ID_TOPIC";
$qry = $DB->query($sql);
$row = mysql_fetch_array($qry);
$ID_FIRST_MSG = $row['ID_FIRST_MSG'];
$ID_LAST_MSG = $row['ID_LAST_MSG'];
$ID_MEMBER_STARTED = $row['ID_MEMBER_STARTED'];
$numViews = $row['numViews'];
$numReplies = $row['numReplies'];

$sql = "Select memberName From {$db_prefix}members Where ID_MEMBER = $ID_MEMBER_STARTED";
$qry = $DB->query($sql);
$row = mysql_fetch_array($qry);
                  $MEMBER_STARTED = $row[''];


$sql2 = "Select icon From {$db_prefix}messages Where ID_MSG = $ID_FIRST_MSG";
$qry = $DB->query($sql2);
$row2 = mysql_fetch_array($qry);
$icon = $row2['icon'];

          $subject = strip_tags($subject);
        $subject = str_replace( "&#33;" , "!" ,$subject );
        $subject = str_replace( "&quot;", "\"", $subject );
            if (strlen($subject) > $taglio) {
                $subject = substr( $subject,0,($taglio - 3) ) . "...";
                $subject = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$subject );
            }

$body = str_replace( "<br>" , "[br]" ,$body );
$body = str_replace( "<br />" , "[br]" ,$body );
          $body = strip_tags($body);
        $body = str_replace( "&#33;" , "!" ,$body );
        $body = str_replace( "<", "&lt;", $body );
$body = str_replace( ">", "&gt;", $body );
$body = str_replace( "[br]" ,"\n"  ,$body );
if (strlen($body) > 800){
$body = substr($body, 1, 800)." ...";
}

$datum = strftime("%d.%m.%Y",$posterTime);
if ($datum == strftime("%d.%m.%Y",Time()))
$datum = "Oggi";
elseif ($datum == strftime("%d.%m.%Y",Time()-86400))
$datum = "Ieri";
else
$datum = "Il: ".$datum;
$zeit = strftime("%H:%M",$posterTime);

$content .= '
<tr>
<td class="windowbg" align="center"><img src="'.$mkportals->forum_url.'/Themes/default/images/post/'.$icon.'.gif" alt="" border="" /></td>
<td class="windowbg2" id="" title="'.$body.'">
<strong><a href="'.$mkportals->forum_url.'/index.php?topic='.$ID_TOPIC.'" id="">'.$subject.'</a></strong><br>
<span class="smalltext">
<a href="'.$mkportals->forum_url.'/index.php?action=profile;u='.$ID_MEMBER_STARTED.'" rel="nofollow">'.$MEMBER_STARTED.'</a>
</span>
</td>
<td class="windowbg" align="right">
<div class="smalltext">
'.$datum.' <span class="color:#COCOCO">'.$zeit.'</span><br />
da <a href="'.$mkportals->forum_url.'/index.php?action=profile;u='.$ID_MEMBER_UPDATED.'" rel="nofollow">'.$MEMBER_UPDATED.'</a>
<a href="'.$mkportals->forum_url.'/index.php?topic='.$ID_TOPIC.".msg".$ID_LAST_MSG.'#msg'.$ID_LAST_MSG.'">
<img src="'.$mkportals->forum_url.'/Themes/default/images/icons/last_post.gif" alt="" border="0" /></a>
</div>
</td>
<td class="windowbg2" align="center">'.$numReplies.'</td>
<td class="windowbg" align="center">'.$numViews.'</td>
<td class="windowbg2">'.$boardLink.'</td>
</tr>';
}
return $content;
}

Bu kodu ekliyoruz. Görünümü


Teşekkür listesi şu anda boş.
« Son Düzenleme: Nisan 22, 2008, 23:00:19 ÖS Gönderen: massive » Logged

Linkleri Görebilmek İçin
Kayıt Olun veya Giriş Yapın
Linkleri Görebilmek İçin
Kayıt Olun veya Giriş Yapın
By-EmReM
Yeni Üye
*

Puan: 0
Offline Offline

İsim: KAAN ALP
Meslek: Seçilmedi
Mesaj Sayısı: 1


Aktiflik
Deneyim
Seviye
 Stats
« Yanıtla #1 : Nisan 27, 2008, 18:10:08 ÖS »
Aşağıdaki listedeki kullanıcılar bu konu için teşekkür ediyorlar!Teşekkür Et

hocam yaptım ama olmadı :S
Logged
AdmiN
Genel Sorumlu
Administrator
*

Puan: 287
Offline Offline

Cinsiyet: Bay
İsim: Adem TÜRK
Meslek: Öğretmen
Mesaj Sayısı: 2816


~|| Bilginin Gücü ||~

Aktiflik
Deneyim
Seviye
WWW Stats
« Yanıtla #2 : Nisan 28, 2008, 00:00:44 ÖÖ »
Aşağıdaki listedeki kullanıcılar bu konu için teşekkür ediyorlar!Teşekkür Et

Zamanım olunca bunu denerim.
Logged

Soru sormadan ve yeni konu açmadan önce arama yapınız.
Konulara teşekkür mesajı yazmayın, teşekkür et düğmesine tıklayınız.
Sayfa: [1]   Yukarı git
  Yazdır  
 
Gitmek istediğiniz yer:  

Powered by SMF 1.1.4 | SMF © 2006, Simple Machines LLC | Sitemap | Sitemap / Site Haritası
Giriş Sayfası Yap Sık Kullanılanlara Ekle
UzmanWeb.Net 2003-2007 © | Bilgi Paylaşım Sitesi | Sitemap
Sayfa Başına Dön
Sitemizde yer alan tüm bilgilerin bir kısmı diğer sitelerden derlenip yalnızca bilgilendirme ve eğitim amacıyla sunulmaktadır.
Uzman Toplist Asp İndir Popüler Siteler Linkdefteri.com

MKPortal ©2003-2006 mkportal.it