From bbb35ec2e68f24509b1baeb44ac1c5910f02ef2c Mon Sep 17 00:00:00 2001 From: david Date: Wed, 8 Aug 2012 18:43:53 +0000 Subject: [PATCH] =?UTF-8?q?Tareas=20#971=20->=20En=20el=20perfil,=20cargar?= =?UTF-8?q?=20dedicatorias=20de=20las=20columnas=20sin=20cargar=20otra=20p?= =?UTF-8?q?=C3=A1gina?= 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@88 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6 --- .../dedications/single/dedicated-2-me.php | 63 +++++++----------- .../single/home-column-dedicated-2-me.php | 5 +- .../single/home-column-my-dedications.php | 7 +- .../themes/score/dedications/single/home.php | 4 +- .../dedications/single/my-dedications.php | 65 +++++++------------ wp-content/themes/score/functions.php | 2 - .../themes/score/lib/scripts/custom.php | 36 ++++++++++ .../themes/score/post-loop-dedication.php | 55 +--------------- 8 files changed, 91 insertions(+), 146 deletions(-) diff --git a/wp-content/themes/score/dedications/single/dedicated-2-me.php b/wp-content/themes/score/dedications/single/dedicated-2-me.php index 14ddae0..371870f 100644 --- a/wp-content/themes/score/dedications/single/dedicated-2-me.php +++ b/wp-content/themes/score/dedications/single/dedicated-2-me.php @@ -1,44 +1,25 @@ displayed_user->id ); + +$user_id = $bp->displayed_user->id; + +$args = $GLOBALS['wp_query']->query; +$args['ignore_sticky_posts'] = 1; +$args['orderby'] = $orderby; +$args['order'] = $order; +$args['paged'] = $paged; +$args['post_status'] = $post_status; +$args['posts_per_page'] = 3; //$gp_settings['posts_per_page']; +$args['category'] = get_cat_id('dedication'); +$args['meta_key'] = 'ghostpool_destination_user_id'; +$args['meta_value'] = $user_id; + +query_posts($args); + +$gp_settings['thumbnail_width'] = $theme_cat_thumbnail_width; +$gp_settings['thumbnail_height'] = $theme_cat_thumbnail_height; + +include(dirname(__FILE__).'/../../post-loop-dedication-template.php'); + ?> - - - - - - - - -
> - - -
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();
-            } ?> - -
- - - - -
-

- - TO: -
- - -
- - - diff --git a/wp-content/themes/score/dedications/single/home-column-dedicated-2-me.php b/wp-content/themes/score/dedications/single/home-column-dedicated-2-me.php index 245c4d6..15bad63 100644 --- a/wp-content/themes/score/dedications/single/home-column-dedicated-2-me.php +++ b/wp-content/themes/score/dedications/single/home-column-dedicated-2-me.php @@ -3,8 +3,7 @@ global $bp, $post, $gp_settings; require(ghostpool_inc . 'options.php'); $from_dedications = bp_dedication_get_dedications_to_user($bp->displayed_user->id); $count = 0; -$dedication_link = bp_core_get_userlink($bp->displayed_user->id, false, true) . $bp->dedications->slug . '/dedicated-2u/'; - +$dedication_link = bp_core_get_userlink($bp->displayed_user->id, false, true) . $bp->dedications->slug . '/dedicated-2u/page/2/'; ?>

displayed_user->id, false, true) .
thumbnail-no-wrap"> - <?php if (get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) {
+                    <img src=" alt="displayed_user->id); $count = 0; -$dedication_link = bp_core_get_userlink($bp->displayed_user->id, false, true) . $bp->dedications->slug . '/my-dedications/'; +$dedication_link = bp_core_get_userlink($bp->displayed_user->id, false, true) . $bp->dedications->slug . '/my-dedications/page/2/'; ?>

displayed_user->id, false, true) . if ($count > 3) {?>
» + displayed_user->id, false, true) .
thumbnail-no-wrap"> - <?php if (get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) {
+                    <img src=" alt="displayed_user->id, false, true) .

