TinyPortal

Development => International => Turkish => Topic started by: potenza on September 24, 2008, 09:45:37 PM

Title: ana sayfada son yorum alan üye
Post by: potenza on September 24, 2008, 09:45:37 PM
smf 1.1.6 kullanıyorum ve ultimate profil mod u kurulu kullanıcıların profilindeki resimlere yorum ve yeni resim eklenince ana sayfada front blokta görünmesini istiyorum kodları smf forumda aldım ekledim ama tiny kurulu olduğu için görünmedi bu konuyu burada paylaşmam gerektiğini söylediler bu fonksiyonu nasıl front blokta gösterebilirim
teşekkürler

kodlar bu ÅŸekilde:

BoardIndex.php'de bul
$context['page_title'] = $txt[18];

Sonrasina ekle:
// Profile pictures.   if ($modSettings['profile_enable_pictures'] == 1)
{      $request = db_query("SELECT ID_PICTURE, time, title, filename, ID_MEMBER       
    FROM {$db_prefix}profile_pictures       
     ORDER BY time DESC       
     LIMIT 10", __FILE__, __LINE__);      while ($picture = mysql_fetch_assoc ($request))
{         $context['pictures'][] = array (            'ID_PICTURE' => $picture['ID_PICTURE'],            'title' => $picture['title'],            'url' => $scripturl . '?action=profile;u=' . $picture['ID_MEMBER'] . ';sa=pictures;view=' . $picture['ID_PICTURE'],            'thumb' => $modSettings['profile_pictures_url'] . '/' . $picture['ID_MEMBER'] . '_' . $picture['time'] . '_thumb.' . get_extension ($picture['filename']),            'time' => timeformat ($picture['time']),         );      }           if (@$context['member']['options']['pictures_budd_only'] == 1 && @$modSettings['enable_buddylist'] == 1) {         if ($context['member']['is_reverse_buddy'] || allowedTo ('profile_extra_any') || $context['user']['is_owner'])            $context['can_view_pics'] = true;         else            $context['can_view_pics'] = false;      } else         $context['can_view_pics'] = true;   }


bul
?>

öncesine ekle
function get_extension ($filename){   return substr (strrchr ($filename, '.'), 1);}

BoardIndex.template.php'de bul:
}?>

öncesine ekle
   if ($modSettings['profile_enable_pictures'] == 1 && $context['can_view_pics'])   {      echo '<br />   <table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%">      <tr>         <td class="titlebg" height="26" align="center">Son Eklenen Resimler</td>      </tr>      <tr>         <td class="windowbg" width="%100">            <table width="%100">';                     if (!empty($context['pictures']))       
     {         
      echo '       
       <tr>         
        <td align="center" valign="top" style="clear: both;"><marquee behavior="scroll" direction="left" height="140" width="100%" scrollamount="5" scrolldelay="1" onmouseover="this.stop()" onmouseout="this.start()">';               foreach ($context['pictures'] as $picture)               {                     echo '                     <a href="', $picture['url'] ,'"><img src="', $picture['thumb'] ,'" alt="" title="', $picture['title'], '" border="0" /></a>';               }               echo '                  </marquee></td>               </tr>';            }            else               echo '               <tr>                  <td>', $txt['profile_pictures_no'] ,'</td>               </tr>';               echo '            </table>         </td>      </tr>   </table><br />';   }
Title: Re: ana sayfada son yorum alan üye
Post by: bbTURK on September 25, 2008, 09:27:58 PM
birazdan kodu deneyecem daha bakmadım. ancak anladığım kadarıyla direk smf üzerinde gösteriyo bu kodlar. tp ile alaksı yok. bu kodlar çalışmadı ve nedeni tp mi diyorsun?
Title: Re: ana sayfada son yorum alan üye
Post by: potenza on September 25, 2008, 09:31:09 PM
hayır nedeni tp demiyorum smf forumun en altında görünüyor ben bölümü front blok ta  çalıştırmak istiyorum sorun o smf forumdaki arkadaÅŸlar size danışmamı istedi phpbox ile bunu çalıştırabilirmiyim yada farklı bi yöntemle

ilgin için saol bbturk
Title: Re: ana sayfada son yorum alan üye
Post by: bbTURK on September 26, 2008, 01:24:08 PM
localhostum çöktüğü için yakın bir zamanda deneyemiyecem gibi gözüküyor :D .

şöyle bişey deneyelim bir php box oluştur. ekle dediğin kodları alt alta ekle. çalıştır.
Title: Re: ana sayfada son yorum alan üye
Post by: potenza on September 26, 2008, 07:05:24 PM
bbturk ben hepsini halletim ve daha fazlasını  ;D
kodları buradamı paylaşayım yoksa farklı bi başlıkmı açayim herkesin işine yarar