Tarea #1015 -> Dedicatorias nuevas: banda roja en la esquina inferior derecha con el texto "New"

Tarea #997 -> Indicadores rojos en las pestañas

git-svn-id: https://192.168.0.254/svn/Proyectos.ASong2U_Web/trunk@118 cd1a4ea2-8c7f-e448-aada-19d1fee9e1d6
This commit is contained in:
David Arranz 2012-08-23 16:50:24 +00:00
parent a247cf1db1
commit 2ca5b041e4
24 changed files with 1115 additions and 17 deletions

View File

@ -0,0 +1,14 @@
<?php
// dashboard widgets
add_action('wp_dashboard_setup', 'mar_most_popular_dashboard_widgets');
function mar_most_popular_dashboard_widgets() {
global $wp_meta_boxes;
wp_add_dashboard_widget('pippin_dashboard_widget', 'Most Read Posts', 'mar_most_popular_dashboard_widget_render');
}
function mar_most_popular_dashboard_widget_render() {
echo mar_most_read();
}

View File

@ -0,0 +1,135 @@
<?php
// this file contains all display functions
// will show the add/remove links
function mar_read_unread_links($read_text = 'Mark as read', $unread_text = 'Mark as unread', $wrapper = true) {
global $mar_options;
if(is_user_logged_in()) {
$post_id = get_the_ID();
// if this post has been bookmarked, show the remove link, otherwise show the add link
$link = '';
if($wrapper == true) {
$link .= '<div class="mar_links">';
}
if($read_text == '') {
if($mar_options['read_text'] != '') {
$read_text = $mar_options['read_text'];
} else {
$read_text = 'Mark as Read';
}
}
if($unread_text == '') {
if($mar_options['unread_text'] != '') {
$unread_text = $mar_options['unread_text'];
} else {
$unread_text = 'Mark as Unread';
}
}
if(mar_check_post_is_read($post_id, mar_get_user_id())) {
$link .= '<a href="#" rel="' . $post_id . '" class="mar_mark_as_unread mar_read_control mar_read_control_' . $post_id . '">' . $unread_text . '</a>';
$link .= '<a href="#" rel="' . $post_id . '" class="mar_mark_as_read mar_read_control mar_read_control_' . $post_id . '" style="display:none;">' . $read_text . '</a>';
} else {
$link .= '<a href="#" rel="' . $post_id . '" class="mar_mark_as_unread mar_read_control mar_read_control_' . $post_id . '" style="display:none;">' . $unread_text . '</a>';
$link .= '<a href="#" rel="' . $post_id . '" class="mar_mark_as_read mar_read_control mar_read_control_' . $post_id . '">' . $read_text . '</a>';
}
if($wrapper == true) {
$link .= '</div>';
}
return $link;
}
}
// show mark as read / unread links automatically if enabled. Do not use this as a template tag
function mar_show_links($content) {
global $post;
global $mar_options;
if(is_single() && get_post_type() == 'post' && $mar_options['show_links'] == true) {
if($mar_options['post_position'] == 'Top') {
$content = mar_read_unread_links($mar_options['read_text'], $mar_options['unread_text']) . $content;
} else {
$content = $content . mar_read_unread_links($mar_options['read_text'], $mar_options['unread_text']);
}
}
return $content;
}
add_filter('the_content', 'mar_show_links');
function mar_list_unread_posts($number = 5) {
if(is_user_logged_in()) {
$read_ids = mar_get_user_read_posts( mar_get_user_id() );
$unread_posts = get_posts(array('exclude' => $read_ids, 'numberposts' => $number));
ob_start(); ?>
<ul class="mar_unread_posts_list">
<?php foreach($unread_posts as $unread) : ?>
<li class="mar_unread_post"><a href="<?php echo get_permalink($unread->ID); ?>"><?php echo get_the_title($unread->ID); ?></a></li>
<?php endforeach; ?>
</ul>
<?php
return ob_get_clean();
}
}
function mar_list_user_report( $args ) {
if(is_user_logged_in()) {
$defaults = array(
'read' => true,
'unread' => true,
'total' => true,
'percentage' => true,
'labels' => array(
'read' => 'Read Posts: ',
'unread' => 'Unread Posts: ',
'total' => 'Total Posts: ',
'percentage' => 'Percentage Complete: '
)
);
$args = wp_parse_args( $args, $defaults );
extract( $args, EXTR_SKIP );
$report = mar_get_user_report();
ob_start(); ?>
<ul class="mar_user_report">
<?php if($read) { ?>
<li><?php echo $labels['read'] . $report['read_posts_count']; ?></li>
<?php } if($unread) { ?>
<li><?php echo $labels['unread'] . $report['unread_posts_count']; ?></li>
<?php } if($total) { ?>
<li><?php echo $labels['total'] . $report['total_posts']; ?></li>
<?php } if($percentage) { ?>
<li><?php echo $labels['percentage'] . $report['read_percentage']; ?></li>
<?php } ?>
</ul>
<?php
return ob_get_clean();
}
}
function mar_most_read($number = 5, $count = true) {
global $wpdb;
global $mar_db_table;
$read_posts = $wpdb->get_results("SELECT * FROM " . $mar_db_table . " WHERE read_count != 0 ORDER BY read_count DESC LIMIT $number;");
if($read_posts) {
$popular_list = '<ul class="mar_most_read_posts">';
foreach($read_posts as $popular) {
$popular_list .= '<li class="popular_post">';
$popular_list .= '<a href="' . get_permalink($popular->id) . '" class="popular_post_link" title="' . get_the_title($popular->id) . ' - ' . __('Read ') . $popular->read_count . __(' times') . '">';
$popular_list .= get_the_title($popular->id) . '</a>';
if($count == true) {
$popular_list .= ' (' . $popular->read_count . ')';
}
$popular_list .= '</li>';
}
$popular_list .= '</ul>';
}
return $popular_list;
}

