From b604c0b377cb8d78e192caa3bc72c5658b82fe51 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 28 Jul 2012 12:07:58 +0000 Subject: [PATCH] =?UTF-8?q?Tarea=20#942=20->=20Poder=20ver=20m=C3=A1s=20de?= =?UTF-8?q?dicatorias=20en=20la=20lista=20de=20la=20p=C3=A1gina=20de=20ini?= =?UTF-8?q?cio=20pero=20sin=20interrumpir=20el=20video?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@45 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6 --- wp-content/themes/score/functions.php | 3 +- wp-content/themes/score/index.php | 145 ++++++++++-------- .../themes/score/lib/scripts/custom.php | 10 ++ 3 files changed, 94 insertions(+), 64 deletions(-) diff --git a/wp-content/themes/score/functions.php b/wp-content/themes/score/functions.php index 8503a33..ad1bb00 100644 --- a/wp-content/themes/score/functions.php +++ b/wp-content/themes/score/functions.php @@ -411,7 +411,7 @@ function gp_pagination($pages = '', $range = 2) { $showitems = ($range * 2) + 1; global $paged; - + if (get_query_var('paged')) { $paged = get_query_var('paged'); } elseif (get_query_var('page')) { @@ -603,4 +603,5 @@ function cutstr($str, $length, $ellipsis=''){ return $cut[0].((strlen($cut) \ No newline at end of file diff --git a/wp-content/themes/score/index.php b/wp-content/themes/score/index.php index 87228cc..e4e69ed 100644 --- a/wp-content/themes/score/index.php +++ b/wp-content/themes/score/index.php @@ -1,97 +1,116 @@ - $gp_settings['cats'], + "caller_get_posts" => 1, + "orderby" => $orderby, + "order" => $order, + "gdsr_sort" => $gdsr_sort, + "gdsr_order" => $gdsr_order, + "paged" => $paged, + "posts_per_page" => -1 +); + query_posts($args); -$contador = 0; $urls_video = array(); -?> +$ids_descartados = array(); -
class="shift-down"> - - - post_status == 'private') { if (($current_user->ID != $gp_settings['from_user_id']) && ($current_user->ID != $gp_settings['to_user_id'])) { - continue; // me salto esta dedicatoria + $ids_descartados[] = $post->ID; } - } - - $video = get_post_meta($post->ID, 'ghostpool_dedication_url', true); + } + if ($_ishome) { if ($theme_homepage_not_repeat_videos) { // Si la URL del video ya ha salido en una dedicatoria anterior, me la salto - if (in_array($video, $urls_video)) { - continue; + if (in_array($gp_settings['video'], $urls_video)) { + $ids_descartados[] = $post->ID; } } } - $urls_video[] = $video; - $contador += 1; - ?> - - -
> - - - -
thumbnail-no-wrap"> - - - <?php if(get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) { echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true); } else { echo get_the_title(); } ?> - -
- - - - -
-

- FROM:   - TO: -
- - -
+ + $urls_video[] = $gp_settings['video']; + endwhile; +endif; + +$args = array( + "cat" => $gp_settings['cats'], + "caller_get_posts" => 1, + "orderby" => $orderby, + "order" => $order, + "gdsr_sort" => $gdsr_sort, + "gdsr_order" => $gdsr_order, + "paged" => $paged, + "posts_per_page" => $gp_settings['posts_per_page'], + "post__not_in" => $ids_descartados +); + +query_posts($args); +?> + +
class="shift-down"> +
+ +
> + + +
thumbnail-no-wrap"> + + + <?php if(get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) { echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true); } else { echo get_the_title(); } ?> + +
+ + + + +
+

+ FROM:   + TO: +
+ + +
+ + + - - + -

- - +
- \ No newline at end of file diff --git a/wp-content/themes/score/lib/scripts/custom.php b/wp-content/themes/score/lib/scripts/custom.php index 65efd32..a1b1657 100644 --- a/wp-content/themes/score/lib/scripts/custom.php +++ b/wp-content/themes/score/lib/scripts/custom.php @@ -1,5 +1,15 @@