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 (!in_array(bp_current_component(), array("members", "groups"))) { ?>
<?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 require('video-slider.php'); ?>
<?php } ?>
<?php } ?>
@ -123,3 +115,5 @@
<!--Begin Content Wrapper-->
<div id="content-wrapper">

View File

@ -3,7 +3,6 @@
get_header();
global $gp_settings, $post, $current_user;
get_currentuserinfo();
$_ishome = (is_home() OR is_front_page());
?>
@ -37,12 +36,10 @@ if (have_posts()) :
}
}
if ($_ishome) {
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;
}
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;
}
}
@ -66,6 +63,17 @@ query_posts($args);
?>
<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">
<?php if (have_posts()) : while (have_posts()) : the_post(); include('loop-dedication-data.php'); ?>
<div <?php post_class('post-loop'); ?>>

View File

@ -60,6 +60,7 @@ class SidebarPosts extends WP_Widget {
$column_width = "300";
if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post();
include(dirname(__FILE__).'/../../../loop-dedication-data.php');
$counter++;
// Post Type
@ -74,14 +75,13 @@ class SidebarPosts extends WP_Widget {
?>
<div <?php post_class('post-loop'); ?>>
<!--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 } ?>">
<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)) {
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 {
echo get_the_title();
} ?>" />
@ -92,37 +92,28 @@ class SidebarPosts extends WP_Widget {
<!--Begin Post Text-->
<div class="post-text">
<?php if ($post_title == "Yes") { ?>
<a href="<?php the_permalink(); ?>" class="post-title" title="<?php the_title(); ?>"><?php the_title(); ?></a>
<?php } ?>
<?php
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
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">
<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/>
<?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>
<?php } else { ?>
<span>TO: <?php echo get_post_meta($post->ID, 'ghostpool_destination_email', true); ?></span>
<?php } ?>
<span>FROM: <?php echo $gp_settings['from_user_link']; ?></span><br/>
<span>TO: <?php echo $gp_settings['to_user_link']; ?></span>
</div>
<?php } ?>

View File

@ -410,7 +410,7 @@ ul.navmenu li a.logout:hover {
#dedicationComments_container {
display: inline-block;
width: 58.51% !important;
width: 73.51% !important;
}
#dedicationComments_container #comments {
@ -596,7 +596,7 @@ ul.navmenu li a.logout:hover {
}
#sidebar-home {
width: 41.49% !important;
width: 26.49% !important;
}
/* Homepage Widget Styling */
@ -611,7 +611,6 @@ ul.navmenu li a.logout:hover {
border: 0px;
padding: 0;
margin: 0;
}
.widget img {
@ -655,47 +654,40 @@ ul.navmenu li a.logout:hover {
}
/* Sidebarposts widget */
#sidebar-home .widget.sidebarposts {
float: right;
overflow: hidden;
#sidebar .widget.sidebarposts {
}
.widget.top_members img,
.widget.sidebarposts img {
#sidebar .widget.sidebarposts h3,
#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;
border: 0;
margin: 5px 0;
margin: 0;
}
.widget.top_members .post-loop,
.widget.sidebarposts .post-loop {
#sidebar .widget.sidebarposts .post-loop {
width: 100% !important;
min-height: 150px;
min-height: 88px;
margin: 0;
padding-bottom: 0;
border: none;
}
.widget.top_members .post-loop .post-meta,
.widget.sidebarposts .post-loop .post-meta {
margin: 0;
#sidebar .widget.sidebarposts .post-loop .post-text {
float: right;
width: 58%;
overflow: hidden;
}
.widget.top_members .post-loop .post-thumbnail,
.widget.sidebarposts .post-loop .post-thumbnail {
margin: 0;
}
.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;
float: left;
width: 75px;
}
.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 {
}
@ -1016,6 +1040,7 @@ h3.comments {
#respond.homepage textarea {
height: 90px !important;
width: 100%;
}
#respond h3 {