View File

@ -0,0 +1,321 @@
<?php
/**
* List Unread Posts Widget
*/
class mar_unread_posts_widget extends WP_Widget {
/** constructor */
function mar_unread_posts_widget() {
parent::WP_Widget(false, $name = 'User\'s Unread Posts', array('description' => 'Show unread posts for the current user'));
}
/** @see WP_Widget::widget */
function widget($args, $instance) {
extract( $args );
if(is_user_logged_in()) {
$title = apply_filters('widget_title', $instance['title']);
$number = (int)$instance['number'];
if($number == '' || !isset($number)) { $number = 5; }
echo $before_widget;
if ( $title ) {
echo $before_title . $title . $after_title;
}
echo mar_list_unread_posts($number);
echo $after_widget;
}
}
/** @see WP_Widget::update */
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['number'] = strip_tags($new_instance['number']);
return $instance;
}
/** @see WP_Widget::form */
function form($instance) {
$title = esc_attr($instance['title']);
$number = esc_attr($instance['number']);
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />
</p>
<p>
<input class="widefat" style="width: 30px;" id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" />
<label for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number to show:'); ?></label>
</p>
<?php
}
} // class mar_unread_posts_widget
/**
* user Report Widget
*/
class mar_user_report_widget extends WP_Widget {
/** constructor */
function mar_user_report_widget() {
parent::WP_Widget(false, $name = 'User Report', array('description' => 'Show the number of posts the user has read, not read, etc'));
}
/** @see WP_Widget::widget */
function widget($args, $instance) {
extract( $args );
if(is_user_logged_in()) {
$title = apply_filters('widget_title', $instance['title']);
$read_posts = (bool)$instance['read_posts'];
$read_label = $instance['read_label'];
$unread_posts = (bool)$instance['unread_posts'];
$unread_label = $instance['unread_label'];
$total_posts = (bool)$instance['total_posts'];
$total_label = $instance['total_label'];
$percentage = (bool)$instance['percentage'];
$percentage_label = $instance['percentage_label'];
$labels = array(
'read' => $read_label,
'unread' => $unread_label,
'total' => $total_label,
'percentage' => $percentage_label
);
echo $before_widget;
if ( $title ) {
echo $before_title . $title . $after_title;
}
echo mar_list_user_report(
array(
'read' => $read_posts,
'unread' => $unread_posts,
'total' => $total_posts,
'percentage' => $percentage,
'labels' => array(
'read' => $read_label,
'unread' => $unread_label,
'total' => $total_label,
'percentage' => $percentage_label
)
)
);
echo $after_widget;
}
}
/** @see WP_Widget::update */
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['read_posts'] = strip_tags($new_instance['read_posts']);
$instance['read_label'] = strip_tags($new_instance['read_label']);
$instance['unread_posts'] = strip_tags($new_instance['unread_posts']);
$instance['unread_label'] = strip_tags($new_instance['unread_label']);
$instance['total_posts'] = strip_tags($new_instance['total_posts']);
$instance['total_label'] = strip_tags($new_instance['total_label']);
$instance['percentage'] = strip_tags($new_instance['percentage']);
$instance['percentage_label'] = strip_tags($new_instance['percentage_label']);
return $instance;
}
/** @see WP_Widget::form */
function form($instance) {
$title = esc_attr($instance['title']);
$read_posts = esc_attr($instance['read_posts']);
$read_label = esc_attr($instance['read_label']);
$unread_posts = esc_attr($instance['unread_posts']);
$unread_label = esc_attr($instance['unread_label']);
$total_posts = esc_attr($instance['total_posts']);
$total_label = esc_attr($instance['total_label']);
$percentage = esc_attr($instance['percentage']);
$percentage_label = esc_attr($instance['percentage_label']);
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />
</p>
<p>
<input id="<?php echo $this->get_field_id('read_posts'); ?>" name="<?php echo $this->get_field_name('read_posts'); ?>" type="checkbox" value="1" <?php checked( '1', $read_posts ); ?>/>
<label for="<?php echo $this->get_field_id('read_posts'); ?>"><?php _e('Display Number of Posts Read?'); ?></label>
</p>
<p>
<label for="<?php echo $this->get_field_id('read_label'); ?>"><?php _e('Read Posts Label:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('read_label'); ?>" name="<?php echo $this->get_field_name('read_label'); ?>" type="text" value="<?php echo $read_label; ?>" />
</p>
<p>
<input id="<?php echo $this->get_field_id('unread_posts'); ?>" name="<?php echo $this->get_field_name('unread_posts'); ?>" type="checkbox" value="1" <?php checked( '1', $unread_posts ); ?>/>
<label for="<?php echo $this->get_field_id('unread_posts'); ?>"><?php _e('Display Number of Unread Posts?'); ?></label>
</p>
<p>
<label for="<?php echo $this->get_field_id('unread_label'); ?>"><?php _e('Unread Posts Label:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('unread_label'); ?>" name="<?php echo $this->get_field_name('unread_label'); ?>" type="text" value="<?php echo $unread_label; ?>" />
</p>
<p>
<input id="<?php echo $this->get_field_id('total_posts'); ?>" name="<?php echo $this->get_field_name('total_posts'); ?>" type="checkbox" value="1" <?php checked( '1', $total_posts ); ?>/>
<label for="<?php echo $this->get_field_id('total_posts'); ?>"><?php _e('Display Total Number of Posts?'); ?></label>
</p>
<p>
<label for="<?php echo $this->get_field_id('total_label'); ?>"><?php _e('Total Posts Label:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('total_label'); ?>" name="<?php echo $this->get_field_name('total_label'); ?>" type="text" value="<?php echo $total_label; ?>" />
</p>
<p>
<input id="<?php echo $this->get_field_id('percentage'); ?>" name="<?php echo $this->get_field_name('percentage'); ?>" type="checkbox" value="1" <?php checked( '1', $percentage ); ?>/>
<label for="<?php echo $this->get_field_id('percentage'); ?>"><?php _e('Display Percentage of Posts Read?'); ?></label>
</p>
<p>
<label for="<?php echo $this->get_field_id('percentage_label'); ?>"><?php _e('Percentage Complete Label:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('percentage_label'); ?>" name="<?php echo $this->get_field_name('percentage_label'); ?>" type="text" value="<?php echo $percentage_label; ?>" />
</p>
<?php
}
} // class mar_user_report_widget
/**
* Most Popular Posts Widget
*/
class mar_most_popular extends WP_Widget {
/** constructor */
function mar_most_popular() {
parent::WP_Widget(false, $name = 'Most Read', array('description' => 'Show your most read posts'));
}
/** @see WP_Widget::widget */
function widget($args, $instance) {
extract( $args );
$title = apply_filters('widget_title', $instance['title']);
$number = (int)$instance['number'];
$read_count = (bool)$instance['read_count'];
if($number == '' || !isset($number)) { $number = 5; }
echo $before_widget;
if ( $title ) {
echo $before_title . $title . $after_title;
}
echo mar_most_read($number, $read_count);
echo $after_widget;
}
/** @see WP_Widget::update */
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['number'] = strip_tags($new_instance['number']);
$instance['read_count'] = strip_tags($new_instance['read_count']);
return $instance;
}
/** @see WP_Widget::form */
function form($instance) {
$title = esc_attr($instance['title']);
$number = esc_attr($instance['number']);
$read_count = esc_attr($instance['read_count']);
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />
</p>
<p>
<input class="widefat" style="width: 30px;" id="<?php echo $this->get_field_id('number'); ?>" name="<?php echo $this->get_field_name('number'); ?>" type="text" value="<?php echo $number; ?>" />
<label for="<?php echo $this->get_field_id('number'); ?>"><?php _e('Number to show:'); ?></label>
</p>
<p>
<input id="<?php echo $this->get_field_id('read_count'); ?>" name="<?php echo $this->get_field_name('read_count'); ?>" type="checkbox" value="1" <?php checked( '1', $read_count ); ?>/>
<label for="<?php echo $this->get_field_id('read_count'); ?>"><?php _e('Display Read Count?'); ?></label>
</p>
<?php
}
} // class mar_most_popular
/**
* Mark Post as Read / Unread Widget
*/
class mar_mark_as_read_links extends WP_Widget {
/** constructor */
function mar_mark_as_read_links() {
parent::WP_Widget(false, $name = 'Mark as Read/Unread Links', array('description' => 'Show link to mark current post as read or unread'));
}
/** @see WP_Widget::widget */
function widget($args, $instance) {
extract( $args );
$title = apply_filters('widget_title', $instance['title']);
$read = apply_filters('widget_title', $instance['read']);
$unread = apply_filters('widget_title', $instance['unread']);
if(is_single() && is_user_logged_in()) {
echo $before_widget;
if ( $title ) {
echo $before_title . $title . $after_title;
}
echo mar_read_unread_links($read, $unread);
echo $after_widget;
}
}
/** @see WP_Widget::update */
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);
$instance['read'] = strip_tags($new_instance['read']);
$instance['unread'] = strip_tags($new_instance['unread']);
return $instance;
}
/** @see WP_Widget::form */
function form($instance) {
$title = esc_attr($instance['title']);
$read = esc_attr($instance['read']);
$unread = esc_attr($instance['unread']);
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('read'); ?>"><?php _e('Mark as Read Text:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('read'); ?>" name="<?php echo $this->get_field_name('read'); ?>" type="text" value="<?php echo $read; ?>" />
</p>
<p>
<label for="<?php echo $this->get_field_id('unread'); ?>"><?php _e('Mark as Unread Text:'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('unread'); ?>" name="<?php echo $this->get_field_name('unread'); ?>" type="text" value="<?php echo $unread; ?>" />
</p>
<?php
}
} // class mar_mark_as_read_links
function mar_register_widgets() {
register_widget('mar_unread_posts_widget');
register_widget('mar_user_report_widget');
register_widget('mar_most_popular');
register_widget('mar_mark_as_read_links');
}
add_action('widgets_init', 'mar_register_widgets');

View File

@ -0,0 +1,20 @@
jQuery(document).ready( function($) {
var time = parseInt(mark_as_read_auto_js.time) * 1000;
if(time == '') {
time = 10000; // default to 10 seconds
}
setTimeout( function() {
var data = {
action: 'mark_post_as_read',
post_read: mark_as_read_auto_js.post_id
};
$.post(mark_as_read_auto_js.ajaxurl, data, function(response) {
// post has been marked as read
});
}, time );
});

View File

@ -0,0 +1,145 @@
<?php
/*************************************************************************
this file contains all of the functions used to add and delete bookmarks
************************************************************************/
// checks whether a post has been read
function mar_check_post_is_read($post_id, $user_id) {
// this line was just for testing purposes
//delete_user_meta(mar_get_user_id(), 'mar_read_posts');
$user_meta = mar_get_user_read_posts($user_id);
if($user_meta) :
foreach ($user_meta as $read_post) {
if ($read_post == $post_id) {
return true;
}
}
endif;
return false;
}
// gets the current user's ID
function mar_get_user_id() {
global $current_user;
get_currentuserinfo();
return $current_user->ID;
}
// adds a post to the user meta
function mar_add_to_usermeta($post_id) {
$user_id = mar_get_user_id();
$mar_read = mar_get_user_read_posts($user_id);
// add out post id to the end of the array
$mar_read[] = $post_id;
mar_update_user_meta($mar_read, $user_id);
}
// removes a post ID from the user meta
function mar_remove_from_usermeta($post_id) {
$user_id = mar_get_user_id();
$mar_read = mar_get_user_read_posts($user_id);
foreach ($mar_read as $read_post => $id) {
if ($id == $post_id) {
unset($mar_read[$read_post]);
}
}
mar_update_user_meta($mar_read, $user_id);
}
// updates the current users read IDs
function mar_update_user_meta($arr, $user_id) {
return update_user_meta($user_id,'mar_read_posts', $arr);
}
// gets all read posts for the current user
function mar_get_user_read_posts($user_id) {
return get_user_meta($user_id, 'mar_read_posts', true);
}
// processes the ajax mark as read request
function mar_post_mark_as_read() {
if ( isset( $_POST["post_read"] ) ) {
$post_id = intval($_POST["post_read"]);
$mark_as_read = mar_add_to_usermeta($post_id);
$update_count = mar_increase_count($post_id);
die();
}
}
add_action('wp_ajax_mark_post_as_read', 'mar_post_mark_as_read');
// processes the ajax mark as unread request
function mar_post_mark_as_unread() {
if ( isset( $_POST["del_post_id"] ) ) {
$post_id = intval($_POST["del_post_id"]);
$mark_as_unread = mar_remove_from_usermeta($post_id);
$update_count = mar_decrease_count($post_id);
die();
}
}
add_action('wp_ajax_mark_post_as_unread', 'mar_post_mark_as_unread');
// increases the read posts count for $post_id
function mar_increase_count($post_id) {
global $wpdb;
global $mar_db_table;
// add the post ID to the count database if it doesn't already exist
if(!$wpdb->query("SELECT `read_count` FROM `" . $mar_db_table . "` WHERE id=" . $post_id . ";")) {
$add_post_id = $wpdb->insert( $mar_db_table,
array(
'id' => $post_id,
'read_count' => 1
)
);
} else {
$count = $wpdb->query("UPDATE " . $mar_db_table . " SET read_count = read_count + 1 WHERE id=" . $post_id . ";");
}
}
// decreases the bookmark count for $post_id
function mar_decrease_count($post_id) {
global $wpdb;
global $mar_db_table;
$count = $wpdb->query("UPDATE " . $mar_db_table . " SET read_count = read_count - 1 WHERE id=" . $post_id . ";");
}
// retrieves all report card data for the current user
// this includes unread / read posts with counts
function mar_get_user_report() {
$user_report = array();
// get all read posts for the current user
$read_posts = mar_get_user_read_posts( mar_get_user_id() );
// get all unread posts for the current user
$unread_posts = get_posts(array('exclude' => $read_posts, 'posts_per_page' => -1));
$total_posts = count($unread_posts) + count($read_posts);
// calculate the percentage of post sthat have been read
$read_percentage = round( ( count($read_posts) * 100 ) / $total_posts);
$user_report['read_posts'] = $read_posts;
$user_report['read_posts_count'] = count($read_posts);
$user_report['unread_posts_count'] = count($unread_posts);
$user_report['total_posts'] = $total_posts;
$user_report['read_percentage'] = $read_percentage;
return $user_report;
}
// automarks a post as read after the user has been on the post for the designated length of time
function mar_auto_mark_as_read($content) {
global $mar_options, $post;
// proceed if the auto option is enabled and we are on a single post
if($mar_options['auto'] && is_single()) {
// proceed if the post is not already marked as read
if(!mar_check_post_is_read($post->ID, mar_get_user_id())) {
mar_load_auto_scripts();
}
}
}
add_action('template_redirect', 'mar_auto_mark_as_read');

View File

@ -0,0 +1,45 @@
jQuery(document).ready( function($) {
var read_message = mark_as_read_js.read_message;
var unread_message = mark_as_read_js.unread_message;
$(".mar_mark_as_read").click( function() {
var post_id = $(this).attr('rel');
var data = {
action: 'mark_post_as_read',
post_read: post_id
};
$.post(mark_as_read_js.ajaxurl, data, function(response) {
if(mark_as_read_js.show_alerts == '1') {
alert(read_message);
}
$('.mar_read_control_'+post_id).toggle();
});
return false;
});
$(".mar_mark_as_unread").click( function() {
if(mark_as_read_js.show_alerts == '1') {
if(confirm(unread_message)) {
var post_id = $(this).attr('rel');
var data = {
action: 'mark_post_as_unread',
del_post_id: post_id
};
$.post(mark_as_read_js.ajaxurl, data, function(response) {
$('.mar_read_control_'+post_id).toggle();
});
}
} else {
var post_id = $(this).attr('rel');
var data = {
action: 'mark_post_as_unread',
del_post_id: post_id
};
$.post(mark_as_read_js.ajaxurl, data, function(response) {
$('.mar_read_control_'+post_id).toggle();
});
}
return false;
});
});

View File

@ -0,0 +1,24 @@
<?php
function mar_profile_report($user) { ?>
<h3><?php _e('Your Posts Read Report'); ?></h3>
<table class="form-table">
<tr>
<td>
<?php
$args = array(
'labels' => array(
'read' => __('Posts Read: '),
'unread' => __('Posts Unread: '),
'total' => __('Total Posts on This Site: '),
'percentage' => __('Percentage of Total Posts Read: '),
)
);
echo mar_list_user_report($args);
?>
</td>
</tr>
</table>
<?php
}
add_action( 'show_user_profile', 'mar_profile_report' );

View File

@ -0,0 +1,51 @@
<?php
function mar_mark_as_read_js() {
global $mar_base_dir;
global $mar_options;
if($mar_options['alert_read'] == '') {
$read_text = 'Post marked as read';
} else {
$read_text = $mar_options['alert_read'];
}
if($mar_options['alert_unread'] == '') {
$unread_text = 'Mark Post as Unread?';
} else {
$unread_text = $mar_options['alert_unread'];
}
wp_enqueue_script( "mark-as-read", $mar_base_dir . 'includes/mark-as-read.js', array( 'jquery' ) );
wp_localize_script( 'mark-as-read', 'mark_as_read_js',
array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'read_message' => $read_text,
'unread_message' => $unread_text,
'show_alerts' => $mar_options['alerts']
)
);
}
add_action('wp_print_scripts', 'mar_mark_as_read_js');
function mar_load_auto_scripts() {
global $mar_base_dir, $post, $mar_options;
wp_enqueue_script( "mark-as-read-auto", $mar_base_dir . 'includes/mark-as-read-auto.js', array( 'jquery' ) );
wp_localize_script( 'mark-as-read-auto', 'mark_as_read_auto_js',
array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'post_id' => $post->ID,
'time' => $mar_options['auto_time']
)
);
}
function mar_custom_css() {
global $mar_options;
if($mar_options['mar_css']) {
echo '<style type="text/css">' . PHP_EOL;
echo $mar_options['mar_css'] . PHP_EOL;
echo '</style>' . PHP_EOL;
}
}
add_action('wp_head', 'mar_custom_css');

