- Subida a producción de la maqueta
- Inicio de página de perfil git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@12 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
This commit is contained in:
parent
00eba73c22
commit
e164a0696d
@ -33,7 +33,7 @@ function bp_dedication_get_dedications_to_user( $user_id ) {
|
||||
$args = array(
|
||||
'numberposts' => -1,
|
||||
'category' => 'dedication',
|
||||
'meta_key' => 'ghostpool_destination_user',
|
||||
'meta_key' => 'ghostpool_destination_user_id',
|
||||
'meta_value' => $user_id
|
||||
);
|
||||
$posts_array = get_posts( $args );
|
||||
|
||||
@ -85,7 +85,7 @@ function bp_dedication_create_new_dedication() {
|
||||
add_post_meta($post_id, 'ghostpool_dedication_url', $videoData['videoURL']);
|
||||
|
||||
$friend_info = get_userdata($friend_ids[1]);
|
||||
add_post_meta($post_id, 'ghostpool_destination_user', $friend_info->ID);
|
||||
add_post_meta($post_id, 'ghostpool_destination_user_id', $friend_info->ID);
|
||||
add_post_meta($post_id, 'ghostpool_destination_user_name', $friend_info->user_login);
|
||||
add_post_meta($post_id, 'ghostpool_destination_user_email', $friend_info->user_email);
|
||||
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* BuddyPress - Users Header
|
||||
*
|
||||
* @package BuddyPress
|
||||
* @subpackage bp-default
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<div class="columns twothirds first text-left">
|
||||
<div id="item-header-avatar" class="columns onefourth first text-left">
|
||||
<a href="<?php bp_get_loggedin_user_link(); ?>"><?php bp_loggedin_user_avatar( 'type=small' ); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="columns threefourths last text-left">
|
||||
<strong><a href="<?php bp_get_loggedin_user_link(); ?>"><?php bp_loggedin_user_fullname(); ?></a></strong><br/>
|
||||
<span class="user-nicename">@<?php bp_loggedin_user_username(); ?></span>
|
||||
<span class="activity"><?php bp_last_activity(bp_loggedin_user_id() ); ?></span>
|
||||
<div id="item-meta">
|
||||
|
||||
<?php if ( bp_is_active( 'activity' ) ) : ?>
|
||||
|
||||
<div id="latest-update">
|
||||
|
||||
<?php /*bp_activity_latest_update( bp_loggedin_user_id() );*/ ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div id="item-buttons">
|
||||
|
||||
<?php do_action( 'bp_member_header_actions' ); ?>
|
||||
|
||||
</div><!-- #item-buttons -->
|
||||
|
||||
<?php
|
||||
/***
|
||||
* If you'd like to show specific profile fields here use:
|
||||
* bp_profile_field_data( 'field=About Me' ); -- Pass the name of the field
|
||||
*/
|
||||
do_action( 'bp_profile_header_meta' );
|
||||
|
||||
?>
|
||||
|
||||
</div><!-- #item-meta -->
|
||||
</div>
|
||||
</div>
|
||||
@ -14,9 +14,6 @@
|
||||
|
||||
<div id="content<?php if ( !bp_is_current_action( 'new-dedication' ) ) { ?> fullwidth<?php } ?>">
|
||||
<div class="padder">
|
||||
|
||||
|
||||
|
||||
<?php do_action('bp_before_member_plugin_template'); ?>
|
||||
|
||||
<div id="item-body" role="main">
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( is_user_logged_in() ) : ?>
|
||||
<?php if(bp_is_home() || bp_is_group()) : ?>
|
||||
<?php if ( $bp->current_component == 'dedications' ) : ?>
|
||||
<div id="header-profile">
|
||||
<?php locate_template( array( 'members/single/small-member-header.php' ), true ); ?>
|
||||
</div>
|
||||
|
||||
@ -34,7 +34,7 @@ query_posts($args);
|
||||
<?php
|
||||
$artist = get_post_meta($post->ID, 'ghostpool_dedication_artist', true);
|
||||
$song = get_post_meta($post->ID, 'ghostpool_dedication_song', true);
|
||||
$to_user_id = get_post_meta($post->ID, 'ghostpool_destination_user', true);
|
||||
$to_user_id = get_post_meta($post->ID, 'ghostpool_destination_user_id', true);
|
||||
$to_user = get_user_by ('id', $to_user_id);
|
||||
?>
|
||||
<h2><a href="<?php the_permalink(); ?>" title="<?php $artist.'. '.$song; ?>"><span><?php echo $artist;?></span>. <?php echo $song; ?></a></h2>
|
||||
|
||||
@ -119,7 +119,7 @@ class SidebarPosts extends WP_Widget {
|
||||
<?php
|
||||
if ($post_from_to == "Yes") {
|
||||
$from_user_id = get_the_author_meta('ID');
|
||||
$to_user_id = get_post_meta($post->ID, 'ghostpool_destination_user', true);
|
||||
$to_user_id = get_post_meta($post->ID, 'ghostpool_destination_user_id', true);
|
||||
$to_user = get_user_by('id', $to_user_id);
|
||||
?>
|
||||
<div class="post-meta">
|
||||
|
||||
@ -28,7 +28,7 @@ $gp_settings['from_user_link'] = bp_core_get_userlink($gp_settings['from_user_id
|
||||
$gp_settings['from_flag'] = gp_get_the_flag($gp_settings['from_user_id']);
|
||||
|
||||
// to user
|
||||
$gp_settings['to_user_id'] = get_post_meta($post->ID, 'ghostpool_destination_user', true);
|
||||
$gp_settings['to_user_id'] = get_post_meta($post->ID, 'ghostpool_destination_user_id', true);
|
||||
$gp_settings['to_user_email'] = get_post_meta($post->ID, 'ghostpool_destination_user_email', true);
|
||||
$gp_settings['to_user'] = get_user_by ('id', $gp_settings['to_user_id']);
|
||||
|
||||
|
||||
@ -10,15 +10,15 @@
|
||||
|
||||
<div class="columns twothirds first text-left">
|
||||
<div id="item-header-avatar" class="columns onefourth first text-left">
|
||||
<a href="<?php echo bp_get_loggedin_user_link(); ?>"><?php bp_loggedin_user_avatar(array('width' => 77, 'height' => 77)); ?></a>
|
||||
<a href="<?php echo bp_user_link(); ?>"><?php bp_displayed_user_avatar(array('width' => 77, 'height' => 77)); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="columns threefourths last text-left">
|
||||
<span class="user-nicename"><a href="<?php echo bp_get_loggedin_user_link(); ?>"><?php bp_loggedin_user_fullname(); ?></a></span>
|
||||
<span class="user-nicename"><a href="<?php echo bp_user_link(); ?>"><?php bp_displayed_user_fullname(); ?></a></span>
|
||||
<div id="item-meta">
|
||||
<?php if (bp_is_active('dedications')) : ?>
|
||||
<div class="my-dedications"><?php _e('My dedications:'); ?> <?php echo $bp->dedications->get_count_dedications_from_user(bp_current_user_id()); ?></div>
|
||||
<div class="dedicated-to-me"><?php _e('Dedicated to me:'); ?> <?php echo $bp->dedications->get_count_dedications_to_user(bp_current_user_id()); ?></div>
|
||||
<div class="my-dedications"><?php _e('My dedications:'); ?> <?php echo $bp->dedications->get_count_dedications_from_user(bp_displayed_user_id()); ?></div>
|
||||
<div class="dedicated-to-me"><?php _e('Dedicated to me:'); ?> <?php echo $bp->dedications->get_count_dedications_to_user(bp_displayed_user_id()); ?></div>
|
||||
<?php endif; ?>
|
||||
</div><!-- #item-meta -->
|
||||
</div>
|
||||
|
||||
@ -62,24 +62,30 @@ if (have_posts()) {
|
||||
}
|
||||
|
||||
$from_user_id = get_the_author_meta('ID');
|
||||
$to_user_id = get_post_meta($post->ID, 'ghostpool_destination_user_id', true);
|
||||
$to_user = get_user_by('id', $to_user_id);
|
||||
$to_user_email = get_post_meta($post->ID, 'ghostpool_destination_user_email', true);
|
||||
$to_user = get_post_meta($post->ID, 'ghostpool_destination_user', true);
|
||||
$displayed_id = bp_displayed_user_id();
|
||||
|
||||
echo "post->ID => " . $post->ID;
|
||||
echo "from_user_id => " . $from_user_id;
|
||||
echo "to_user_id => " . $to_user_id;
|
||||
echo "displayed_id " . $displayed_id;
|
||||
|
||||
// En el perfil del usuario sólo mostrar las dedicadas por él y para él. El resto se descartan.
|
||||
if ( bp_is_active( 'dedications' ) ) {
|
||||
if (($displayed_id != $from_user_id) && ($displayed_id != $to_user_id)) {
|
||||
continue; // me salto esta dedicatoria
|
||||
}
|
||||
}
|
||||
|
||||
// Usuario actual puede ver la dedicatoria?
|
||||
if (get_post_status($post-ID) == 'private') {
|
||||
if (($current_user->ID != $from_user_id) && ($current_user->user_email != $to_user_email)) {
|
||||
if (($current_user->ID != $from_user_id) && ($current_user->ID != $to_user_id)) {
|
||||
continue; // me salto esta dedicatoria
|
||||
}
|
||||
}
|
||||
|
||||
// En el perfil del usuario sólo mostrar las dedicadas por él y para él. El resto se descartan.
|
||||
if ( bp_is_my_profile() ) {
|
||||
if (($current_user->ID != $from_user_id) && ($current_user->user_email != $to_user_email)) {
|
||||
continue; // me salto esta dedicatoria
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$video = get_post_meta($post->ID, 'ghostpool_dedication_url', true);
|
||||
$artist = get_post_meta($post->ID, 'ghostpool_dedication_artist', true);
|
||||
$song = get_post_meta($post->ID, 'ghostpool_dedication_song', true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user