Tareas #971 -> En el perfil, cargar dedicatorias de las columnas sin cargar otra página
git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@89 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
This commit is contained in:
parent
bbb35ec2e6
commit
8813e37fb0
@ -22,4 +22,5 @@ $gp_settings['thumbnail_height'] = $theme_cat_thumbnail_height;
|
|||||||
|
|
||||||
include(dirname(__FILE__).'/../../post-loop-dedication-template.php');
|
include(dirname(__FILE__).'/../../post-loop-dedication-template.php');
|
||||||
|
|
||||||
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ global $bp, $post, $gp_settings, $paged;
|
|||||||
require(ghostpool_inc . 'options.php');
|
require(ghostpool_inc . 'options.php');
|
||||||
|
|
||||||
$user_id = $bp->displayed_user->id;
|
$user_id = $bp->displayed_user->id;
|
||||||
|
|
||||||
$args = $GLOBALS['wp_query']->query;
|
$args = $GLOBALS['wp_query']->query;
|
||||||
$args['ignore_sticky_posts'] = 1;
|
$args['ignore_sticky_posts'] = 1;
|
||||||
$args['orderby'] = $orderby;
|
$args['orderby'] = $orderby;
|
||||||
@ -16,11 +16,10 @@ $args['author'] = $user_id;
|
|||||||
|
|
||||||
query_posts($args);
|
query_posts($args);
|
||||||
|
|
||||||
_log($args);
|
|
||||||
|
|
||||||
$gp_settings['thumbnail_width'] = $theme_cat_thumbnail_width;
|
$gp_settings['thumbnail_width'] = $theme_cat_thumbnail_width;
|
||||||
$gp_settings['thumbnail_height'] = $theme_cat_thumbnail_height;
|
$gp_settings['thumbnail_height'] = $theme_cat_thumbnail_height;
|
||||||
|
|
||||||
include(dirname(__FILE__).'/../../post-loop-dedication-template.php');
|
include(dirname(__FILE__).'/../../post-loop-dedication-template.php');
|
||||||
|
|
||||||
|
wp_reset_postdata();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -48,10 +48,10 @@ jQuery(document).ready(function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery('.my-account .dedication-profile .home_column_my_dedications a.read-more').live('click', function(e){
|
jQuery('.dedication-profile .home_column_my_dedications a.read-more').live('click', function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
link = jQuery(this).attr('href');
|
link = jQuery(this).attr('href');
|
||||||
jQuery('.my-account .dedication-profile .home_column_my_dedications a.read-more').remove();
|
jQuery('.dedication-profile .home_column_my_dedications a.read-more').remove();
|
||||||
|
|
||||||
jQuery.get(link, function(data) {
|
jQuery.get(link, function(data) {
|
||||||
var kids = jQuery(data).find('#content').children();
|
var kids = jQuery(data).find('#content').children();
|
||||||
@ -60,16 +60,16 @@ jQuery(document).ready(function(){
|
|||||||
jQuery(this).removeClass();
|
jQuery(this).removeClass();
|
||||||
jQuery(this).addClass('home-my-dedications post-loop');
|
jQuery(this).addClass('home-my-dedications post-loop');
|
||||||
}
|
}
|
||||||
jQuery('.my-account .dedication-profile .home_column_my_dedications').append(jQuery(this));
|
jQuery('.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){
|
jQuery('.dedication-profile .home_column_dedicated_2_me a.read-more').live('click', function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
link = jQuery(this).attr('href');
|
link = jQuery(this).attr('href');
|
||||||
jQuery('.my-account .dedication-profile .home_column_dedicated_2_me a.read-more').remove();
|
jQuery('.dedication-profile .home_column_dedicated_2_me a.read-more').remove();
|
||||||
|
|
||||||
jQuery.get(link, function(data) {
|
jQuery.get(link, function(data) {
|
||||||
var kids = jQuery(data).find('#content').children();
|
var kids = jQuery(data).find('#content').children();
|
||||||
@ -78,7 +78,7 @@ jQuery(document).ready(function(){
|
|||||||
jQuery(this).removeClass();
|
jQuery(this).removeClass();
|
||||||
jQuery(this).addClass('home-dedicated-2-me post-loop');
|
jQuery(this).addClass('home-dedicated-2-me post-loop');
|
||||||
}
|
}
|
||||||
jQuery('.my-account .dedication-profile .home_column_dedicated_2_me').append(jQuery(this));
|
jQuery('.dedication-profile .home_column_dedicated_2_me').append(jQuery(this));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
50
wp-content/themes/score/post-loop-dedication-template.php
Normal file
50
wp-content/themes/score/post-loop-dedication-template.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<div id="content" class="fullwidth<?php if($gp_settings['dropdown_filter'] == "0") { ?> shift-down<?php } ?>">
|
||||||
|
|
||||||
|
<?php if (have_posts()) : while (have_posts()) : the_post(); include('loop-dedication-data.php'); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$displayed_id = bp_displayed_user_id();
|
||||||
|
|
||||||
|
// Usuario actual puede ver la dedicatoria?
|
||||||
|
if ($post->post_status == 'private') {
|
||||||
|
if (($displayed_id != $gp_settings['from_user_id']) && ($displayed_id != $gp_settings['to_user_id'])) {
|
||||||
|
continue; // me salto esta dedicatoria
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div <?php post_class('post-loop'); ?>>
|
||||||
|
|
||||||
|
<!--Begin Image-->
|
||||||
|
<?php if(has_post_thumbnail()) { ?>
|
||||||
|
<div class="post-thumbnail<?php if($gp_settings['image_wrap'] == "Disable") { ?> thumbnail-no-wrap<?php } ?>">
|
||||||
|
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
|
||||||
|
<?php $image = vt_resize(get_post_thumbnail_id(), '', $gp_settings['image_width'], $gp_settings['image_height'], true); ?>
|
||||||
|
<img src="<?php echo $image['url']; ?>" alt="<?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(); } ?>" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<!--End Image-->
|
||||||
|
|
||||||
|
<!--Begin Post Text-->
|
||||||
|
<div class="post-text">
|
||||||
|
<h2><a href="<?php the_permalink(); ?>" title="<?php echo $gp_settings['artist_song']; ?>"><?php echo $gp_settings['artist_song_span_short']; ?></a></h2>
|
||||||
|
<?php echo $gp_settings['from_flag']; ?><span>FROM: <?php echo $gp_settings['from_user_link']; ?></span>
|
||||||
|
<?php echo $gp_settings['to_flag']; ?><span>TO: <?php echo $gp_settings['to_user_link']; ?></span>
|
||||||
|
</div>
|
||||||
|
<!--End Post Text-->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php endwhile; ?>
|
||||||
|
|
||||||
|
<?php gp_ajax_pagination(); ?>
|
||||||
|
|
||||||
|
<?php if($gp_settings['dropdown_filter'] == "0") { require_once('dropdown-filter.php'); } ?>
|
||||||
|
|
||||||
|
<?php else : ?>
|
||||||
|
|
||||||
|
<h4><?php _e('Try searching for a different term.', 'gp_lang'); ?></h4>
|
||||||
|
|
||||||
|
<?php endif; wp_reset_query(); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
Loading…
Reference in New Issue
Block a user