View File

@ -0,0 +1,140 @@
<?php
// this file contains all settings pages and options
function mar_settings_page()
{
global $mar_options;
?>
<div class="wrap">
<div id="upb-wrap" class="upb-help">
<h2>Mark as Read Settings</h2>
<?php
if ( ! isset( $_REQUEST['updated'] ) )
$_REQUEST['updated'] = false;
?>
<?php if ( false !== $_REQUEST['updated'] ) : ?>
<div class="updated fade"><p><strong><?php _e( 'Options saved' ); ?></strong></p></div>
<?php endif; ?>
<form method="post" action="options.php">
<?php settings_fields( 'mar_settings_group' ); ?>
<h4>Mark as Read Automatically</h4>
<p>
<input id="mar_settings[auto]" name="mar_settings[auto]" type="checkbox" value="1" <?php checked( '1', $mar_options['auto'] ); ?>/>
<label class="description" for="mar_settings[auto]"><?php _e( 'Automatically mark posts as read after the reader has been on the page for a desginated amount of time?' ); ?></label>
</p>
<p>
<input id="mar_settings[auto_time]" name="mar_settings[auto_time]" type="text" value="<?php echo $mar_options['auto_time'];?>" />
<label class="description" for="mar_settings[auto_time]"><?php _e( 'Length of time in seconds before a post should be considered "read"' ); ?></label><br/>
</p>
<h4>Mark as Read / Unread Links</h4>
<p>
<input id="mar_settings[show_links]" name="mar_settings[show_links]" type="checkbox" value="1" <?php checked( '1', $mar_options['show_links'] ); ?>/>
<label class="description" for="mar_settings[show_links]"><?php _e( 'Display the Mark as Read / Unread links on posts automatically?' ); ?></label>
</p>
<p>
<?php $positions = array('Top', 'Bottom'); ?>
<select name="mar_settings[post_position]">
<?php foreach ($positions as $option) { ?>
<option <?php if ($mar_options['post_position'] == $option ){ echo 'selected="selected"'; } ?>><?php echo htmlentities($option); ?></option>
<?php } ?>
</select>
<label class="description" for="mar_settings[style]"><?php _e( 'Display Mark as Read/Unread links at top or bottom of the post/page content?' ); ?></label>
</p>
<p>
<input id="mar_settings[read_text]" name="mar_settings[read_text]" type="text" value="<?php echo $mar_options['read_text'];?>" />
<label class="description" for="mar_settings[read_text]"><?php _e( 'Enter the text you\'d like to use for the Mark as Read text' ); ?></label><br/>
</p>
<p>
<input id="mar_settings[unread_text]" name="mar_settings[unread_text]" type="text" value="<?php echo $mar_options['unread_text'];?>" />
<label class="description" for="mar_settings[unread_text]"><?php _e( 'Enter the text you\'d like to use for the mark as Unread text' ); ?></label><br/>
</p>
<h4>Alert Messages</h4>
<p>
<input id="mar_settings[alerts]" name="mar_settings[alerts]" type="checkbox" value="1" <?php checked( '1', $mar_options['alerts'] ); ?>/>
<label class="description" for="mar_settings[alerts]"><?php _e( 'Show alert messages when posts are marked as read/unread?' ); ?></label>
</p>
<p>
<input id="mar_settings[alert_read]" name="mar_settings[alert_read]" type="text" value="<?php echo $mar_options['alert_read'];?>" />
<label class="description" for="mar_settings[alert_read]"><?php _e( 'Enter the text you\'d like to be shown in the alert when a post is marked as read' ); ?></label><br/>
</p>
<p>
<input id="mar_settings[alert_unread]" name="mar_settings[alert_unread]" type="text" value="<?php echo $mar_options['alert_unread'];?>" />
<label class="description" for="mar_settings[alert_unread]"><?php _e( 'Enter the text you\'d like to be shown in the alert when a post is marked as unread' ); ?></label><br/>
</p>
<h4>Custom CSS</h4>
<p>
<label class="description" for="mar_settings[mar_css]"><?php _e( 'Enter custom CSS here to customize the appearance of this plugin. To assist you, a list of available class names are available in the Help tab in the top right.' ); ?></label><br/>
<textarea id="mar_settings[mar_css]" style="width: 400px; height: 150px;" name="mar_settings[mar_css]" type="text"><?php echo $mar_options['mar_css'];?></textarea>
</p>
<!-- save the options -->
<p class="submit">
<input type="submit" class="button-primary" value="<?php _e( 'Save Options' ); ?>" />
</p>
</form>
</div><!--end sf-wrap-->
</div><!--end wrap-->
<?php
}
// register the plugin settings
function mar_register_settings() {
// create whitelist of options
register_setting( 'mar_settings_group', 'mar_settings' );
}
//call register settings function
add_action( 'admin_init', 'mar_register_settings' );
function mar_settings_menu() {
// add settings page
add_submenu_page('options-general.php', 'Mark as Read Settings', 'Mark as Read','manage_options', 'mar-settings', 'mar_settings_page');
}
add_action('admin_menu', 'mar_settings_menu');
function mar_contextual_help($contextual_help, $screen_id, $screen) {
ob_start(); ?>
<h3>HTML Class Names</h3>
<p>The selectors below can be used in your CSS to customize the look of your bookmark links, the add / remove bookmark links, and more.</p>
<p><strong>Mark as Read / Unread Controls</strong></p>
<ul>
<li><em>div.mar_links</em> - this is the DIV tag that wraps the mark as read / unread links, if enabled</li>
<li><em>a.mar_read_control</em> - this is the generic class given to both mark as read and unread links</li>
<li><em>a.mar_mark_as_read</em> - this is the mark as read link class</li>
<li><em>a.mar_mark_as_unread</em> - this is the mark as unread link class</li>
</ul>
<p><strong>Most Read Posts List</strong></p>
<ul>
<li><em>ul.mar_most_read_posts</em> - this is the UL that wraps the most read posts list</li>
<li><em>li.popular_post</em> - this is LI tag that wraps each popular post link</li>
</ul>
<p><strong>User Report</strong></p>
<ul>
<li><em>ul.mar_user_report</em> - this is the UL that wraps the user's report</li>
<li><em>ul.mar_user_report li</em> - this is LI tag that wraps each user report item</li>
</ul>
<?php
return ob_get_clean();
}
if (isset($_GET['page']) && $_GET['page'] == 'mar-settings')
{
add_action('contextual_help', 'mar_contextual_help', 10, 3);
}

