Esempio n. 1
0
 }
 //sort the final array by order of number of comments
 function arr_keys_multisort($arr, $my_key, $sort_type)
 {
     foreach ($arr as $key => $row) {
         $arr_tmp[$key] = $row["{$my_key}"];
     }
     if ($sort_type == 'desc') {
         @array_multisort($arr_tmp, SORT_DESC, $arr);
     } else {
         @array_multisort($arr_tmp, SORT_ASC, $arr);
     }
     return $arr;
 }
 // return only config limit
 $result_featured_all = arr_keys_multisort($result_featured, 'replies', 'desc');
 $limit_result_featured = array();
 if (sizeof($result_featured) < $limit) {
     $limit = sizeof($result_featured);
 }
 $show_count = $limit + $set_limit;
 if ($show_count > $blog_limit_count) {
     $show_count = $blog_limit_count;
 }
 for ($x = $set_limit; $x < $show_count; $x++) {
     $limit_result_featured[$x] = $result_featured_all[$x];
 }
 $result_featured = $limit_result_featured;
 $see_more_title = $config['most_commented'];
 $show_block = 1;
 if (empty($result_featured)) {
Esempio n. 2
0
if ($sort_by_choice == 'most_comments') {
    //sort the final array by order of number of comments
    function arr_keys_multisort($arr, $my_key, $sort_type)
    {
        foreach ($arr as $key => $row) {
            $arr_tmp[$key] = $row["{$my_key}"];
        }
        if ($sort_type == 'desc') {
            @array_multisort($arr_tmp, SORT_DESC, $arr);
        } else {
            @array_multisort($arr_tmp, SORT_ASC, $arr);
        }
        return $arr;
    }
    // return only config limit
    $members_full_all = arr_keys_multisort($members_full, 'member_comments', 'desc');
    /*
          $limit_result_featured = array();
          if ( sizeof($members_full) < $limit ) $limit = sizeof($members_full);
          $show_count = $limit + $set_limit;
          if ( $show_count > $limit_count ) $show_count = $limit_count;
          for ( $x = $set_limit; $x < $show_count; $x++ ) {
    	$limit_result_featured[$x] = $members_full_all[$x];
    }
    */
    $members_full = $members_full_all;
    //$limit_result_featured;
    $show_m_c = 1;
}
// end if sort by comments
if (empty($members_full)) {
Esempio n. 3
0
        }
        if ($result1['user_group'] == 'global_mod') {
            $moderator_icon_array = array('moderator_icon' => '<img border="0" src="images/moderator_2.gif">');
        }
    } else {
        $moderator_status_array = array('moderator_status' => $lang_no);
        $moderator_icon_array = array('moderator_icon' => '');
    }
    //Merge all the results into one array
    //////////////////////////////////////
    $result2 = @array_merge($result1, $video_array, $audio_array, $pictures_array, $moderator_status_array, $moderator_icon_array);
    $result_active[] = $result2;
}
//sort the final "combo" (merged) array by specified $sort
/////////////////////////////////////////////////////////
$result_active = arr_keys_multisort($result_active, $sort, $sort_order);
////////////////////////////////////////////
//PAGINATION PLUS >> start  -- reusable code
////////////////////////////////////////////
$url = 'members.php';
$additional_url_variable = "?type={$show_t}&action=0&sort={$order_by}&page=";
@(include_once $include_base . '/includes/pagination.inc.php');
//PAGINATION PLUS >> end
//Display Results >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//MENU LOADER
/////////////
include_once "includes/menuloader.php";
//set condition for hidding navigation & 'no items found' block
if (empty($result_active)) {
    $show = 1;
} else {
Esempio n. 4
0
     //sort the final array by order of number of comments
     function arr_keys_multisort($arr, $my_key, $sort_type)
     {
         foreach ($arr as $key => $row) {
             $arr_tmp[$key] = $row["{$my_key}"];
         }
         if ($sort_type == 'desc') {
             @array_multisort($arr_tmp, SORT_DESC, $arr);
         } else {
             @array_multisort($arr_tmp, SORT_ASC, $arr);
         }
         return $arr;
     }
     /////////////////////////////////////////////////////////////////////////////
     // return only config limit
     $browse_images_all = arr_keys_multisort($browse_images, 'comments', 'desc');
     $limit_browse_images = array();
     if (sizeof($browse_images) < $limit) {
         $limit = sizeof($browse_images);
     }
     for ($x = 0; $x < $limit; $x++) {
         $limit_browse_images[$x] = $browse_images_all[$x];
     }
     $browse_images = $limit_browse_images;
     $see_more_title = $config['most_commented'];
 }
 //-----------------------------------------------------------------------------------------------------------
 //get most RATED ---------------------------------reusable --------------------------------------------
 if ($which_one == 'rated') {
     $browse_images = array();
     $sql = "SELECT * FROM images WHERE approved='yes' AND public_private = 'public' ORDER BY rating_total_points DESC LIMIT {$limit}";
Esempio n. 5
0
 }
 //sort the final array by order of number of comments
 function arr_keys_multisort($arr, $my_key, $sort_type)
 {
     foreach ($arr as $key => $row) {
         $arr_tmp[$key] = $row["{$my_key}"];
     }
     if ($sort_type == 'desc') {
         @array_multisort($arr_tmp, SORT_DESC, $arr);
     } else {
         @array_multisort($arr_tmp, SORT_ASC, $arr);
     }
     return $arr;
 }
 // return only config limit
 $result_featured_all = arr_keys_multisort($result_featured, 'comments', 'desc');
 $limit_result_featured = array();
 if (sizeof($result_featured) < $limit) {
     $limit = sizeof($result_featured);
 }
 $show_count = $limit + $set_limit;
 if ($show_count > $vid_limit_count) {
     $show_count = $vid_limit_count;
 }
 for ($x = $set_limit; $x < $show_count; $x++) {
     $limit_result_featured[$x] = $result_featured_all[$x];
 }
 $result_featured = $limit_result_featured;
 $see_more_title = $config['most_commented'];
 //PAGINATION PLUS >> start  -- reusable code
 $url = 'videos/load';