Tarea #961 -> La sección Top 10 muestra los 10 videos y no sólo 1

git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@55 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
This commit is contained in:
David Arranz 2012-07-31 09:51:22 +00:00
parent 5946c0b8ed
commit 64caa1fe5a
4 changed files with 89 additions and 71 deletions

View File

@ -105,15 +105,7 @@
<?php if( (is_user_logged_in()) && (is_home() || is_front_page())) { ?> <?php if( (is_user_logged_in()) && (is_home() || is_front_page())) { ?>
<?php if (!in_array(bp_current_component(), array("members", "groups"))) { ?> <?php if (!in_array(bp_current_component(), array("members", "groups"))) { ?>
<?php require('video-slider.php'); ?> <?php require('video-slider.php'); ?>
<div id="precontent-wrapper">
<div id="dedicationComments_container" class="columns two first text-left">&nbsp;</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>
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
@ -122,4 +114,6 @@
<?php /*require('social.php');*/ ?> <?php /*require('social.php');*/ ?>
<!--Begin Content Wrapper--> <!--Begin Content Wrapper-->
<div id="content-wrapper"> <div id="content-wrapper">

View File

@ -3,7 +3,6 @@
get_header(); get_header();
global $gp_settings, $post, $current_user; global $gp_settings, $post, $current_user;
get_currentuserinfo(); get_currentuserinfo();
$_ishome = (is_home() OR is_front_page());
?> ?>
@ -37,12 +36,10 @@ if (have_posts()) :
} }
} }
if ($_ishome) { if ($theme_homepage_not_repeat_videos) {
if ($theme_homepage_not_repeat_videos) { // Si la URL del video ya ha salido en una dedicatoria anterior, me la salto
// Si la URL del video ya ha salido en una dedicatoria anterior, me la salto if (in_array($gp_settings['video'], $urls_video)) {
if (in_array($gp_settings['video'], $urls_video)) { $ids_descartados[] = $post->ID;
$ids_descartados[] = $post->ID;
}
} }
} }
@ -66,6 +63,17 @@ query_posts($args);
?> ?>
<div id="content"<?php if($gp_settings['dropdown_filter'] == "0") { ?> class="shift-down"<?php } ?>> <div id="content"<?php if($gp_settings['dropdown_filter'] == "0") { ?> class="shift-down"<?php } ?>>
<div id="precontent-wrapper">
<div id="dedicationComments_container" class="columns two first text-left">&nbsp;</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>
<div class="contentInner"> <div class="contentInner">
<?php if (have_posts()) : while (have_posts()) : the_post(); include('loop-dedication-data.php'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); include('loop-dedication-data.php'); ?>
<div <?php post_class('post-loop'); ?>> <div <?php post_class('post-loop'); ?>>

View File