View File

@ -0,0 +1,28 @@
<?php
function mar_most_read_shortcode($atts, $content = null ) {
extract( shortcode_atts( array(
'number' => 5
), $atts )
);
return mar_most_read($number);
}
add_shortcode('most_read', 'mar_most_read_shortcode');
function mar_user_report_shortcode($content = null ) {
return mar_list_user_report( $args );
}
add_shortcode('user_report', 'mar_user_report_shortcode');
function mar_unread_posts_shortcode($atts, $content = null ) {
extract( shortcode_atts( array(
'number' => 5
), $atts )
);
return mar_list_unread_posts( $number );
}
add_shortcode('unread_posts', 'mar_unread_posts_shortcode');

View File

@ -0,0 +1,60 @@
<?php
/*
Plugin Name: Mark As Read
Plugin URI: http://cgcookie.com
Description: Let users mark posts as read or unread, view a list of their unread posts and more
Version: 1.0
Author: CG Cookie, INC
Contributors: Pippin Williamson
Author URI: http://cgcookie.com
*/
include('includes/display-functions.php');
include('includes/scripts.php');
include('includes/mark-as-read-functions.php');
include('includes/shortcodes.php');
include('includes/settings.php');
include('includes/dashboard-widgets.php');
include('includes/mar-widgets.php');
include('includes/profile-post-report.php');
// globals
global $wpdb;
// plugin root folder
global $mar_base_dir;
$mar_base_dir = WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__), "" , plugin_basename(__FILE__));
global $mar_options;
$mar_options = get_option('mar_settings');
// bookmark count table
global $mar_db_table;
$mar_db_table = $wpdb->prefix . "mar_read_counts";
// bookmark count table version
global $mar_table_version;
$mar_table_version = 1.0;
function mar_install()
{
global $wpdb;
global $mar_db_table;
global $mar_table_version;
if($wpdb->get_var("show tables like '$mar_db_table'") != $mar_db_table)
{
$sql = "CREATE TABLE " . $mar_db_table . " (
id mediumint(9) NOT NULL AUTO_INCREMENT,
read_count mediumint NOT NULL,
UNIQUE KEY id (id)
);";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
add_option("mar_database_version", $mar_table_version);
}
}
register_activation_hook( __FILE__, 'mar_install' );

