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:
parent
8acf4ea66a
commit
7b86e371eb
@ -30,13 +30,11 @@ function bp_dedication_get_dedications_to_user( $user_id ) {
|
|||||||
if ( !$user_id )
|
if ( !$user_id )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$user_info = get_userdata($user_id);
|
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
'numberposts' => -1,
|
'numberposts' => -1,
|
||||||
'category' => 'dedication',
|
'category' => 'dedication',
|
||||||
'meta_key' => 'ghostpool_destination_user_email',
|
'meta_key' => 'ghostpool_destination_user',
|
||||||
'meta_value' => $user_info->user_email
|
'meta_value' => $user_id
|
||||||
);
|
);
|
||||||
$posts_array = get_posts( $args );
|
$posts_array = get_posts( $args );
|
||||||
|
|
||||||
|
|||||||
@ -55,13 +55,14 @@ function bp_dedication_create_new_dedication() {
|
|||||||
|
|
||||||
$videoData = array();
|
$videoData = array();
|
||||||
$videoID = getVideoID($video_url);
|
$videoID = getVideoID($video_url);
|
||||||
|
|
||||||
if (checkYoutubeId($videoID) == 1) {
|
if (checkYoutubeId($videoID) == 1) {
|
||||||
$xml = getVideoDetails($videoID);
|
$xml = getVideoDetails($videoID);
|
||||||
if ($xml->title != 'YouTube Videos') {
|
if ($xml->title != 'YouTube Videos') {
|
||||||
$videoData['videoURL'] = $video_url;
|
$videoData['videoURL'] = $video_url;
|
||||||
$videoData['title'] = $xml->title;
|
$videoData['title'] = $xml->title;
|
||||||
$videoData['description'] = $xml->content;
|
$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_title' => wp_strip_all_tags($title),
|
||||||
'post_content' => '',
|
'post_content' => '',
|
||||||
'post_category' => array($category->term_id), //Dedication
|
'post_category' => array($category->term_id), //Dedication
|
||||||
'post_status' => 'publish',
|
|
||||||
'post_status' => $post_status,
|
'post_status' => $post_status,
|
||||||
'post_type' => 'post' //'post',page' or use a custom post type if you want to
|
'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_song', $song_name);
|
||||||
add_post_meta($post_id, 'ghostpool_dedication_url', $videoData['videoURL']);
|
add_post_meta($post_id, 'ghostpool_dedication_url', $videoData['videoURL']);
|
||||||
|
|
||||||
|
|
||||||
$friend_info = get_userdata($friend_ids[1]);
|
$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_name', $friend_info->user_login);
|
||||||
add_post_meta($post_id, 'ghostpool_destination_user_email', $friend_info->user_email);
|
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);
|
wp_update_attachment_metadata($attach_id, $attach_data);
|
||||||
update_post_meta($post_id, '_thumbnail_id', $attach_id);
|
update_post_meta($post_id, '_thumbnail_id', $attach_id);
|
||||||
} catch (Exception $e) {
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,22 +2,11 @@
|
|||||||
|
|
||||||
function getVideoID($url) {
|
function getVideoID($url) {
|
||||||
$url = trim($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
|
preg_match('#(\.be/|/embed/|/v/|/watch\?v=)([A-Za-z0-9_-]{5,11})#', $url, $matches);
|
||||||
if (substr($url, 7, 4) != "www.") {
|
if(isset($matches[2]) && $matches[2] != '') {
|
||||||
$url = str_replace('http://', 'http://www.', $url);
|
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) {
|
function checkYoutubeId($id) {
|
||||||
|
|||||||
@ -73,9 +73,10 @@ function bp_dedication_new_dedication() {
|
|||||||
|
|
||||||
if (bp_dedication_create_new_dedication()) {
|
if (bp_dedication_create_new_dedication()) {
|
||||||
bp_core_add_message( __( 'Your dedication was created!', 'bp-dedication' ) );
|
bp_core_add_message( __( 'Your dedication was created!', 'bp-dedication' ) );
|
||||||
}
|
|
||||||
|
|
||||||
bp_core_redirect( bp_loggedin_user_domain() . bp_get_dedication_slug());
|
bp_core_redirect( bp_loggedin_user_domain() . bp_get_dedication_slug());
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_action( 'bp_dedication_new_dedication' );
|
do_action( 'bp_dedication_new_dedication' );
|
||||||
|
|||||||
@ -30,6 +30,12 @@ jQuery(document).ready(function(){
|
|||||||
|
|
||||||
j("#dedicate_to_input").autocomplete(options);
|
j("#dedicate_to_input").autocomplete(options);
|
||||||
|
|
||||||
|
j("#dedicate_to_input").change(function(){
|
||||||
|
if(j('#dedicate_to_input').val() == '') {
|
||||||
|
j('#friend_ids').val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var url = '';
|
var url = '';
|
||||||
|
|
||||||
j('#video_url').change(function(){
|
j('#video_url').change(function(){
|
||||||
|
|||||||
@ -6,16 +6,20 @@ $dedications = bp_dedication_get_dedications_to_user( $bp->displayed_user->id );
|
|||||||
|
|
||||||
<?php foreach ($dedications as $post) : ?>
|
<?php foreach ($dedications as $post) : ?>
|
||||||
<?php setup_postdata($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'); ?>>
|
<div <?php post_class('post-loop'); ?>>
|
||||||
<!--Begin Image-->
|
<!--Begin Image-->
|
||||||
<?php if (has_post_thumbnail()) { ?>
|
<?php if (has_post_thumbnail()) { ?>
|
||||||
<div class="post-thumbnail<?php if ($gp_settings['image_wrap'] == "Disable") { ?> thumbnail-no-wrap<?php } ?>">
|
<div class="post-thumbnail<?php if ($gp_settings['image_wrap'] == "Disable") { ?> 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(), '', $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)) {
|
<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);
|
echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -6,16 +6,21 @@ $dedications = bp_dedication_get_dedications_from_user($bp->displayed_user->id);
|
|||||||
|
|
||||||
<?php foreach ($dedications as $post) : ?>
|
<?php foreach ($dedications as $post) : ?>
|
||||||
<?php setup_postdata($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 include(dirname(__FILE__).'/../../loop-dedication-data.php'); ?>
|
||||||
|
|
||||||
<?php $gp_settings['image_width'] = 280; ?>
|
|
||||||
|
|
||||||
<div <?php post_class('post-loop'); ?>>
|
<div <?php post_class('post-loop'); ?>>
|
||||||
<!--Begin Image-->
|
<!--Begin Image-->
|
||||||
<?php if (has_post_thumbnail()) { ?>
|
<?php if (has_post_thumbnail()) { ?>
|
||||||
<div class="post-thumbnail<?php if ($gp_settings['image_wrap'] == "Disable") { ?> thumbnail-no-wrap<?php } ?>">
|
<div class="post-thumbnail<?php if ($gp_settings['image_wrap'] == "Disable") { ?> 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(), '', $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)) {
|
<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);
|
echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -34,8 +34,8 @@ query_posts($args);
|
|||||||
<?php
|
<?php
|
||||||
$artist = get_post_meta($post->ID, 'ghostpool_dedication_artist', true);
|
$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);
|
||||||
$to_user_email = get_post_meta($post->ID, 'ghostpool_destination_user_email', true);
|
$to_user_id = get_post_meta($post->ID, 'ghostpool_destination_user', true);
|
||||||
$to_user = get_user_by ('email', $to_user_email);
|
$to_user = get_user_by ('id', $to_user_id);
|
||||||
?>
|
?>
|
||||||
<h2><a href="<?php the_permalink(); ?>" title="<?php $artist.'. '.$song; ?>"><span><?php echo $artist;?></span>. <?php echo $song; ?></a></h2>
|
<h2><a href="<?php the_permalink(); ?>" title="<?php $artist.'. '.$song; ?>"><span><?php echo $artist;?></span>. <?php echo $song; ?></a></h2>
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ query_posts($args);
|
|||||||
<span>TO: <?php echo bp_core_get_userlink($to_user->ID); ?></span>
|
<span>TO: <?php echo bp_core_get_userlink($to_user->ID); ?></span>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<?php gp_the_flag('', 24); ?>
|
<?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 } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<!--End Post Text-->
|
<!--End Post Text-->
|
||||||
|
|||||||
@ -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 );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/* * ************************* Sidebar Posts Widget ************************** */
|
/* * ************************* Sidebar Posts Widget ************************** */
|
||||||
|
|
||||||
add_action('widgets_init', 'sidebar_posts_widgets');
|
add_action('widgets_init', 'sidebar_posts_widgets');
|
||||||
@ -9,11 +8,19 @@ function sidebar_posts_widgets() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class SidebarPosts extends WP_Widget {
|
class SidebarPosts extends WP_Widget {
|
||||||
|
|
||||||
function SidebarPosts() {
|
function SidebarPosts() {
|
||||||
$widget_ops = array('classname' => 'sidebarposts', 'description' => __('Enhanced display for your sidebar posts.', 'gp_lang'));
|
$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);
|
$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) {
|
function widget($args, $instance) {
|
||||||
global $gp_settings, $post, $wp_query, $paged;
|
global $gp_settings, $post, $wp_query, $paged;
|
||||||
extract($args);
|
extract($args);
|
||||||
@ -35,11 +42,14 @@ class SidebarPosts extends WP_Widget {
|
|||||||
require(ghostpool_inc . 'options.php');
|
require(ghostpool_inc . 'options.php');
|
||||||
|
|
||||||
// Begin Widget
|
// Begin Widget
|
||||||
echo $before_widget; ?>
|
echo $before_widget;
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="posts-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,
|
'posts_per_page' => $number,
|
||||||
@ -56,7 +66,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(); $counter++;
|
if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post();
|
||||||
|
$counter++;
|
||||||
|
|
||||||
// Post Type
|
// Post Type
|
||||||
$gp_settings['post_type'] = get_post_meta($post->ID, 'ghostpool_post_type', true);
|
$gp_settings['post_type'] = get_post_meta($post->ID, 'ghostpool_post_type', true);
|
||||||
@ -76,7 +87,11 @@ class SidebarPosts extends WP_Widget {
|
|||||||
<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)) { 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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -91,17 +106,22 @@ class SidebarPosts extends WP_Widget {
|
|||||||
<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 if($post_artist_song == "Yes") {
|
<?php
|
||||||
|
if ($post_artist_song == "Yes") {
|
||||||
$artist = get_post_meta($post->ID, 'ghostpool_dedication_artist', true);
|
$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>. <?php echo $song; ?></a>
|
<a href="<?php the_permalink(); ?>" class="post-artist-song" title="<?php echo $artist_song; ?>"><span><?php echo $artist; ?></span>. <?php echo $song; ?></a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<?php if($post_from_to == "Yes") {
|
<?php
|
||||||
|
if ($post_from_to == "Yes") {
|
||||||
$from_user_id = get_the_author_meta('ID');
|
$from_user_id = get_the_author_meta('ID');
|
||||||
$to_user_email = get_post_meta($post->ID, 'ghostpool_destination_user_email', true);
|
$to_user_id = get_post_meta($post->ID, 'ghostpool_destination_user', true);
|
||||||
$to_user = get_user_by ('email', $to_user_email);?>
|
$to_user = get_user_by('id', $to_user_id);
|
||||||
|
?>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<span>FROM: <?php echo bp_core_get_userlink($from_user_id); ?></span>
|
<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>
|
||||||
@ -131,15 +151,16 @@ class SidebarPosts extends WP_Widget {
|
|||||||
<?php endwhile; ?>
|
<?php endwhile; ?>
|
||||||
<br class="clear"/>
|
<br class="clear"/>
|
||||||
<?php echo $after_text . "\n"; ?>
|
<?php echo $after_text . "\n"; ?>
|
||||||
<?php endif; $wp_query = null; $wp_query = $temp; wp_reset_query(); ?>
|
<?php endif;
|
||||||
|
$wp_query = null;
|
||||||
|
$wp_query = $temp;
|
||||||
|
wp_reset_query(); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo $after_widget;
|
echo $after_widget;
|
||||||
// End Widget
|
// End Widget
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function update($new_instance, $old_instance) {
|
function update($new_instance, $old_instance) {
|
||||||
@ -181,7 +202,8 @@ class SidebarPosts extends WP_Widget {
|
|||||||
'gd_order' => 'desc',
|
'gd_order' => 'desc',
|
||||||
'after_text' => ''
|
'after_text' => ''
|
||||||
);
|
);
|
||||||
$instance = wp_parse_args((array) $instance, $defaults); ?>
|
$instance = wp_parse_args((array) $instance, $defaults);
|
||||||
|
?>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'gp_lang'); ?>:</label>
|
<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>
|
<p>
|
||||||
<label for="images"><?php _e('Images', 'gp_lang'); ?>:</label>
|
<label for="images"><?php _e('Images', 'gp_lang'); ?>:</label>
|
||||||
<select id="images" name="images">
|
<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('All Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('All Images', 'gp_lang')) {
|
||||||
<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>
|
echo ' selected="selected"';
|
||||||
<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>
|
} ?>><?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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@ -214,22 +242,34 @@ class SidebarPosts extends WP_Widget {
|
|||||||
<p>
|
<p>
|
||||||
<label for="post_title"><?php _e('Display Post Title', 'gp_lang'); ?>:</label>
|
<label for="post_title"><?php _e('Display Post Title', 'gp_lang'); ?>:</label>
|
||||||
<select id="post_title" name="post_title">
|
<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('Yes', 'gp_lang'); ?>"<?php if ($instance['post_title'] == __('Yes', 'gp_lang')) {
|
||||||
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_title'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
|
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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="post_artist_song"><?php _e('Display Post Artist and Song', 'gp_lang'); ?>:</label>
|
<label for="post_artist_song"><?php _e('Display Post Artist and Song', 'gp_lang'); ?>:</label>
|
||||||
<select id="post_artist_song" name="post_artist_song">
|
<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('Yes', 'gp_lang'); ?>"<?php if ($instance['post_artist_song'] == __('Yes', 'gp_lang')) {
|
||||||
<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>
|
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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="post_from_to"><?php _e('Display Post From and To', 'gp_lang'); ?>:</label>
|
<label for="post_from_to"><?php _e('Display Post From and To', 'gp_lang'); ?>:</label>
|
||||||
<select id="post_from_to" name="post_from_to">
|
<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('Yes', 'gp_lang'); ?>"<?php if ($instance['post_from_to'] == __('Yes', 'gp_lang')) {
|
||||||
<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>
|
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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -242,28 +282,42 @@ class SidebarPosts extends WP_Widget {
|
|||||||
<p>
|
<p>
|
||||||
<label for="post_cats"><?php _e('Display Post Categories', 'gp_lang'); ?>:</label>
|
<label for="post_cats"><?php _e('Display Post Categories', 'gp_lang'); ?>:</label>
|
||||||
<select id="post_cats" name="post_cats">
|
<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('Yes', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('Yes', 'gp_lang')) {
|
||||||
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
|
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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="post_meta"><?php _e('Display Post Meta', 'gp_lang'); ?>:</label>
|
<label for="post_meta"><?php _e('Display Post Meta', 'gp_lang'); ?>:</label>
|
||||||
<select id="post_meta" name="post_meta">
|
<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('Yes', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('Yes', 'gp_lang')) {
|
||||||
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
|
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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="gd_sort"><?php _e('Sort By', 'gp_lang'); ?>:</label>
|
<label for="gd_sort"><?php _e('Sort By', 'gp_lang'); ?>:</label>
|
||||||
<select id="gd_sort" name="gd_sort">
|
<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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="gd_order"><?php _e('Order', 'gp_lang'); ?>:</label>
|
<label for="gd_order"><?php _e('Order', 'gp_lang'); ?>:</label>
|
||||||
<select id="gd_order" name="gd_order">
|
<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="desc"<?php if ($instance['gd_order'] == "desc") {
|
||||||
<option value="asc"<?php if ($instance['gd_order'] == "asc"){ echo ' selected="selected"'; } ?>><?php _e('Ascending', 'gp_lang'); ?></option>
|
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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -274,7 +328,6 @@ class SidebarPosts extends WP_Widget {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* * ************************* Footer Posts Widget ************************** */
|
/* * ************************* Footer Posts Widget ************************** */
|
||||||
|
|
||||||
add_action('widgets_init', 'footer_posts_widgets');
|
add_action('widgets_init', 'footer_posts_widgets');
|
||||||
@ -284,6 +337,7 @@ function footer_posts_widgets() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class FooterPosts extends WP_Widget {
|
class FooterPosts extends WP_Widget {
|
||||||
|
|
||||||
function FooterPosts() {
|
function FooterPosts() {
|
||||||
$widget_ops = array('classname' => 'footerposts', 'description' => __('Enhanced display for your footer posts.', 'gp_lang'));
|
$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);
|
$this->WP_Widget('footer-posts-widget', __('GP Footer Posts', 'gp_lang'), $widget_ops);
|
||||||
@ -307,11 +361,14 @@ class FooterPosts extends WP_Widget {
|
|||||||
require(ghostpool_inc . 'options.php');
|
require(ghostpool_inc . 'options.php');
|
||||||
|
|
||||||
// Begin Widget
|
// Begin Widget
|
||||||
echo $before_widget; ?>
|
echo $before_widget;
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="posts-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,
|
'posts_per_page' => $number,
|
||||||
@ -328,18 +385,16 @@ class FooterPosts extends WP_Widget {
|
|||||||
// Widget Width
|
// 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";
|
$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";
|
$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";
|
$column_width = "445";
|
||||||
}
|
} elseif (is_active_sidebar('footer-1')) {
|
||||||
elseif(is_active_sidebar('footer-1')) {
|
|
||||||
$column_width = "920";
|
$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
|
// Post Type
|
||||||
$gp_settings['post_type'] = get_post_meta($post->ID, 'ghostpool_post_type', true);
|
$gp_settings['post_type'] = get_post_meta($post->ID, 'ghostpool_post_type', true);
|
||||||
@ -369,7 +424,6 @@ class FooterPosts extends WP_Widget {
|
|||||||
} elseif ($gp_gdsr->rating >= $theme_score_range_7) {
|
} elseif ($gp_gdsr->rating >= $theme_score_range_7) {
|
||||||
$user_score_color = ' style="background: ' . $theme_user_score_color_4 . ';"';
|
$user_score_color = ' style="background: ' . $theme_user_score_color_4 . ';"';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display First Image
|
// Display First Image
|
||||||
@ -382,7 +436,6 @@ class FooterPosts extends WP_Widget {
|
|||||||
// Post Text Width
|
// 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;
|
$post_text_width = $column_width;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$post_text_width = $column_width - $image_width - 17;
|
$post_text_width = $column_width - $image_width - 17;
|
||||||
}
|
}
|
||||||
@ -393,7 +446,6 @@ class FooterPosts extends WP_Widget {
|
|||||||
} else {
|
} else {
|
||||||
$post_left_width = $post_text_width;
|
$post_left_width = $post_text_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div <?php post_class('post-loop'); ?>>
|
<div <?php post_class('post-loop'); ?>>
|
||||||
@ -404,7 +456,11 @@ class FooterPosts extends WP_Widget {
|
|||||||
<?php if ($gp_settings['post_type'] == "Video") { ?><span class="video-icon"></span><?php } ?>
|
<?php if ($gp_settings['post_type'] == "Video") { ?><span class="video-icon"></span><?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)) { 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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
@ -460,15 +516,17 @@ class FooterPosts extends WP_Widget {
|
|||||||
|
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo $after_widget;
|
echo $after_widget;
|
||||||
// End Widget
|
// End Widget
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function update($new_instance, $old_instance) {
|
function update($new_instance, $old_instance) {
|
||||||
@ -490,7 +548,8 @@ class FooterPosts extends WP_Widget {
|
|||||||
function form($instance) {
|
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');
|
$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>
|
<p>
|
||||||
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'gp_lang'); ?>:</label>
|
<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>
|
<p>
|
||||||
<label for="images"><?php _e('Images', 'gp_lang'); ?>:</label>
|
<label for="images"><?php _e('Images', 'gp_lang'); ?>:</label>
|
||||||
<select id="images" name="images">
|
<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('All Images', 'gp_lang'); ?>"<?php if ($instance['images'] == __('All Images', 'gp_lang')) {
|
||||||
<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>
|
echo ' selected="selected"';
|
||||||
<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>
|
} ?>><?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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@ -523,40 +588,68 @@ class FooterPosts extends WP_Widget {
|
|||||||
<p>
|
<p>
|
||||||
<label for="post_cats"><?php _e('Display Post Categories', 'gp_lang'); ?>:</label>
|
<label for="post_cats"><?php _e('Display Post Categories', 'gp_lang'); ?>:</label>
|
||||||
<select id="post_cats" name="post_cats">
|
<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('Yes', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('Yes', 'gp_lang')) {
|
||||||
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_cats'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
|
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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="post_meta"><?php _e('Display Post Meta', 'gp_lang'); ?>:</label>
|
<label for="post_meta"><?php _e('Display Post Meta', 'gp_lang'); ?>:</label>
|
||||||
<select id="post_meta" name="post_meta">
|
<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('Yes', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('Yes', 'gp_lang')) {
|
||||||
<option value="<?php _e('No', 'gp_lang'); ?>"<?php if ($instance['post_meta'] == __('No', 'gp_lang')){ echo ' selected="selected"'; } ?>><?php _e('No', 'gp_lang'); ?></option>
|
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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="score_type"><?php _e('Score Type', 'gp_lang'); ?>:</label>
|
<label for="score_type"><?php _e('Score Type', 'gp_lang'); ?>:</label>
|
||||||
<select id="score_type" name="score_type">
|
<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('Site Score', 'gp_lang'); ?>" <?php if ($instance['score_type'] == __('Site Score', 'gp_lang')) {
|
||||||
<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>
|
echo ' selected="selected"';
|
||||||
<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>
|
} ?>><?php _e('Site 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('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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="gd_sort"><?php _e('Sort By', 'gp_lang'); ?>:</label>
|
<label for="gd_sort"><?php _e('Sort By', 'gp_lang'); ?>:</label>
|
||||||
<select id="gd_sort" name="gd_sort">
|
<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')) {
|
||||||
<option value="review"<?php if ($instance['gd_sort'] == 'review'){ echo ' selected="selected"'; } ?>><?php _e('Site Score', 'gp_lang'); ?></option>
|
echo ' selected="selected"';
|
||||||
<option value="rating"<?php if ($instance['gd_sort'] == 'rating'){ echo ' selected="selected"'; } ?>><?php _e('User Score', 'gp_lang'); ?></option>
|
} ?>><?php _e('Date', 'gp_lang'); ?></option>
|
||||||
<option value="votes"<?php if ($instance['gd_sort'] == 'votes'){ echo ' selected="selected"'; } ?>><?php _e('Votes', '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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="gd_order"><?php _e('Order', 'gp_lang'); ?>:</label>
|
<label for="gd_order"><?php _e('Order', 'gp_lang'); ?>:</label>
|
||||||
<select id="gd_order" name="gd_order">
|
<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="desc"<?php if ($instance['gd_order'] == "desc") {
|
||||||
<option value="asc"<?php if ($instance['gd_order'] == "asc"){ echo ' selected="selected"'; } ?>><?php _e('Ascending', 'gp_lang'); ?></option>
|
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>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -566,5 +659,4 @@ class FooterPosts extends WP_Widget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -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']);
|
$gp_settings['from_flag'] = gp_get_the_flag($gp_settings['from_user_id']);
|
||||||
|
|
||||||
// to user
|
// 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_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']) {
|
if ($gp_settings['to_user']) {
|
||||||
$gp_settings['to_flag'] = gp_get_the_flag($gp_settings['to_user']->ID, 24);
|
$gp_settings['to_flag'] = gp_get_the_flag($gp_settings['to_user']->ID, 24);
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php get_header( 'buddypress' ); ?>
|
<?php get_header( 'buddypress' ); ?>
|
||||||
|
|
||||||
<div id="content" class="fullwidth">
|
<div id="content" class="fullwidth">
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
<?php if(has_post_thumbnail()) { ?>
|
<?php if(has_post_thumbnail()) { ?>
|
||||||
<div class="post-thumbnail<?php if($gp_settings['image_wrap'] == "Disable") { ?> thumbnail-no-wrap<?php } ?>">
|
<div class="post-thumbnail<?php if($gp_settings['image_wrap'] == "Disable") { ?> 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(), '', $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(); } ?>" />
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -360,6 +360,10 @@ ul.navmenu li a.profile {
|
|||||||
|
|
||||||
/*************************** Page/Post ***************************/
|
/*************************** Page/Post ***************************/
|
||||||
|
|
||||||
|
.page-title {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* Share */
|
/* Share */
|
||||||
#share-review-link a {
|
#share-review-link a {
|
||||||
color: #077dc8;
|
color: #077dc8;
|
||||||
@ -527,8 +531,21 @@ ul.navmenu li a.profile {
|
|||||||
float: left;
|
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 {
|
#sidebar-home .widget.top_members .post-text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
float: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar-home .widget.top_members a.button {
|
#sidebar-home .widget.top_members a.button {
|
||||||
@ -537,6 +554,7 @@ ul.navmenu li a.profile {
|
|||||||
background: #f4d2e3;
|
background: #f4d2e3;
|
||||||
border: 1px solid #eaa5ba;
|
border: 1px solid #eaa5ba;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
font-size: 14px;
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@ -544,6 +562,7 @@ ul.navmenu li a.profile {
|
|||||||
/* Sidebarposts widget */
|
/* Sidebarposts widget */
|
||||||
#sidebar-home .widget.sidebarposts {
|
#sidebar-home .widget.sidebarposts {
|
||||||
float: right;
|
float: right;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widget.top_members img,
|
.widget.top_members img,
|
||||||
@ -560,6 +579,7 @@ ul.navmenu li a.profile {
|
|||||||
min-height: 150px;
|
min-height: 150px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.widget.top_members .post-loop .post-meta,
|
.widget.top_members .post-loop .post-meta,
|
||||||
@ -580,7 +600,25 @@ ul.navmenu li a.profile {
|
|||||||
.widget.sidebarposts h3,
|
.widget.sidebarposts h3,
|
||||||
.widget.sidebarposts .post-loop .post-text {
|
.widget.sidebarposts .post-loop .post-text {
|
||||||
color: #34a089 !important;
|
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 {
|
.widget.sidebarposts a.button {
|
||||||
@ -594,7 +632,24 @@ ul.navmenu li a.profile {
|
|||||||
font-weight: bold;
|
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 ***************************/
|
/*************************** Page Navigation ***************************/
|
||||||
|
|
||||||
@ -723,10 +778,12 @@ h3.comments {
|
|||||||
|
|
||||||
.category-dedication.post-loop {
|
.category-dedication.post-loop {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
max-height:280px;
|
max-height:220px;
|
||||||
min-height:280px;
|
min-height:220px;
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
width: 32% !important;
|
width: 32% !important;
|
||||||
|
margin: 0 0 10px 0;
|
||||||
|
padding: 0;
|
||||||
padding-right: 1%;
|
padding-right: 1%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,6 +53,7 @@ if (have_posts()) {
|
|||||||
|
|
||||||
$from_user_id = get_the_author_meta('ID');
|
$from_user_id = get_the_author_meta('ID');
|
||||||
$to_user_email = get_post_meta($post->ID, 'ghostpool_destination_user_email', true);
|
$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?
|
// Usuario actual puede ver la dedicatoria?
|
||||||
if (get_post_status($post-ID) == 'private') {
|
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>
|
<span>FROM: <?php echo bp_core_get_userlink($from_user_id); ?></span>
|
||||||
<?php
|
<?php
|
||||||
$to_user = get_user_by ('email', $to_user_email);
|
|
||||||
if ($to_user) {
|
if ($to_user) {
|
||||||
gp_the_flag($to_user->ID);
|
gp_the_flag($to_user->ID);
|
||||||
?><span>TO: <?php echo bp_core_get_userlink($to_user->ID); ?></span>
|
?><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 |
Loading…
Reference in New Issue
Block a user