ASong2U_Web/wp-content/themes/score/index.php
david 2d6ed87b55 - Filtro de palabrotas
- Revisión de alta de dedicatoria con usuario e email
- Comprobar en alta de dedicatoria si un email corresponde a un usuario
- Arreglos en los títulos largos
- Corrección del color gris en cabecera, dedicatoria y pie
- Centrado de las columnas del pie
- Problemas en ciertos casos con dedicatorias privadas
- Arreglo del pixelado en avatares de usuario


git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@30 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
2012-07-24 20:45:57 +00:00

88 lines
3.5 KiB
PHP

<?php get_header();
global $gp_settings;
?>
<?php
$args = "cat=".$gp_settings['cats']."&caller_get_posts=1&orderby=$orderby&order=$order&gdsr_sort=$gdsr_sort&gdsr_order=$gdsr_order&paged=$paged";
query_posts($args);
$contador = 0;
?>
<div id="content"<?php if($gp_settings['dropdown_filter'] == "0") { ?> class="shift-down"<?php } ?>>
<?php if (have_posts()) : while (have_posts()) : the_post(); include('loop-data.php'); ?>
<?php
if ($contador == $gp_settings['posts_per_page']) {
break;
}
$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);
$displayed_id = bp_displayed_user_id();
// Usuario actual puede ver la dedicatoria?
if ($post->post_status == 'private') {
if (($current_user->ID != $from_user_id) && ($current_user->ID != $to_user_id)) {
continue; // me salto esta dedicatoria
}
}
$contador += 1;
?>
<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">
<?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_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>.&nbsp;<?php echo $song; ?></a></h2>
<?php if ($to_user) { gp_the_flag($to_user->ID, 24); ?>
<span>TO: <?php echo bp_core_get_userlink($to_user->ID); ?></span>
<?php } else { ?>
<?php gp_the_flag('', 24); ?>
<span>TO: <?php echo $to_user->user_nicename; ?></span>
<?php } ?>
</div>
<!--End Post Text-->
</div>
<?php endwhile; ?>
<?php if($gp_settings['pagination'] == "0") { gp_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; ?>
<?php wp_reset_query(); ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>