View File

@ -24,8 +24,10 @@ $dedication_link = bp_core_get_userlink($bp->displayed_user->id, false, true) .
<div class="home-dedicated-2-me post-loop"<?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 } ?>">
<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 if (($theme_show_new_label) && ($gp_settings['unreaded'])) { ?><span class="new-label"></span><?php } ?>
<?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);

View File

@ -25,7 +25,9 @@ $dedication_link = bp_core_get_userlink($bp->displayed_user->id, false, true) .
<!--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 if (($theme_show_new_label) && ($gp_settings['unreaded'])) { ?><span class="new-label"></span><?php } ?>
<?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);

View File

@ -744,4 +744,37 @@ function asociate_dedications_to_new_user($user_id) {
add_action( 'user_register', 'asociate_dedications_to_new_user');
function gp_last_login($login) {
global $user_ID;
$user = get_userdatabylogin($login);
update_usermeta($user->ID, 'last_login', current_time('mysql'));
}
add_action('wp_login','gp_last_login');
function gp_get_last_login($user_id) {
$last_login = get_user_meta($user_id, 'last_login', true);
$date_format = get_option('date_format') . ' ' . get_option('time_format');
$the_last_login = mysql2date($date_format, $last_login, false);
return $the_last_login;
}
function gp_get_total_unread_dedications() {
if(is_user_logged_in()) {
$user_id = mar_get_user_id();
$read_ids = mar_get_user_read_posts( $user_id );
$args = array(
'exclude' => $read_ids,
'numberposts' => -1,
'cat' => DEDICATION_CATEGORY_SLUG,
'meta_key' => 'ghostpool_destination_user_id',
'meta_value' => $user_id
);
$unread_posts = get_posts( $args );
return count($unread_posts);
}
else return 0;
}
?>

View File

@ -65,9 +65,17 @@
$category_link = get_category_link( $category_id );
?>
<li><a title="<?php _e( 'Concerts', 'gp_lang' ); ?>" class="events" href="<?php echo esc_url( $category_link ); ?>"><span><?php _e( 'Concerts', 'gp_lang' ); ?></span></a></li>
<li><a title="<?php _e( 'Friends', 'gp_lang' ); ?>" class="friends" href="<?php echo bp_get_members_directory_permalink(); ?>"><span><?php _e( 'Friends', 'gp_lang' ); ?></span></a></li>
<li>
<a title="<?php _e( 'Friends', 'gp_lang' ); ?>" class="friends" href="<?php echo bp_get_members_directory_permalink(); ?>"><span><?php _e( 'Friends', 'gp_lang' ); ?></span>
<?php if ( bp_friend_get_total_requests_count() != "0" ): ?><span class="sign"><?php echo bp_friend_total_requests_count() ?></span><?php endif;?>
</a>
</li>
<li><a title="<?php _e( 'My favorite bands', 'gp_lang' ); ?>" class="groups" href="<?php echo bp_get_groups_directory_permalink(); ?>"><span><?php _e( 'My favorite bands', 'gp_lang' ); ?></span></a></li>
<li><a title="<?php _e( 'Profile', 'gp_lang' ); ?>" class="profile" href="<?php if(function_exists('bp_is_active')) { echo $bp->loggedin_user->domain; } else { echo get_author_posts_url(get_the_author_id()); } ?>"><span><?php _e('Profile', 'gp_lang'); ?></span></a></li>
<li>
<a title="<?php _e( 'Profile', 'gp_lang' ); ?>" class="profile" href="<?php if(function_exists('bp_is_active')) { echo $bp->loggedin_user->domain; } else { echo get_author_posts_url(get_the_author_id()); } ?>"><span><?php _e('Profile', 'gp_lang'); ?></span>
<?php if (gp_get_total_unread_dedications() != "0" ): ?><span class="sign"><?php echo gp_get_total_unread_dedications() ?></span><?php endif;?>
</a>
</li>
<li><a title="<?php _e( 'Logout', 'gp_lang' ); ?>" class="logout" href="<?php echo wp_logout_url(); ?>"><span><?php _e('Logout', 'gp_lang'); ?></span></a></li>
</ul>
<?php endif; ?>
@ -112,10 +120,6 @@
<?php } ?>
<?php } ?>
<?php /*if(is_home() && $theme_slider == "0") { require('slider.php'); }*/ ?>
<?php /*require('social.php');*/ ?>
<!--Begin Content Wrapper-->
<div id="content-wrapper">

