01 Ara 2021 06:53 Yeni Konu Oluştur

Haberler:

Sitemiz Smf 2.1 ve Smf 2.0 sürümleri için Destek ve Tema paylaşım forumudur


smf açılır kapanır sol panel

Başlatan snrj, 20 May 2014 16:21

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.

*

  1. 3,128

  2. 588

  3. 1012
20 May 2014 16:21 Son düzenlenme: 27 Ağu 2014 18:48 Smfci

Anlatım default temaya göredir
boardindex.template de
bul
?>
üstüne ekle
function son_ileti()
 {
  $kacmesaj = 5;
$latestPostOptions = array('number_posts' => $kacmesaj,);
 global $smcFunc, $txt, $user_info, $sourcedir, $modSettings, $context, $settings, $scripturl;
  $context['latest_posts'] = cache_quick_get('boardindex-latest_posts:' . md5($user_info['query_wanna_see_board'] . $user_info['language']), 'Subs-Recent.php', 'cache_getLastPosts', array($latestPostOptions));
  $members = array();
  foreach ($context['latest_posts'] as $post)
   $members[] = $post['poster']['id'];
  $request = $smcFunc['db_query']('', '
   SELECT m.id_member, m.avatar, a.id_attach, a.attachment_type, a.filename
   FROM {db_prefix}members AS m
   LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
  
   WHERE m.id_member IN ({array_int:member_ids})',
   array(
    'member_ids' => $members,
   )
  );
  $avatar_profile = array();
  while ($row = $smcFunc['db_fetch_assoc']($request))
  {
   $avatar_profile[$row['id_member']] = array(
    'name' => $row['avatar'],
    'image' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar" style="float: left;" width="30" />'),
    'href' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar_url'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
    'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
    'avatar' => array(
    'name' => $row_members['avatar'],
    'image' => $row_members['avatar'] == '' ? ($row_members['id_attach'] > 0 ? '<img src="' . (empty($row_members['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row_members['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row_members['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row_members['avatar'], 'http://') ? '<img src="' . $row_members['avatar'] . '" width="" height="" alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row_members['avatar']) . '" alt="" class="avatar" border="0" />'),
    'href' => $row_members['avatar'] == '' ? ($row_members['id_attach'] > 0 ? (empty($row_members['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row_members['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row_members['filename']) : '') : (stristr($row_members['avatar'], 'http://') ? $row_members['avatar'] : $modSettings['avatar_url'] . '/' . $row_members['avatar']),
    'url' => $row_members['avatar'] == '' ? '' : (stristr($row_members['avatar'], 'http://') ? $row_members['avatar'] : $modSettings['avatar_url'] . '/' . $row_members['avatar'])
   ),
  );
  
  }
  $smcFunc['db_free_result']($request);
 
  if (!empty($avatar_profile))
   foreach ($context['latest_posts'] as $k => $post)
    if (!empty($avatar_profile[$post['poster']['id']]))
     $context['latest_posts'][$k]['poster']['avatar'] = $avatar_profile[$post['poster']['id']];
    
global $context, $settings, $options, $txt, $scripturl, $modSettings;
  // Only show one post.
  if ($settings['number_recent_posts'] == 1)
  {
   // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
   echo '
    <strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
    <p id="infocenter_onepost" class="middletext">
     ', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
    </p>';
  }
    // Show lots of posts.
  elseif (!empty($context['latest_posts']))
  {
   /* Each post in latest_posts has:
     board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
     subject, short_subject (shortened with...), time, link, and href. */
   foreach ($context['latest_posts'] as $post)
   echo '
  
    <div align="center">
  
    <table  border="0" bordercolor="#003c74" width="210" >
    
    
<tr style="align:left;background:#f5f5f5;">
  <td style=" border:solid 1px #003c74; height: 60px ; width: 60px ;"><img  class="profilresim" src="', !empty($post['poster']['avatar']['href']) ? $post['poster']['avatar']['href'] : $settings['images_url'] . '/noavatar.jpg', '" width="60" height="60"  /></a>
                              </td>
<td style=" border:1px solid #003c74; height: 60px ; width: 100% ;" ><strong>', $post['link'], '<br/></strong> <a style="color:red;">', $txt['by'], ' ', $post['poster']['link'], '</a><br/>', $post['time'], '</td>      
     </tr>  
    </table></div>
';
    
  }
   }
bul
echo '
 <div id="boardindex_table">
 <table class="table_list">';
değiştir
echo '<script type="text/javascript" src="', $settings['theme_url'], '/scripts/SSS.js"></script>
      
 <header class="main">
 <nav style="display:none;">';
 son_ileti();
 echo'</nav></header>';
 echo '
 <div id="boardindex_table"><div class="sagda"><a href="#menu" class="menu-trigger"><span class="sonkonu">', $txt['recent_posts'], '</span></a></div>
 <table class="table_list">';
index.css en alta ekle
.jPanelMenu header.main .menu-trigger {
    position: absolute;
    top: 0;
    left: 0;
line-height: 57.5px;
 }
.jPanelMenu header.main .menu-trigger:active {
      text-shadow: 0 -1px 1px #222222, 0 0 50px #f7f7f7; }
.jPanelMenu header.main nav {
    text-indent: -9999px; width: 0px;
height: 0px;}
.jPanelMenu .content {
  padding-top: 4em; }

  .jPanelMenu .content .jPM-specific {
    display: block; }

.jPanelMenu-panel {
  -moz-box-shadow: 0 0 25px #222222;
  -webkit-box-shadow: 0 0 25px #222222;
 }
.sagda{top: 250px;}

ekteki sss.js temanızın scripts klasörüne atın

düzenlemeler yapılacak acele etmeyin :D


MENU ×