@ -59,7 +59,8 @@ class SidebarPosts extends WP_Widget {
// Column Width // Column Width
$column_width = "300"; $column_width = "300";
if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post(); if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post();
include(dirname(__FILE__).'/../../../loop-dedication-data.php');
$counter++; $counter++;
// Post Type // Post Type
@ -74,14 +75,13 @@ class SidebarPosts extends WP_Widget {
?> ?>
<div <?php post_class('post-loop'); ?>> <div <?php post_class('post-loop'); ?>>
<!--Begin Image--> <!--Begin Image-->
<?php if (has_post_thumbnail() && ($images == "All Images" OR $image_counter)) { ?> <?php if (has_post_thumbnail()) { ?>
<div class="post-thumbnail<?php if ($image_width >= 175) { ?> thumbnail-no-wrap<?php } ?>"> <div class="post-thumbnail<?php if ($image_width >= 175) { ?> thumbnail-no-wrap<?php } ?>">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php $image = vt_resize(get_post_thumbnail_id(), '', $image_width, $image_height, true); ?> <?php $image = vt_resize(get_post_thumbnail_id(), '', $image_width, $image_height, true); ?>
<img src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" alt="<?php if (get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) { <img src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" 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); echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true);
} else { } else {
echo get_the_title(); echo get_the_title();
} ?>" /> } ?>" />
@ -92,37 +92,28 @@ class SidebarPosts extends WP_Widget {
<!--Begin Post Text--> <!--Begin Post Text-->
<div class="post-text"> <div class="post-text">
<?php if ($post_title == "Yes") { ?> <?php if ($post_title == "Yes") { ?>
<a href="<?php the_permalink(); ?>" class="post-title" title="<?php the_title(); ?>"><?php the_title(); ?></a> <a href="<?php the_permalink(); ?>" class="post-title" title="<?php the_title(); ?>"><?php the_title(); ?></a>
<?php } ?> <?php } ?>
<?php <?php
if ($post_artist_song == "Yes") { if ($post_artist_song == "Yes") {
$artist = get_post_meta($post->ID, 'ghostpool_dedication_artist', true);
$song = get_post_meta($post->ID, 'ghostpool_dedication_song', true);
$artist_song = $artist . '. ' . $song;
$artist_song_span = '<span>'.$artist.'</span>'.'. '.$song;
$new_name = cutstr($artist_song_span, 30, '...');
?>
<a href="<?php the_permalink(); ?>" class="post-artist-song" title="<?php echo $artist_song; ?>"><?php echo $new_name; ?></a> $gp_settings['artist_song_span_short'] = cutstr($gp_settings['artist_song_span'], 22, '');
if ($gp_settings['artist_song_span_short'] != $gp_settings['artist_song_span']) {
$gp_settings['artist_song_span_short'] .= '...';
}
?>
<a href="<?php the_permalink(); ?>" class="post-artist-song" title="<?php echo $gp_settings['artist_song']; ?>"><?php echo $gp_settings['artist_song_span_short']; ?></a>
<?php } ?> <?php } ?>
<?php <?php
if ($post_from_to == "Yes") { if ($post_from_to == "Yes") {
$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);
?> ?>
<div class="post-meta"> <div class="post-meta">
<span>FROM: <a href="<?php echo bp_core_get_userlink($from_user_id, false, true); ?>" title="<?php echo bp_core_get_username($from_user_id); ?>"><?php echo bp_core_get_username($from_user_id); ?></a></span><br/> <span>FROM: <?php echo $gp_settings['from_user_link']; ?></span><br/>
<?php if ($to_user) { ?><span>TO: <a href="<?php echo bp_core_get_userlink($to_user->ID, false, true); ?>" title="<?php echo bp_core_get_username($to_user->ID); ?>"><?php echo bp_core_get_username($to_user->ID); ?></a></span> <span>TO: <?php echo $gp_settings['to_user_link']; ?></span>
<?php } else { ?>
<span>TO: <?php echo get_post_meta($post->ID, 'ghostpool_destination_email', true); ?></span>
<?php } ?>
</div> </div>
<?php } ?> <?php } ?>

View File

@ -410,7 +410,7 @@ ul.navmenu li a.logout:hover {
#dedicationComments_container { #dedicationComments_container {
display: inline-block; display: inline-block;
width: 58.51% !important; width: 73.51% !important;
} }
#dedicationComments_container #comments { #dedicationComments_container #comments {
@ -596,7 +596,7 @@ ul.navmenu li a.logout:hover {
} }
#sidebar-home { #sidebar-home {
width: 41.49% !important; width: 26.49% !important;
} }
/* Homepage Widget Styling */ /* Homepage Widget Styling */
@ -610,8 +610,7 @@ ul.navmenu li a.logout:hover {
background: transparent; background: transparent;
border: 0px; border: 0px;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.widget img { .widget img {
@ -655,47 +654,40 @@ ul.navmenu li a.logout:hover {
} }
/* Sidebarposts widget */ /* Sidebarposts widget */
#sidebar-home .widget.sidebarposts { #sidebar .widget.sidebarposts {
float: right;
overflow: hidden;
} }
.widget.top_members img, #sidebar .widget.sidebarposts h3,
.widget.sidebarposts img { #sidebar .widget.sidebarposts .post-loop .post-text {
color: #34a089 !important;
text-align: left;
font-size: 12px;
}
#sidebar .widget.sidebarposts h3 {
background: transparent;
border: 0px;
padding: 0; padding: 0;
border: 0; margin: 0;
margin: 5px 0;
} }
.widget.top_members .post-loop, #sidebar .widget.sidebarposts .post-loop {
.widget.sidebarposts .post-loop {
width: 100% !important; width: 100% !important;
min-height: 150px; min-height: 88px;
margin: 0; margin: 0;
padding-bottom: 0; padding-bottom: 0;
border: none; border: none;
} }
.widget.top_members .post-loop .post-meta, #sidebar .widget.sidebarposts .post-loop .post-text {
.widget.sidebarposts .post-loop .post-meta { float: right;
margin: 0; width: 58%;
overflow: hidden;
} }
.widget.top_members .post-loop .post-thumbnail,
.widget.sidebarposts .post-loop .post-thumbnail { .widget.sidebarposts .post-loop .post-thumbnail {
margin: 0; float: left;
} width: 75px;
.widget.top_members .post-loop .post-thumbnail,
.widget.sidebarposts .post-loop .post-thumbnail {
text-align: center;
}
#sidebar-home .widget.sidebarposts h3,
#sidebar-home .widget.sidebarposts .post-loop .post-text {
color: #34a089 !important;
text-align: left;
font-size: 12px;
} }
.widget.sidebarposts a { .widget.sidebarposts a {
@ -733,6 +725,38 @@ ul.navmenu li a.logout:hover {
} }
.widget.top_members img,
.widget.sidebarposts img {
padding: 0;
border: 0;
margin: 5px 0;
}
.widget.top_members .post-loop {
width: 100% !important;
min-height: 150px;
margin: 0;
padding-bottom: 0;
border: none;
}
.widget.top_members .post-loop .post-meta,
.widget.sidebarposts .post-loop .post-meta {
margin: 0;
}
.widget.top_members .post-loop .post-thumbnail,
.widget.sidebarposts .post-loop .post-thumbnail {
margin: 0;
}
.widget.top_members .post-loop .post-thumbnail {
text-align: center;
}
.widget.widget_specialrecentposts { .widget.widget_specialrecentposts {
} }
@ -1016,6 +1040,7 @@ h3.comments {
#respond.homepage textarea { #respond.homepage textarea {
height: 90px !important; height: 90px !important;
width: 100%;
} }
#respond h3 { #respond h3 {