- + TO:
diff --git a/wp-content/themes/score/dedications/single/home.php b/wp-content/themes/score/dedications/single/home.php index b6bcb2b..29d891e 100644 --- a/wp-content/themes/score/dedications/single/home.php +++ b/wp-content/themes/score/dedications/single/home.php @@ -1,8 +1,8 @@ -
+
-
+
diff --git a/wp-content/themes/score/dedications/single/my-dedications.php b/wp-content/themes/score/dedications/single/my-dedications.php index 56cfab7..9a1bfb1 100644 --- a/wp-content/themes/score/dedications/single/my-dedications.php +++ b/wp-content/themes/score/dedications/single/my-dedications.php @@ -1,45 +1,26 @@ displayed_user->id); + +$user_id = $bp->displayed_user->id; + +$args = $GLOBALS['wp_query']->query; +$args['ignore_sticky_posts'] = 1; +$args['orderby'] = $orderby; +$args['order'] = $order; +$args['paged'] = $paged; +$args['post_status'] = $post_status; +$args['posts_per_page'] = 3; //$gp_settings['posts_per_page']; +$args['category'] = get_cat_id('dedication'); +$args['author'] = $user_id; + +query_posts($args); + +_log($args); + +$gp_settings['thumbnail_width'] = $theme_cat_thumbnail_width; +$gp_settings['thumbnail_height'] = $theme_cat_thumbnail_height; + +include(dirname(__FILE__).'/../../post-loop-dedication-template.php'); + ?> - - - - - - - - - -
> - - -
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();
-            } ?> - -
- - - - -
-

- - TO: -
- - -
- - - diff --git a/wp-content/themes/score/functions.php b/wp-content/themes/score/functions.php index 15dfeb9..a2be739 100644 --- a/wp-content/themes/score/functions.php +++ b/wp-content/themes/score/functions.php @@ -717,8 +717,6 @@ function asociate_dedications_to_new_user($user_id) { $category_name = 'dedication'; $post_status = array('publish', 'private'); - _log('Email del usuario => ' . $user->user_email); - $args = array( 'post_type' => array('post'), 'posts_per_page' => -1, diff --git a/wp-content/themes/score/lib/scripts/custom.php b/wp-content/themes/score/lib/scripts/custom.php index ee8852d..cad695b 100644 --- a/wp-content/themes/score/lib/scripts/custom.php +++ b/wp-content/themes/score/lib/scripts/custom.php @@ -47,6 +47,42 @@ jQuery(document).ready(function(){ }); }); }); + + jQuery('.my-account .dedication-profile .home_column_my_dedications a.read-more').live('click', function(e){ + e.preventDefault(); + link = jQuery(this).attr('href'); + jQuery('.my-account .dedication-profile .home_column_my_dedications a.read-more').remove(); + + jQuery.get(link, function(data) { + var kids = jQuery(data).find('#content').children(); + jQuery.each(kids, function(){ + if (jQuery(this).hasClass('post-loop')) { + jQuery(this).removeClass(); + jQuery(this).addClass('home-my-dedications post-loop'); + } + jQuery('.my-account .dedication-profile .home_column_my_dedications').append(jQuery(this)); + }); + }); + }); + + + jQuery('.my-account .dedication-profile .home_column_dedicated_2_me a.read-more').live('click', function(e){ + e.preventDefault(); + link = jQuery(this).attr('href'); + jQuery('.my-account .dedication-profile .home_column_dedicated_2_me a.read-more').remove(); + + jQuery.get(link, function(data) { + var kids = jQuery(data).find('#content').children(); + jQuery.each(kids, function(){ + if (jQuery(this).hasClass('post-loop')) { + jQuery(this).removeClass(); + jQuery(this).addClass('home-dedicated-2-me post-loop'); + } + jQuery('.my-account .dedication-profile .home_column_dedicated_2_me').append(jQuery(this)); + }); + }); + }); + }); var aIndex=-1; diff --git a/wp-content/themes/score/post-loop-dedication.php b/wp-content/themes/score/post-loop-dedication.php index d1c8138..421703a 100644 --- a/wp-content/themes/score/post-loop-dedication.php +++ b/wp-content/themes/score/post-loop-dedication.php @@ -19,7 +19,7 @@ query; - $args['caller_get_posts'] = 1; + $args['ignore_sticky_posts'] = 1; $args['orderby'] = $orderby; $args['order'] = $order; $args['gdsr_sort'] = $gdsr_sort; @@ -31,55 +31,4 @@ -
shift-down"> - - - - post_status == 'private') { - if (($displayed_id != $gp_settings['from_user_id']) && ($displayed_id != $gp_settings['to_user_id'])) { - continue; // me salto esta dedicatoria - } - } - - $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: -
- -
- - - - - - - - - -

- - - -
\ No newline at end of file + \ No newline at end of file