صفحة 2 من 2

مرسل: الأربعاء يوليو 18, 2007 6:57 am
بواسطة من أكون
??? ???? ???? ?? ??? .. ???? ?? ????? ?? ??? ??????? ??????

1- ????? ??? ??? ????? ??? ?? ??????? ?? ????? ????? ?????? ????????? ??? ??? ??? ??? ??

2- ???? ????? ????? ???? ??? ??????? ???? ???? ???? (????? )

3- ???? ????? ??? ??? ???? ?? ????? ??? ???? ???? ??????? ??? ??? ??? ????? ???????

4- ????? Re ?????? ?????????? ?? ??? ?? ???? ??? ???? ??? ?? ???? ??? ??? ???????

???? ??? ???? ??????? ???????

?? ?? ???? ????????

مرسل: الأربعاء يوليو 18, 2007 10:32 pm
بواسطة من أكون
???? ??????? ???? ?? ???? ?? ???? ??? ?????? ??? ?? ??? ??? ???? ????? ????? ??????? ?????? ????? .. ?? ???? ????????

مرسل: الخميس يوليو 19, 2007 2:24 am
بواسطة the shadow
????? ?? ???? :mrgreen:

????? ??? ??????? ??? ??????

????? ???? ???

???? ???
includes/functions.php

???? ??

كود: تحديد الكل

      'LATEST_POSTS'         => get_latest_posts(10),


???? ???

كود: تحديد الكل

      'LATEST_POSTS'         => get_latest_posts(10, 2, 'opt1'),



??????? ????????

?? ??? ??? ??????? ??????? ?????? ??????? :arrow:

مرسل: الخميس يوليو 19, 2007 2:46 am
بواسطة من أكون
??? ?????? ???? ??? ????? .. ??? ?? ???? ??? ???? ??????? ??? ???? ??????? ???????
??????? ??? ????? ???? ?????? ???????? ???? ??? ?????? ????? ??????? ????? ????? ???
??? ???? ??????? ?????? ???

مرسل: الخميس يوليو 19, 2007 3:02 am
بواسطة من أكون
??? ?????? ????? ???? ????? ??????? ???? ???? ?? ???????? ???????? ?????? ???? ?? ???? ???? ???? common.php ?????? ???? .. ?? ???? ?? ?? ???? .. ?? ?? ???? ????? ??? ?

??? ???? ?? ???? ??????? ??? ?? ??? ?????? ???? ????

مرسل: الخميس يوليو 19, 2007 3:18 am
بواسطة the shadow
?? ?? ??? common.php ???? ????? ????

??? ?? ??? ?? ?? overall header.html ????? ????????
??? ???? ??? ???? ????????? ?? ????? ??????? ???? ??? ???? ????? ???


??? ??????

?? ??? ?????? ?? ?????? ??? ?????????

?? ??? ????? ????? ??? ??? ??? ???????

مرسل: الخميس يوليو 19, 2007 3:25 am
بواسطة من أكون
??? ???? ???? ???? ???????? ????? ????? ?? ????? ??????? ???????? ??? ???? ???? ??????? ??? ???????? ??????? ????? ??? ??? ??????

مرسل: الخميس يوليو 19, 2007 3:31 am
بواسطة the shadow
????

?? ???? ??????? ???? ??? ??

the shadow كتب:????? ?? ???? :mrgreen:

????? ??? ??????? ??? ??????

????? ???? ???

???? ???
includes/functions.php

???? ??

كود: تحديد الكل

      'LATEST_POSTS'         => get_latest_posts(10),


???? ???

كود: تحديد الكل

      'LATEST_POSTS'         => get_latest_posts(10, 2, 'opt1'),



??????? ????????

?? ??? ??? ??????? ??????? ?????? ??????? :arrow:


?? ???? ??? ???? ??????

???? ?? ??????
?????? ?? ????? ??????????

???? ??? ????? ???? ??????? ??? ??
?????? ??????????
?????? ??? ?????????
?????? ???????? ????????

?????? ????? ?????? ????

مرسل: الخميس يوليو 19, 2007 3:38 am
بواسطة the shadow
?? ?????? ?????? ??? ??????

???????
test
:)

مرسل: الخميس يوليو 19, 2007 3:42 am
بواسطة من أكون
???? ????? ??????? ??? ?????? .. ????? ?? ????? ?? ???? ??? ????? ??? ?? ??????? ??? ????? ???? ???? ??????

مرسل: الخميس يوليو 19, 2007 3:56 am
بواسطة the shadow
???? ??? ?? ??????? ???????? ?? ?????

??????? ????? ????? ??????? ??? ????
?????? ?? ??? ?? ????? ????? :oops:

???? ???? ???? ????????? ?? ???? ?????????
???? ?????? ??? ??? ??????? ????? ?? ???? ?????????
???? ????? ??????? ?? ???? ???????? :roll:

?????? ??? ????? ??? ????? :)

مرسل: الخميس يوليو 19, 2007 3:59 am
بواسطة من أكون
?? ???? ?????? ??? ??? ?????? ?????? ???? ???? ???? ??? ??? ?????? ???? ????? ???????? ??????? ????

