TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 488
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 116
  • Total: 116

ana sayfada son yorum alan üye

Started by potenza, September 24, 2008, 09:45:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

potenza

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 />';   }

bbTURK

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?

potenza

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

bbTURK

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.

potenza

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

This website is proudly hosted on Crocweb Cloud Website Hosting.