View File

@ -75,8 +75,10 @@ query_posts($args);
<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 } ?>">
<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 if (($theme_show_new_label) && ($gp_settings['unreaded'])) { ?><span class="new-label"></span><?php } ?>
<?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>

View File

@ -100,7 +100,7 @@ $options = array(
"std" => "",
"desc" => '',
"type" => "text"),
array(
/*array(
"name" => __('Twitter URL', 'gp_lang'),
"id" => $shortname . "_twitter",
"std" => "",
@ -160,6 +160,8 @@ $options = array(
"id" => $shortname . "_additional_social_icons",
"std" => "",
"type" => "textarea"),
*
*/
array("type" => "divider"),
array(
"name" => __('Favicon URL (.ico)', 'gp_lang'),
@ -187,6 +189,7 @@ $options = array(
"std" => "",
"type" => "textarea"),
array("type" => "divider"),
/*
array(
"name" => __('Scroller Display', 'gp_lang'),
"desc" => __('Choose how to display the scroller.', 'gp_lang'),
@ -220,6 +223,8 @@ $options = array(
"type" => "text",
"size" => "small"),
array("type" => "divider"),
*
*/
array(
"name" => __('Footer Widgets', 'gp_lang'),
"desc" => __('Choose where to display your footer widgets.', 'gp_lang'),
@ -263,7 +268,7 @@ $options = array(
array("type" => "close"),
array("name" => __('Video Slider Settings', 'gp_lang'),
array("name" => __('Video Slider Settings', 'gp_lang'),
"type" => "title"),
array("type" => "open",
"id" => $shortname . "_video_slider_settings"),
@ -276,6 +281,20 @@ array("name" => __('Video Slider Settings', 'gp_lang'),
"size" => "small"),
array("type" => "close"),
array("name" => __('Dedication Settings', 'gp_lang'),
"type" => "title"),
array("type" => "open",
"id" => $shortname . "_dedication_settings"),
array(
"name" => __('Show \'new\' label', 'gp_lang'),
"desc" => __('Show new label on dedication thumbs', 'gp_lang'),
"id" => $shortname . "_show_new_label",
"std" => "1",
"options" => array(__('Disable', 'gp_lang'), __('Enable', 'gp_lang')),
"type" => "radio"),
array("type" => "close"),
array("name" => __('Slider Settings', 'gp_lang'),

View File

@ -83,7 +83,7 @@ class SidebarPosts extends WP_Widget {
<div <?php post_class('post-loop'); ?>>
<!--Begin Image-->
<?php if (has_post_thumbnail()) { ?>
<div class="post-thumbnail<?php if ($image_width >= 175) { ?> thumbnail-no-wrap<?php } ?>">
<div class="post-thumbnail<?php if ($image_width >= 175) { ?> thumbnail-no-wrap<?php } ?>">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?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)) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -104,7 +104,6 @@ function updateInfo() {
var artist = jQuery('#postdata-artist-' + id).html();
var song = jQuery('#postdata-song-' + id).html();
var link = jQuery('#postdata-link-' + id).html();
var comments = jQuery('#postdata-comments-' + id).html();
var nUrl = oUrl + 'id/' + the_id;
jQuery('#dedicate_this_song_button').attr("href", nUrl);
@ -153,6 +152,13 @@ function updateInfo() {
}
);
jQuery('#dedicationComments_container').slideDown();
if(jQuery('#postdata-mark-read-' + id).length > 0) {
console.log('doy por leido ' + id);
jQuery('#postdata-mark-read-' + id + ' .mar_mark_as_read').click();
jQuery('#postdata-mark-read-' + id).remove();
console.log('quito elemento ' + id);
}
}
}

View File

@ -17,6 +17,8 @@ if(get_post_meta($post->ID, 'ghostpool_thumbnail_height', true) && get_post_meta
$gp_settings['image_height'] = $gp_settings['thumbnail_height'];
}
// Song data
$gp_settings['video'] = get_post_meta($post->ID, 'ghostpool_dedication_url', true);
$gp_settings['artist'] = get_post_meta($post->ID, 'ghostpool_dedication_artist', true);
@ -30,12 +32,22 @@ if ($gp_settings['artist_song_span_short'] != $gp_settings['artist_song_span'])
$gp_settings['artist_song_span_short'] .= '...';
}
// from user
$gp_settings['from_user_id'] = get_the_author_meta('ID');
$gp_settings['from_user_link'] = '<a href="'.bp_core_get_userlink($gp_settings['from_user_id'], false, true).'" title="'.bp_core_get_username($gp_settings['from_user_id']).'">'.bp_core_get_username($gp_settings['from_user_id']).'</a>';
//bp_core_get_userlink($gp_settings['from_user_id']);
$gp_settings['from_flag'] = gp_get_the_flag($gp_settings['from_user_id']);
if ($gp_settings['from_user_id'] == mar_get_user_id()) :
$mark_as_read = mar_add_to_usermeta($post->ID);
$update_count = mar_increase_count($post->ID);
endif;
$read_posts = mar_get_user_read_posts( mar_get_user_id() );
$gp_settings['unreaded'] = (!in_array($post->ID, $read_posts));
// to user
$gp_settings['to_user_id'] = get_post_meta($post->ID, 'ghostpool_destination_user_id', true);
$gp_settings['to_user_email'] = get_post_meta($post->ID, 'ghostpool_destination_user_email', true);

View File

@ -17,8 +17,10 @@
<!--Begin Image-->
<?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(); ?>">
<?php if (($theme_show_new_label) && ($gp_settings['unreaded'])) { ?><span class="new-label"></span><?php } ?>
<?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>

View File

@ -149,7 +149,7 @@ ul.navmenu {
ul.navmenu li {
float: left;
width: 51px;
height: 85px;
height: 90px;
margin-left: 15px;
}
@ -157,13 +157,32 @@ ul.navmenu li a {
background-color: transparent;
display: block;
width: 51px;
height: 85px;
height: 90px;
position: relative;
}
ul.navmenu li a span {
display: none;
}
ul.navmenu li span.sign {
background-image: url("lib/images/icons.png");
background-position: 2px -451px;
background-repeat: no-repeat;
bottom: 4px;
color: #FFFFFF;
display: inline;
font-size: 9px;
font-weight: bold;
height: 22px;
line-height: 30px;
padding: 0 3px 0 0;
position: absolute;
right: 0;
text-align: right;
width: 22px;
}
ul.navmenu li a.friends {
background-image: url(lib/images/icons.png);
background-position: 0px -270px;
@ -1230,7 +1249,22 @@ h3.comments {
background-color: #F5F1F0;
}
.post-thumbnail a {
position: relative;
display: inline-block;
}
.new-label {
background-image: url("lib/images/icons.png");
background-position: -57px -451px;
background-repeat: no-repeat;
height: 45px;
position: absolute;
right: 0px;
top: -2px;
width: 45px;
z-index: 2;
}
/*************************** BuddyPress ***************************/

View File

@ -122,9 +122,7 @@ if (have_posts()) {
$data_type = 'vimeo_single';
$data_path = 'http://vimeo.com/api/v2/video/' . $video_id . '.json';
}
?>
<li data-type='<?php echo $data_type; ?>' data-path='<?php echo $data_path; ?>'>
<span id="postdata-id-<?php echo $slide_counter; ?>"><?php the_ID(); ?></span>
<span id="postdata-title-<?php echo $slide_counter; ?>"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
@ -134,6 +132,7 @@ if (have_posts()) {
<span id="postdata-comments-<?php echo $slide_counter; ?>">
<?php if (0) /*$_ishome)*/ require('home-comments.php'); ?>
</span>
<?php if (($theme_show_new_label) && ($gp_settings['unreaded'])) { ?><span id="postdata-mark-read-<?php echo $slide_counter; ?>"><?php echo mar_read_unread_links('', '', false); ?></span><?php } ?>
<span id="postdata-from-to-<?php echo $slide_counter; ?>">
<?php echo $gp_settings['from_flag']; ?><span>FROM: <?php echo $gp_settings['from_user_link']; ?></span>&nbsp;
<?php echo $gp_settings['to_flag']; ?>