2012-07-28 12:07:58 +00:00
|
|
|
<?php
|
2012-07-11 16:28:51 +00:00
|
|
|
|
2012-07-28 12:07:58 +00:00
|
|
|
get_header();
|
2012-07-26 17:33:26 +00:00
|
|
|
global $gp_settings, $post, $current_user;
|
|
|
|
|
get_currentuserinfo();
|
2012-07-11 16:28:51 +00:00
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
2012-07-28 12:07:58 +00:00
|
|
|
//$args = "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=-1";
|
|
|
|
|
$args = array(
|
|
|
|
|
"cat" => $gp_settings['cats'],
|
2012-08-08 19:54:42 +00:00
|
|
|
"ignore_sticky_posts" => 1,
|
2012-07-28 12:07:58 +00:00
|
|
|
"orderby" => $orderby,
|
|
|
|
|
"order" => $order,
|
|
|
|
|
"paged" => $paged,
|
|
|
|
|
"posts_per_page" => -1
|
|
|
|
|
);
|
|
|
|
|
|
2012-07-11 16:28:51 +00:00
|
|
|
query_posts($args);
|
2012-07-25 16:20:32 +00:00
|
|
|
$urls_video = array();
|
2012-07-28 12:07:58 +00:00
|
|
|
$ids_descartados = array();
|
2012-07-26 14:33:47 +00:00
|
|
|
|
2012-07-28 12:07:58 +00:00
|
|
|
if (have_posts()) :
|
|
|
|
|
while (have_posts()) :
|
|
|
|
|
the_post();
|
|
|
|
|
include('loop-dedication-data.php');
|
|
|
|
|
|
2012-07-24 20:45:57 +00:00
|
|
|
// Usuario actual puede ver la dedicatoria?
|
|
|
|
|
if ($post->post_status == 'private') {
|
2012-07-26 17:33:26 +00:00
|
|
|
if (($current_user->ID != $gp_settings['from_user_id']) && ($current_user->ID != $gp_settings['to_user_id'])) {
|
2012-07-28 12:07:58 +00:00
|
|
|
$ids_descartados[] = $post->ID;
|
2012-07-24 20:45:57 +00:00
|
|
|
}
|
2012-07-28 12:07:58 +00:00
|
|
|
}
|
|
|
|
|
|
2012-07-31 09:51:22 +00:00
|
|
|
if ($theme_homepage_not_repeat_videos) {
|
|
|
|
|
// Si la URL del video ya ha salido en una dedicatoria anterior, me la salto
|
|
|
|
|
if (in_array($gp_settings['video'], $urls_video)) {
|
|
|
|
|
$ids_descartados[] = $post->ID;
|
2012-07-25 16:20:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
2012-07-28 12:07:58 +00:00
|
|
|
|
|
|
|
|
$urls_video[] = $gp_settings['video'];
|
|
|
|
|
endwhile;
|
|
|
|
|
endif;
|
|
|
|
|
|
|
|
|
|
$args = array(
|
|
|
|
|
"cat" => $gp_settings['cats'],
|
2012-08-08 19:54:42 +00:00
|
|
|
"ignore_sticky_posts" => 1,
|
2012-07-28 12:07:58 +00:00
|
|
|
"orderby" => $orderby,
|
|
|
|
|
"order" => $order,
|
|
|
|
|
"paged" => $paged,
|
|
|
|
|
"posts_per_page" => $gp_settings['posts_per_page'],
|
|
|
|
|
"post__not_in" => $ids_descartados
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
query_posts($args);
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<div id="content"<?php if($gp_settings['dropdown_filter'] == "0") { ?> class="shift-down"<?php } ?>>
|
2012-07-31 09:51:22 +00:00
|
|
|
|
|
|
|
|
<div id="precontent-wrapper">
|
|
|
|
|
<div id="dedicationComments_container" class="columns two first text-left"> </div>
|
|
|
|
|
<div id="sidebar-home" class="columns two last text-left">
|
|
|
|
|
<?php dynamic_sidebar('homepage-1'); ?>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
|
|
|
|
|
|
|
2012-07-30 16:21:31 +00:00
|
|
|
<div class="contentInner">
|
2012-07-28 12:07:58 +00:00
|
|
|
<?php if (have_posts()) : while (have_posts()) : the_post(); include('loop-dedication-data.php'); ?>
|
|
|
|
|
<div <?php post_class('post-loop'); ?>>
|
|
|
|
|
<!--Begin Image-->
|
|
|
|
|
<?php if(has_post_thumbnail()) { ?>
|
2012-08-23 16:50:24 +00:00
|
|
|
<div class="post-thumbnail<?php if($gp_settings['image_wrap'] == "Disable") { ?> thumbnail-no-wrap<?php } ?>">
|
|
|
|
|
|
2012-07-28 12:07:58 +00:00
|
|
|
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
|
2012-08-23 16:50:24 +00:00
|
|
|
<?php if (($theme_show_new_label) && ($gp_settings['unreaded'])) { ?><span class="new-label"></span><?php } ?>
|
2012-07-28 12:07:58 +00:00
|
|
|
<?php $image = vt_resize(get_post_thumbnail_id(), '', $gp_settings['image_width'], $gp_settings['image_height'], true); ?>
|
2012-08-08 19:54:42 +00:00
|
|
|
<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(); } ?>" />
|
2012-07-28 12:07:58 +00:00
|
|
|
</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>
|
2012-08-09 15:38:05 +00:00
|
|
|
<?php echo $gp_settings['to_flag']; ?>
|
|
|
|
|
<span>TO: <?php echo $gp_settings['to_user_link']; ?></span>
|
2012-07-28 12:07:58 +00:00
|
|
|
</div>
|
|
|
|
|
<!--End Post Text-->
|
|
|
|
|
|
|
|
|
|
</div>
|
2012-07-11 16:28:51 +00:00
|
|
|
<?php endwhile; ?>
|
|
|
|
|
|
2012-07-28 12:07:58 +00:00
|
|
|
<?php
|
2012-07-30 16:21:31 +00:00
|
|
|
if($gp_settings['pagination'] == "0") {
|
|
|
|
|
gp_ajax_pagination();
|
2012-07-28 12:07:58 +00:00
|
|
|
} else { ?>
|
|
|
|
|
<div class="more-posts">
|
2012-07-26 17:33:26 +00:00
|
|
|
<?php
|
2012-07-28 12:07:58 +00:00
|
|
|
$category_id = get_cat_ID( DEDICATION_CATEGORY_SLUG );
|
|
|
|
|
$category_link = get_category_link( $category_id );
|
2012-07-30 16:21:31 +00:00
|
|
|
?>
|
2012-07-28 12:07:58 +00:00
|
|
|
<a href="<?php echo esc_url( $category_link ); ?>" class="read-more" title="<?php _e('See More', 'gp_lang'); ?>"><?php _e('See More', 'gp_lang'); ?> »</a>
|
|
|
|
|
</div>
|
|
|
|
|
<?php } ?>
|
2012-07-11 16:28:51 +00:00
|
|
|
|
2012-07-28 12:07:58 +00:00
|
|
|
<?php if($gp_settings['dropdown_filter'] == "0") { require_once('dropdown-filter.php'); } ?>
|
2012-07-11 16:28:51 +00:00
|
|
|
<?php else : ?>
|
|
|
|
|
<h4><?php _e('Try searching for a different term.', 'gp_lang'); ?></h4>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php wp_reset_query(); ?>
|
2012-07-28 12:07:58 +00:00
|
|
|
</div>
|
2012-07-11 16:28:51 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<?php get_sidebar(); ?>
|
|
|
|
|
<?php get_footer(); ?>
|