مرسل: الجمعة يوليو 20, 2007 8:58 pm
بواسطة the shadow
???? ??? ??????

??? ????? ???? ??? ????? ????? ?????? ????? Re
:)

??????? ?? ????? ???????? ?????

????

includes/functions.php

???? ??

كود: تحديد الكل

function get_latest_posts($limit, $extra_id = false, $type = false)
{
    global $db, $phpbb_root_path, $phpEx, $template;
   global $cache, $user, $auth, $config, $user_cache;


   $extra = false;
   if ($extra_id)
   {
      switch($type)
      {
         case 'opt3':
            $extra = "AND p.post_id IN ($extra_id)";
         break;
         case 'opt2':
            $extra = "AND p.topic_id IN ($extra_id)";
         break;
         case 'opt1':
            $extra = "AND p.forum_id IN ($extra_id)";
         break;
      }
   }
         

   //????? ?? ????????? ???? ???? ??????? ????????
   $auth_ary = $auth->acl_get_list($user->data['user_id'], 'f_read');
   
   $forum_ary = array();
   foreach ($auth_ary as $key => $var)
   {
      $forum_ary[] = $key;
   }
   $forums = implode(', ', $forum_ary);

   //???? ????? ???? ?????????
    $sql = 'SELECT p.*, u.*
   FROM ' . POSTS_TABLE . ' p
   LEFT JOIN ' . USERS_TABLE . " u ON (u.user_id = p.poster_id)
   WHERE p.forum_id IN ($forums) $extra
   ORDER BY post_time DESC LIMIT $limit";
    $result = $db->sql_query($sql);

   while ($row = $db->sql_fetchrow($result))
   {
      
      
      //????? ??????? ???? ?????
      
      $template->assign_block_vars('latest_posts', array(
         'POST_AUTHOR'      => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
         'POST_SUBJECT'      => $row['post_subject'],
         'POST_ID'         => $row['post_id'],
         'U_MINI_POST'      => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
         'U_POST_AUTHOR'      => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
         'POST_AUTHOR_COLOUR'=> get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
         'U_MINI_POST'      => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "p={$row['post_id']}&f={$row['forum_id']}#p{$row['post_id']}"),
      ));
   }
   $db->sql_freeresult($result);
    return;
}


??????? ??

كود: تحديد الكل

function get_latest_posts($limit, $extra_id = false, $type = false)
{
    global $db, $phpbb_root_path, $phpEx, $template;
   global $cache, $user, $auth, $config, $user_cache;


   $extra = false;
   if ($extra_id)
   {
      switch($type)
      {
         case 'opt3':
            $extra = "AND p.post_id IN ($extra_id)";
         break;
         case 'opt2':
            $extra = "AND p.topic_id IN ($extra_id)";
         break;
         case 'opt1':
            $extra = "AND p.forum_id IN ($extra_id)";
         break;
      }
   }
         

   //????? ?? ????????? ???? ???? ??????? ????????
   $auth_ary = $auth->acl_get_list($user->data['user_id'], 'f_read');
   
   $forum_ary = array();
   foreach ($auth_ary as $key => $var)
   {
      $forum_ary[] = $key;
   }
   $forums = implode(', ', $forum_ary);

   //???? ????? ???? ?????????
    $sql = 'SELECT t.topic_id, t.topic_last_post_id , t.topic_title, t.topic_last_poster_id, t.topic_last_poster_name, t.forum_id, u.*
   FROM ' . TOPICS_TABLE . ' t
   LEFT JOIN ' . USERS_TABLE . " u ON (u.user_id = t.topic_poster)
   WHERE t.forum_id IN ($forums) $extra
   ORDER BY topic_last_post_time DESC LIMIT $limit";
    $result = $db->sql_query($sql);

   while ($row = $db->sql_fetchrow($result))
   {
      
      
      //????? ??????? ???? ?????
      
      $template->assign_block_vars('latest_posts', array(
         'POST_AUTHOR'      => get_username_string('username', $row['topic_last_poster_id'], $row['username'], $row['topic_last_poster_colour '], $row['topic_last_poster_name']),
         'POST_SUBJECT'      => $row['topic_title'],
         'POST_ID'         => $row['topic_last_post_id'],
         'U_POST_AUTHOR'      => get_username_string('profile', $row['topic_last_poster_id'], $row['username'], $row['user_colour'], $row['topic_last_poster_name']),
         'POST_AUTHOR_COLOUR'=> get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour'], $row['post_username']),
         'U_MINI_POST'      => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$row['forum_id']}&t={$row['topic_id']}#p{$row['topic_last_post_id']}"),
      ));
   }
   $db->sql_freeresult($result);
    return;
}


???????? ??? ?????? :)

مرسل: الخميس أغسطس 09, 2007 5:06 am
بواسطة من أكون
???? ???? ??? ?????? ???? ????? ??? ?????? ?? ?????? ????? ?? ????? ????? ???? ???? ????? ?? ??????? ??????? ?????? ..