Subida a producción de la maqueta

git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@10 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
This commit is contained in:
David Arranz 2012-07-17 10:34:42 +00:00
parent 8acf4ea66a
commit 7b86e371eb
16 changed files with 744 additions and 592 deletions

View File

@ -30,13 +30,11 @@ function bp_dedication_get_dedications_to_user( $user_id ) {
if ( !$user_id )
return false;
$user_info = get_userdata($user_id);
$args = array(
'numberposts' => -1,
'category' => 'dedication',
'meta_key' => 'ghostpool_destination_user_email',
'meta_value' => $user_info->user_email
'meta_key' => 'ghostpool_destination_user',
'meta_value' => $user_id
);
$posts_array = get_posts( $args );

View File

@ -55,13 +55,14 @@ function bp_dedication_create_new_dedication() {
$videoData = array();
$videoID = getVideoID($video_url);
if (checkYoutubeId($videoID) == 1) {
$xml = getVideoDetails($videoID);
if ($xml->title != 'YouTube Videos') {
$videoData['videoURL'] = $video_url;
$videoData['title'] = $xml->title;
$videoData['description'] = $xml->content;
$videoData['thumbnail'] = "http://i.ytimg.com/vi/" . $videoID . "/0.jpg";
$videoData['thumbnail'] = "http://i.ytimg.com/vi/" . $videoID . "/hqdefault.jpg";
}
}
@ -71,7 +72,6 @@ function bp_dedication_create_new_dedication() {
'post_title' => wp_strip_all_tags($title),
'post_content' => '',
'post_category' => array($category->term_id), //Dedication
'post_status' => 'publish',
'post_status' => $post_status,
'post_type' => 'post' //'post',page' or use a custom post type if you want to
);
@ -84,8 +84,8 @@ function bp_dedication_create_new_dedication() {
add_post_meta($post_id, 'ghostpool_dedication_song', $song_name);
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_name', $friend_info->user_login);
add_post_meta($post_id, 'ghostpool_destination_user_email', $friend_info->user_email);
@ -124,7 +124,7 @@ function bp_dedication_create_new_dedication() {
wp_update_attachment_metadata($attach_id, $attach_data);
update_post_meta($post_id, '_thumbnail_id', $attach_id);
} catch (Exception $e) {
$error = '<div id="message" class="error"><p>' . $e->getMessage() . '</p></div>';
throw new Exception('<div id="message" class="error"><p>' . $e->getMessage() . '</p></div>');
return false;
}

View File

@ -2,22 +2,11 @@
function getVideoID($url) {
$url = trim($url);
// make sure url has http on it
if (substr($url, 0, 4) != "http") {
$url = "http://" . $url;
}
// make sure it has the www on it
if (substr($url, 7, 4) != "www.") {
$url = str_replace('http://', 'http://www.', $url);
preg_match('#(\.be/|/embed/|/v/|/watch\?v=)([A-Za-z0-9_-]{5,11})#', $url, $matches);
if(isset($matches[2]) && $matches[2] != '') {
return $matches[2];
}
// extract the youtube ID from the url
if (substr($url, 0, 31) == "http://www.youtube.com/watch?v=") {
$id = substr($url, 31, 11);
}
return $id;
}
function checkYoutubeId($id) {

View File

@ -73,9 +73,10 @@ function bp_dedication_new_dedication() {
if (bp_dedication_create_new_dedication()) {
bp_core_add_message( __( 'Your dedication was created!', 'bp-dedication' ) );
}
bp_core_redirect( bp_loggedin_user_domain() . bp_get_dedication_slug());
} else {
}
}
do_action( 'bp_dedication_new_dedication' );

View File

@ -30,6 +30,12 @@ jQuery(document).ready(function(){
j("#dedicate_to_input").autocomplete(options);
j("#dedicate_to_input").change(function(){
if(j('#dedicate_to_input').val() == '') {
j('#friend_ids').val('');
}
});
var url = '';
j('#video_url').change(function(){

View File

@ -6,16 +6,20 @@ $dedications = bp_dedication_get_dedications_to_user( $bp->displayed_user->id );
<?php foreach ($dedications as $post) : ?>
<?php setup_postdata($post); ?>
<?php include(dirname(__FILE__).'/../../loop-dedication-data.php'); ?>
<?php $gp_settings['image_width'] = 280; ?>
<?php
$gp_settings['thumbnail_width'] = $theme_cat_thumbnail_width;
$gp_settings['thumbnail_height'] = $theme_cat_thumbnail_height;
?>
<?php include(dirname(__FILE__).'/../../loop-dedication-data.php'); ?>
<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'], false); ?>
<?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 {

View File

@ -6,16 +6,21 @@ $dedications = bp_dedication_get_dedications_from_user($bp->displayed_user->id);
<?php foreach ($dedications as $post) : ?>
<?php setup_postdata($post); ?>
<?php
$gp_settings['thumbnail_width'] = $theme_cat_thumbnail_width;
$gp_settings['thumbnail_height'] = $theme_cat_thumbnail_height;
?>
<?php include(dirname(__FILE__).'/../../loop-dedication-data.php'); ?>
<?php $gp_settings['image_width'] = 280; ?>
<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'], false); ?>
<?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 {

View File

@ -34,8 +34,8 @@ 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_email = get_post_meta($post->ID, 'ghostpool_destination_user_email', true);
$to_user = get_user_by ('email', $to_user_email);
$to_user_id = get_post_meta($post->ID, 'ghostpool_destination_user', 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>
@ -43,7 +43,7 @@ query_posts($args);
<span>TO: <?php echo bp_core_get_userlink($to_user->ID); ?></span>
<?php } else { ?>
<?php gp_the_flag('', 24); ?>
<span>TO: <?php echo get_post_meta($post->ID, 'ghostpool_destination_user_name', true); ?></span>
<span>TO: <?php echo $to_user->user_nicename; ?></span>
<?php } ?>
</div>
<!--End Post Text-->

View File

@ -31,7 +31,7 @@ function gp_update_notifier_menu() {
}
}
}
add_action('admin_menu', 'gp_update_notifier_menu');
//add_action('admin_menu', 'gp_update_notifier_menu');
@ -51,7 +51,7 @@ function gp_update_notifier_bar_menu() {
}
}
}
add_action( 'admin_bar_menu', 'gp_update_notifier_bar_menu', 1000 );
//add_action( 'admin_bar_menu', 'gp_update_notifier_bar_menu', 1000 );

View File

@ -1,6 +1,5 @@
<?php
/*************************** Sidebar Posts Widget ***************************/
/* * ************************* Sidebar Posts Widget ************************** */
add_action('widgets_init', 'sidebar_posts_widgets');
@ -9,11 +8,19 @@ function sidebar_posts_widgets() {
}
class SidebarPosts extends WP_Widget {
function SidebarPosts() {
$widget_ops = array('classname' => 'sidebarposts', 'description' => __('Enhanced display for your sidebar posts.', 'gp_lang'));
$this->WP_Widget('sidebar-posts-widget', __('GP Sidebar Posts', 'gp_lang'), $widget_ops);
}
function string_limit_words($string, $word_limit) {
$words = explode(' ', $string, ($word_limit + 1));
if (count($words) > $word_limit)
array_pop($words);
return implode(' ', $words);
}
function widget($args, $instance) {
global $gp_settings, $post, $wp_query, $paged;
extract($args);
@ -35,13 +42,16 @@ class SidebarPosts extends WP_Widget {
require(ghostpool_inc . 'options.php');
// Begin Widget
echo $before_widget; ?>
echo $before_widget;
?>
<div class="posts-widget">
<?php if ($title) echo $before_title . $title . $after_title;
<?php
if ($title)
echo $before_title . $title . $after_title;
$args=array(
$args = array(
'posts_per_page' => $number,
'gdsr_sort' => $gd_sort,
'gdsr_order' => $gd_order,
@ -56,13 +66,14 @@ class SidebarPosts extends WP_Widget {
// Column Width
$column_width = "300";
if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); $counter++;
if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post();
$counter++;
// Post Type
$gp_settings['post_type'] = get_post_meta($post->ID, 'ghostpool_post_type', true);
// Display First Image
if($images == "First Image") {
if ($images == "First Image") {
$image_counter = $counter == 1;
} else {
$image_counter = "";
@ -72,11 +83,15 @@ class SidebarPosts extends WP_Widget {
<div <?php post_class('post-loop'); ?>>
<!--Begin Image-->
<?php if(has_post_thumbnail() && ($images == "All Images" OR $image_counter)) { ?>
<div class="post-thumbnail<?php if($image_width >= 175) { ?> thumbnail-no-wrap<?php } ?>">
<?php if (has_post_thumbnail() && ($images == "All Images" OR $image_counter)) { ?>
<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); ?>
<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); } else { echo get_the_title(); } ?>" />
<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);
} else {
echo get_the_title();
} ?>" />
</a>
</div>
<?php } ?>
@ -87,37 +102,42 @@ class SidebarPosts extends WP_Widget {
<?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>
<?php } ?>
<?php if($post_artist_song == "Yes") {
<?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);?>
$song = get_post_meta($post->ID, 'ghostpool_dedication_song', true);
$artist_song = $artist . '. ' . $song;
?>
<a href="<?php the_permalink(); ?>" title="<?php echo $artist.'. '.$song; ?>"><span><?php echo $artist;?></span>.&nbsp;<?php echo $song; ?></a>
<a href="<?php the_permalink(); ?>" class="post-artist-song" title="<?php echo $artist_song; ?>"><span><?php echo $artist; ?></span>.&nbsp;<?php echo $song; ?></a>
<?php } ?>
<?php if($post_from_to == "Yes") {
<?php
if ($post_from_to == "Yes") {
$from_user_id = get_the_author_meta('ID');
$to_user_email = get_post_meta($post->ID, 'ghostpool_destination_user_email', true);
$to_user = get_user_by ('email', $to_user_email);?>
$to_user_id = get_post_meta($post->ID, 'ghostpool_destination_user', true);
$to_user = get_user_by('id', $to_user_id);
?>
<div class="post-meta">
<span>FROM: <?php echo bp_core_get_userlink($from_user_id); ?></span>
<?php if ($to_user) {?><span>TO: <?php echo bp_core_get_userlink($to_user->ID); ?></span>
<?php if ($to_user) { ?><span>TO: <?php echo bp_core_get_userlink($to_user->ID); ?></span>
<?php } else { ?>
<span>TO: <?php echo get_post_meta($post->ID, 'ghostpool_destination_user_name', true); ?></span>
<?php } ?>
</div>
<?php } ?>
<?php if($post_cats == "Yes") { ?>
<?php if ($post_cats == "Yes") { ?>
<div class="post-cats"><?php the_category(', '); ?></div>
<?php } ?>
<?php if($post_meta == "Yes") { ?>
<?php if ($post_meta == "Yes") { ?>
<div class="post-meta">
<?php the_time(get_option('date_format')); ?><?php if('open' == $post->comment_status) { ?> - <?php comments_popup_link(__('No Comments', 'gp_lang'), __('1 Comment', 'gp_lang'), __('% Comments', 'gp_lang'), 'comments-link', ''); ?><?php } ?>
<?php the_time(get_option('date_format')); ?><?php if ('open' == $post->comment_status) { ?> - <?php comments_popup_link(__('No Comments', 'gp_lang'), __('1 Comment', 'gp_lang'), __('% Comments', 'gp_lang'), 'comments-link', ''); ?><?php } ?>
</div>
<?php } ?>
@ -130,16 +150,17 @@ class SidebarPosts extends WP_Widget {
<?php endwhile; ?>
<br class="clear"/>
<?php echo $after_text ."\n"; ?>
<?php endif; $wp_query = null; $wp_query = $temp; wp_reset_query(); ?>
<?php echo $after_text . "\n"; ?>
<?php endif;
$wp_query = null;
$wp_query = $temp;
wp_reset_query(); ?>
</div>
<?php
echo $after_widget;
// End Widget
}
function update($new_instance, $old_instance) {
@ -181,7 +202,8 @@ class SidebarPosts extends WP_Widget {
'gd_order' => 'desc',
'after_text' => ''
);
$instance = wp_parse_args((array) $instance, $defaults); ?>
$instance = wp_parse_args((array) $instance, $defaults);
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'gp_lang'); ?>:</label>
@ -198,9 +220,15 @@ class SidebarPosts extends WP_Widget {
<p>
<label for="images"><?php _e('Images', 'gp_lang'); ?>:</label>
<select id="images" name="images">
<option value="<?php _e('All Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('All Images', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('All Images', 'gp_lang'); ?></option>
<option value="<?php _e('First Image', 'gp_lang'); ?>"<?php if ($instance['images'] == __('First Image', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('First Image', 'gp_lang'); ?></option>
<option value="<?php _e('No Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('No Images', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No Images', 'gp_lang'); ?></option>
<option value="<?php _e('All Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('All Images', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('All Images', 'gp_lang'); ?></option>
<option value="<?php _e('First Image', 'gp_lang'); ?>"<?php if ($instance['images'] == __('First Image', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('First Image', 'gp_lang'); ?></option>
<option value="<?php _e('No Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('No Images', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No Images', 'gp_lang'); ?></option>
</select>
</p>
<p>
@ -214,56 +242,82 @@ class SidebarPosts extends WP_Widget {
<p>
<label for="post_title"><?php _e('Display Post Title', 'gp_lang'); ?>:</label>
<select id="post_title" name="post_title">
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_title'] == __('Yes', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_title'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_title'] == __('Yes', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_title'] == __('No', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="post_artist_song"><?php _e('Display Post Artist and Song', 'gp_lang'); ?>:</label>
<select id="post_artist_song" name="post_artist_song">
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_artist_song'] == __('Yes', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_artist_song'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_artist_song'] == __('Yes', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_artist_song'] == __('No', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="post_from_to"><?php _e('Display Post From and To', 'gp_lang'); ?>:</label>
<select id="post_from_to" name="post_from_to">
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_from_to'] == __('Yes', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_from_to'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_from_to'] == __('Yes', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_from_to'] == __('No', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="<?php echo $this->get_field_id( 'after_text' ); ?>"><?php _e('After HTML text', 'gp_lang'); ?>:</label>
<textarea id="<?php echo $this->get_field_id( 'after_text' ); ?>" name="<?php echo $this->get_field_name( 'after_text' ); ?>" style="width:100%;height:100px;"><?php echo $instance['after_text']; ?></textarea>
<label for="<?php echo $this->get_field_id('after_text'); ?>"><?php _e('After HTML text', 'gp_lang'); ?>:</label>
<textarea id="<?php echo $this->get_field_id('after_text'); ?>" name="<?php echo $this->get_field_name('after_text'); ?>" style="width:100%;height:100px;"><?php echo $instance['after_text']; ?></textarea>
</p>
<p>
<label for="post_cats"><?php _e('Display Post Categories', 'gp_lang'); ?>:</label>
<select id="post_cats" name="post_cats">
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('Yes', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('Yes', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('No', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="post_meta"><?php _e('Display Post Meta', 'gp_lang'); ?>:</label>
<select id="post_meta" name="post_meta">
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('Yes', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('Yes', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('No', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="gd_sort"><?php _e('Sort By', 'gp_lang'); ?>:</label>
<select id="gd_sort" name="gd_sort">
<option value="date"<?php if ($instance['gd_sort'] == __('date', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Date', 'gp_lang'); ?></option>
<option value="date"<?php if ($instance['gd_sort'] == __('date', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Date', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="gd_order"><?php _e('Order', 'gp_lang'); ?>:</label>
<select id="gd_order" name="gd_order">
<option value="desc"<?php if ($instance['gd_order'] == "desc"){ echo ' selected="selected"'; } ?>><?php _e('Descending', 'gp_lang'); ?></option>
<option value="asc"<?php if ($instance['gd_order'] == "asc"){ echo ' selected="selected"'; } ?>><?php _e('Ascending', 'gp_lang'); ?></option>
<option value="desc"<?php if ($instance['gd_order'] == "desc") {
echo ' selected="selected"';
} ?>><?php _e('Descending', 'gp_lang'); ?></option>
<option value="asc"<?php if ($instance['gd_order'] == "asc") {
echo ' selected="selected"';
} ?>><?php _e('Ascending', 'gp_lang'); ?></option>
</select>
</p>
@ -272,18 +326,18 @@ class SidebarPosts extends WP_Widget {
<?php
}
}
}
/* * ************************* Footer Posts Widget ************************** */
/*************************** Footer Posts Widget ***************************/
add_action('widgets_init', 'footer_posts_widgets');
add_action('widgets_init', 'footer_posts_widgets');
function footer_posts_widgets() {
function footer_posts_widgets() {
register_widget('FooterPosts');
}
}
class FooterPosts extends WP_Widget {
class FooterPosts extends WP_Widget {
function FooterPosts() {
$widget_ops = array('classname' => 'footerposts', 'description' => __('Enhanced display for your footer posts.', 'gp_lang'));
$this->WP_Widget('footer-posts-widget', __('GP Footer Posts', 'gp_lang'), $widget_ops);
@ -307,13 +361,16 @@ class FooterPosts extends WP_Widget {
require(ghostpool_inc . 'options.php');
// Begin Widget
echo $before_widget; ?>
echo $before_widget;
?>
<div class="posts-widget">
<?php if ($title) echo $before_title . $title . $after_title;
<?php
if ($title)
echo $before_title . $title . $after_title;
$args=array(
$args = array(
'posts_per_page' => $number,
'gdsr_sort' => $gd_sort,
'gdsr_order' => $gd_order,
@ -326,116 +383,115 @@ class FooterPosts extends WP_Widget {
$wp_query->query($args);
// Widget Width
if(is_active_sidebar('footer-1') && is_active_sidebar('footer-2') && is_active_sidebar('footer-3') && is_active_sidebar('footer-4')) {
if (is_active_sidebar('footer-1') && is_active_sidebar('footer-2') && is_active_sidebar('footer-3') && is_active_sidebar('footer-4')) {
$column_width = "207.5";
}
elseif(is_active_sidebar('footer-1') && is_active_sidebar('footer-2') && is_active_sidebar('footer-3')) {
} elseif (is_active_sidebar('footer-1') && is_active_sidebar('footer-2') && is_active_sidebar('footer-3')) {
$column_width = "286.6";
}
elseif(is_active_sidebar('footer-1') && is_active_sidebar('footer-2')) {
} elseif (is_active_sidebar('footer-1') && is_active_sidebar('footer-2')) {
$column_width = "445";
}
elseif(is_active_sidebar('footer-1')) {
} elseif (is_active_sidebar('footer-1')) {
$column_width = "920";
}
if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); $counter++;
if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post();
$counter++;
// Post Type
$gp_settings['post_type'] = get_post_meta($post->ID, 'ghostpool_post_type', true);
if(defined('STARRATING_INSTALLED')) {
if (defined('STARRATING_INSTALLED')) {
$gp_gdsr = wp_gdsr_rating_article();
// Site Score Colors
if($gp_gdsr->review <= $theme_score_range_2) {
$site_score_color = ' style="background: '.$theme_site_score_color_1.';"';
} elseif($gp_gdsr->review >= $theme_score_range_3 && $gp_gdsr->review <= $theme_score_range_4) {
$site_score_color = ' style="background: '.$theme_site_score_color_2.';"';
} elseif($gp_gdsr->review >= $theme_score_range_5 && $gp_gdsr->review <= $theme_score_range_6) {
$site_score_color = ' style="background: '.$theme_site_score_color_3.';"';
} elseif($gp_gdsr->review >= $theme_score_range_7) {
$site_score_color = ' style="background: '.$theme_site_score_color_4.';"';
if ($gp_gdsr->review <= $theme_score_range_2) {
$site_score_color = ' style="background: ' . $theme_site_score_color_1 . ';"';
} elseif ($gp_gdsr->review >= $theme_score_range_3 && $gp_gdsr->review <= $theme_score_range_4) {
$site_score_color = ' style="background: ' . $theme_site_score_color_2 . ';"';
} elseif ($gp_gdsr->review >= $theme_score_range_5 && $gp_gdsr->review <= $theme_score_range_6) {
$site_score_color = ' style="background: ' . $theme_site_score_color_3 . ';"';
} elseif ($gp_gdsr->review >= $theme_score_range_7) {
$site_score_color = ' style="background: ' . $theme_site_score_color_4 . ';"';
}
// User Score Colors
if($gp_gdsr->rating <= $theme_score_range_2) {
$user_score_color = ' style="background: '.$theme_user_score_color_1.';"';
} elseif($gp_gdsr->rating >= $theme_score_range_3 && $gp_gdsr->rating <= $theme_score_range_4) {
$user_score_color = ' style="background: '.$theme_user_score_color_2.';"';
} elseif($gp_gdsr->rating >= $theme_score_range_5 && $gp_gdsr->rating <= $theme_score_range_6) {
$user_score_color = ' style="background: '.$theme_user_score_color_3.';"';
} elseif($gp_gdsr->rating >= $theme_score_range_7) {
$user_score_color = ' style="background: '.$theme_user_score_color_4.';"';
if ($gp_gdsr->rating <= $theme_score_range_2) {
$user_score_color = ' style="background: ' . $theme_user_score_color_1 . ';"';
} elseif ($gp_gdsr->rating >= $theme_score_range_3 && $gp_gdsr->rating <= $theme_score_range_4) {
$user_score_color = ' style="background: ' . $theme_user_score_color_2 . ';"';
} elseif ($gp_gdsr->rating >= $theme_score_range_5 && $gp_gdsr->rating <= $theme_score_range_6) {
$user_score_color = ' style="background: ' . $theme_user_score_color_3 . ';"';
} elseif ($gp_gdsr->rating >= $theme_score_range_7) {
$user_score_color = ' style="background: ' . $theme_user_score_color_4 . ';"';
}
}
// Display First Image
if($images == "First Image") {
if ($images == "First Image") {
$image_counter = $counter == 1;
} else {
$image_counter = "";
}
// Post Text Width
if(!has_post_thumbnail() OR $images == "No Images" OR ($images == "First Image" && !$image_counter) OR $image_width >= 175) {
if (!has_post_thumbnail() OR $images == "No Images" OR ($images == "First Image" && !$image_counter) OR $image_width >= 175) {
$post_text_width = $column_width;
} else {
$post_text_width = $column_width - $image_width - 17;
}
// Post Left Width
if($gp_settings['post_type'] == "Review" && ($score_type == "Site Score" && $gp_gdsr->review > 0) OR ($score_type == "User Score" && $gp_settings['user_voting'] != "Users cannot vote") OR ($score_type == "Site & User Score" && ($gp_gdsr->review > 0 OR $gp_settings['user_voting'] != "Users cannot vote"))) {
if ($gp_settings['post_type'] == "Review" && ($score_type == "Site Score" && $gp_gdsr->review > 0) OR ($score_type == "User Score" && $gp_settings['user_voting'] != "Users cannot vote") OR ($score_type == "Site & User Score" && ($gp_gdsr->review > 0 OR $gp_settings['user_voting'] != "Users cannot vote"))) {
$post_left_width = $post_text_width - 49;
} else {
$post_left_width = $post_text_width;
}
?>
<div <?php post_class('post-loop'); ?>>
<!--Begin Image-->
<?php if(has_post_thumbnail() && ($images == "All Images" OR $image_counter)) { ?>
<div class="post-thumbnail<?php if($image_width >= 175) { ?> thumbnail-no-wrap<?php } ?>">
<?php if($gp_settings['post_type'] == "Video") { ?><span class="video-icon"></span><?php } ?>
<?php if (has_post_thumbnail() && ($images == "All Images" OR $image_counter)) { ?>
<div class="post-thumbnail<?php if ($image_width >= 175) { ?> thumbnail-no-wrap<?php } ?>">
<?php if ($gp_settings['post_type'] == "Video") { ?><span class="video-icon"></span><?php } ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?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); } else { echo get_the_title(); } ?>" />
<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);
} else {
echo get_the_title();
} ?>" />
</a>
</div>
<?php } ?>
<!--End Image-->
<!--Begin Post Text-->
<div class="post-text<?php if($gp_settings['post_type'] == "Review" && ($score_type == "No Scores" OR ($gp_gdsr->review <= 0 && $gp_settings['user_voting'] == "Users cannot vote"))) { ?> hidden<?php } ?>" style="width: <?php echo $post_text_width; ?>px;">
<div class="post-text<?php if ($gp_settings['post_type'] == "Review" && ($score_type == "No Scores" OR ($gp_gdsr->review <= 0 && $gp_settings['user_voting'] == "Users cannot vote"))) { ?> hidden<?php } ?>" style="width: <?php echo $post_text_width; ?>px;">
<div class="left" style="width: <?php echo $post_left_width; ?>px;">
<a href="<?php the_permalink(); ?>" class="post-title" title="<?php the_title(); ?>"><?php the_title(); ?></a>
<?php if($post_cats == "Yes") { ?>
<?php if ($post_cats == "Yes") { ?>
<div class="post-cats"><?php the_category(', '); ?></div>
<?php } ?>
<?php if($post_meta == "Yes") { ?>
<?php if ($post_meta == "Yes") { ?>
<div class="post-meta">
<?php the_time(get_option('date_format')); ?><?php if('open' == $post->comment_status) { ?> - <?php comments_popup_link(__('No Comments', 'gp_lang'), __('1 Comment', 'gp_lang'), __('% Comments', 'gp_lang'), 'comments-link', ''); ?><?php } ?>
<?php the_time(get_option('date_format')); ?><?php if ('open' == $post->comment_status) { ?> - <?php comments_popup_link(__('No Comments', 'gp_lang'), __('1 Comment', 'gp_lang'), __('% Comments', 'gp_lang'), 'comments-link', ''); ?><?php } ?>
</div>
<?php } ?>
</div>
<!--Begin Scores-->
<?php if(defined('STARRATING_INSTALLED') && $gp_settings['post_type'] == "Review" && ($score_type != "No Scores" && ($gp_gdsr->review > 0 OR $gp_settings['user_voting'] != "Users cannot vote"))) { ?>
<?php if (defined('STARRATING_INSTALLED') && $gp_settings['post_type'] == "Review" && ($score_type != "No Scores" && ($gp_gdsr->review > 0 OR $gp_settings['user_voting'] != "Users cannot vote"))) { ?>
<div class="post-scores">
<!--Begin Site Score-->
<?php if($score_type != "User Score" && $gp_gdsr->review > 0) { ?>
<?php if ($score_type != "User Score" && $gp_gdsr->review > 0) { ?>
<div class="site-score"<?php echo $site_score_color; ?>>
<?php echo $gp_gdsr->review; ?>
</div>
@ -443,7 +499,7 @@ class FooterPosts extends WP_Widget {
<!--End Site Score-->
<!--Begin User Score-->
<?php if($score_type != "Site Score" && $gp_settings['user_voting'] != "Users cannot vote") { ?>
<?php if ($score_type != "Site Score" && $gp_settings['user_voting'] != "Users cannot vote") { ?>
<div class="user-score"<?php echo $user_score_color; ?>>
<?php echo $gp_gdsr->rating; ?>
</div>
@ -460,15 +516,17 @@ class FooterPosts extends WP_Widget {
</div>
<?php endwhile; endif; $wp_query = null; $wp_query = $temp; wp_reset_query(); ?>
<?php endwhile;
endif;
$wp_query = null;
$wp_query = $temp;
wp_reset_query(); ?>
</div>
<?php
echo $after_widget;
// End Widget
}
function update($new_instance, $old_instance) {
@ -490,7 +548,8 @@ class FooterPosts extends WP_Widget {
function form($instance) {
$defaults = array('title' => '', 'cats' => '', 'number' => 5, 'images' => __('All Images', 'gp_lang'), 'image_width' => '50', 'image_height' => '0', 'post_cats' => __('Yes', 'gp_lang'), 'score_type' => __('Site Score', 'gp_lang'), 'post_meta' => __('Yes', 'gp_lang'), 'gd_sort' => 'review', 'gd_order' => 'desc');
$instance = wp_parse_args((array) $instance, $defaults); ?>
$instance = wp_parse_args((array) $instance, $defaults);
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'gp_lang'); ?>:</label>
@ -507,9 +566,15 @@ class FooterPosts extends WP_Widget {
<p>
<label for="images"><?php _e('Images', 'gp_lang'); ?>:</label>
<select id="images" name="images">
<option value="<?php _e('All Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('All Images', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('All Images', 'gp_lang'); ?></option>
<option value="<?php _e('First Image', 'gp_lang'); ?>"<?php if ($instance['images'] == __('First Image', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('First Image', 'gp_lang'); ?></option>
<option value="<?php _e('No Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('No Images', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No Images', 'gp_lang'); ?></option>
<option value="<?php _e('All Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('All Images', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('All Images', 'gp_lang'); ?></option>
<option value="<?php _e('First Image', 'gp_lang'); ?>"<?php if ($instance['images'] == __('First Image', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('First Image', 'gp_lang'); ?></option>
<option value="<?php _e('No Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('No Images', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No Images', 'gp_lang'); ?></option>
</select>
</p>
<p>
@ -523,40 +588,68 @@ class FooterPosts extends WP_Widget {
<p>
<label for="post_cats"><?php _e('Display Post Categories', 'gp_lang'); ?>:</label>
<select id="post_cats" name="post_cats">
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('Yes', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('Yes', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('No', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="post_meta"><?php _e('Display Post Meta', 'gp_lang'); ?>:</label>
<select id="post_meta" name="post_meta">
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('Yes', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
<option value="<?php _e('Yes', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('Yes', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Yes', 'gp_lang'); ?></option>
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('No', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="score_type"><?php _e('Score Type', 'gp_lang'); ?>:</label>
<select id="score_type" name="score_type">
<option value="<?php _e('Site Score', 'gp_lang'); ?>" <?php if ($instance['score_type'] == __('Site Score', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Site Score', 'gp_lang'); ?></option>
<option value="<?php _e('User Score', 'gp_lang'); ?>" <?php if ($instance['score_type'] == __('User Score', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('User Score', 'gp_lang'); ?></option>
<option value="<?php _e('Site & User Score', 'gp_lang'); ?>" <?php if ($instance['score_type'] == __('Site & User Score', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Site & User Score', 'gp_lang'); ?></option>
<option value="<?php _e('No Scores', 'gp_lang'); ?>" <?php if ($instance['score_type'] == __('No Scores', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No Scores', 'gp_lang'); ?></option>
<option value="<?php _e('Site Score', 'gp_lang'); ?>" <?php if ($instance['score_type'] == __('Site Score', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Site Score', 'gp_lang'); ?></option>
<option value="<?php _e('User Score', 'gp_lang'); ?>" <?php if ($instance['score_type'] == __('User Score', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('User Score', 'gp_lang'); ?></option>
<option value="<?php _e('Site & User Score', 'gp_lang'); ?>" <?php if ($instance['score_type'] == __('Site & User Score', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Site & User Score', 'gp_lang'); ?></option>
<option value="<?php _e('No Scores', 'gp_lang'); ?>" <?php if ($instance['score_type'] == __('No Scores', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('No Scores', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="gd_sort"><?php _e('Sort By', 'gp_lang'); ?>:</label>
<select id="gd_sort" name="gd_sort">
<option value="date"<?php if ($instance['gd_sort'] == __('date', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('Date', 'gp_lang'); ?></option>
<option value="review"<?php if ($instance['gd_sort'] == 'review'){ echo ' selected="selected"'; } ?>><?php _e('Site Score', 'gp_lang'); ?></option>
<option value="rating"<?php if ($instance['gd_sort'] == 'rating'){ echo ' selected="selected"'; } ?>><?php _e('User Score', 'gp_lang'); ?></option>
<option value="votes"<?php if ($instance['gd_sort'] == 'votes'){ echo ' selected="selected"'; } ?>><?php _e('Votes', 'gp_lang'); ?></option>
<option value="date"<?php if ($instance['gd_sort'] == __('date', 'gp_lang')) {
echo ' selected="selected"';
} ?>><?php _e('Date', 'gp_lang'); ?></option>
<option value="review"<?php if ($instance['gd_sort'] == 'review') {
echo ' selected="selected"';
} ?>><?php _e('Site Score', 'gp_lang'); ?></option>
<option value="rating"<?php if ($instance['gd_sort'] == 'rating') {
echo ' selected="selected"';
} ?>><?php _e('User Score', 'gp_lang'); ?></option>
<option value="votes"<?php if ($instance['gd_sort'] == 'votes') {
echo ' selected="selected"';
} ?>><?php _e('Votes', 'gp_lang'); ?></option>
</select>
</p>
<p>
<label for="gd_order"><?php _e('Order', 'gp_lang'); ?>:</label>
<select id="gd_order" name="gd_order">
<option value="desc"<?php if ($instance['gd_order'] == "desc"){ echo ' selected="selected"'; } ?>><?php _e('Descending', 'gp_lang'); ?></option>
<option value="asc"<?php if ($instance['gd_order'] == "asc"){ echo ' selected="selected"'; } ?>><?php _e('Ascending', 'gp_lang'); ?></option>
<option value="desc"<?php if ($instance['gd_order'] == "desc") {
echo ' selected="selected"';
} ?>><?php _e('Descending', 'gp_lang'); ?></option>
<option value="asc"<?php if ($instance['gd_order'] == "asc") {
echo ' selected="selected"';
} ?>><?php _e('Ascending', 'gp_lang'); ?></option>
</select>
</p>
@ -566,5 +659,4 @@ class FooterPosts extends WP_Widget {
}
}
?>

View File

@ -28,8 +28,9 @@ $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_email'] = get_post_meta($post->ID, 'ghostpool_destination_user_email', true);
$gp_settings['to_user'] = get_user_by ('email', $gp_settings['to_user_email']);
$gp_settings['to_user'] = get_user_by ('id', $gp_settings['to_user_id']);
if ($gp_settings['to_user']) {
$gp_settings['to_flag'] = gp_get_the_flag($gp_settings['to_user']->ID, 24);

View File

@ -8,7 +8,6 @@
*/
?>
<?php get_header( 'buddypress' ); ?>
<div id="content" class="fullwidth">

View File

@ -30,7 +30,7 @@
<?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'], false); ?>
<?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>

View File

@ -360,6 +360,10 @@ ul.navmenu li a.profile {
/*************************** Page/Post ***************************/
.page-title {
border: none;
}
/* Share */
#share-review-link a {
color: #077dc8;
@ -527,8 +531,21 @@ ul.navmenu li a.profile {
float: left;
}
#sidebar-home .widget.top_members a {
color: #bf2d2d;
}
#sidebar-home .widget.top_members h3 {
color: #bf2d2d !important;
font-size: 12px;
text-transform: uppercase;
}
#sidebar-home .widget.top_members .post-text {
text-align: center;
font-size: 12px;
font-weight: bold;
float: none;
}
#sidebar-home .widget.top_members a.button {
@ -537,6 +554,7 @@ ul.navmenu li a.profile {
background: #f4d2e3;
border: 1px solid #eaa5ba;
display: inline-block;
font-size: 14px;
line-height: 14px;
font-weight: bold;
}
@ -544,6 +562,7 @@ ul.navmenu li a.profile {
/* Sidebarposts widget */
#sidebar-home .widget.sidebarposts {
float: right;
overflow: hidden;
}
.widget.top_members img,
@ -560,6 +579,7 @@ ul.navmenu li a.profile {
min-height: 150px;
margin: 0;
padding-bottom: 0;
border: none;
}
.widget.top_members .post-loop .post-meta,
@ -580,7 +600,25 @@ ul.navmenu li a.profile {
.widget.sidebarposts h3,
.widget.sidebarposts .post-loop .post-text {
color: #34a089 !important;
text-align: center;
text-align: left;
font-size: 12px;
}
.widget.sidebarposts a {
color: #34a089 !important;
}
.widget.sidebarposts a span {
font-weight: bold;
}
.widget.sidebarposts .post-loop .post-meta {
color: #34a089;
white-space: nowrap;
}
.widget.sidebarposts .post-loop .post-meta span a {
font-weight: bold;
}
.widget.sidebarposts a.button {
@ -594,7 +632,24 @@ ul.navmenu li a.profile {
font-weight: bold;
}
.widget.sidebarposts .post-text .post-artist-song {
white-space: nowrap;
}
.widget.widget_specialrecentposts {
}
.widget.widget_specialrecentposts h4 {
font-size: 13px;
line-height: 110%;
font-family: Georgia, "Times New Roman", Times, serif;
}
.srp-widget-singlepost {
border: none !important;
margin: 0 !important;
}
/*************************** Page Navigation ***************************/
@ -723,10 +778,12 @@ h3.comments {
.category-dedication.post-loop {
text-align: left;
max-height:280px;
min-height:280px;
max-height:220px;
min-height:220px;
border-bottom: 0;
width: 32% !important;
margin: 0 0 10px 0;
padding: 0;
padding-right: 1%;
}

View File

@ -53,6 +53,7 @@ if (have_posts()) {
$from_user_id = get_the_author_meta('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);
// Usuario actual puede ver la dedicatoria?
if (get_post_status($post-ID) == 'private') {
@ -102,7 +103,6 @@ if (have_posts()) {
?>
<span>FROM: <?php echo bp_core_get_userlink($from_user_id); ?></span>
<?php
$to_user = get_user_by ('email', $to_user_email);
if ($to_user) {
gp_the_flag($to_user->ID);
?><span>TO: <?php echo bp_core_get_userlink($to_user->ID); ?></span>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB