Changeset 175005
- Timestamp:
- 11/18/2009 05:23:21 PM (16 years ago)
- Location:
- user-link-feed
- Files:
-
- 26 added
- 5 edited
-
tags/1.1.1/user-link-feed-class.php (modified) (1 diff)
-
tags/1.1.1/user-link-feed.php (modified) (1 diff)
-
tags/1.1.2 (added)
-
tags/1.1.2/display (added)
-
tags/1.1.2/display/dashboard (added)
-
tags/1.1.2/display/dashboard/new-feed.php (added)
-
tags/1.1.2/display/feed (added)
-
tags/1.1.2/display/feed-form.php (added)
-
tags/1.1.2/display/feed.php (added)
-
tags/1.1.2/display/feed.png (added)
-
tags/1.1.2/display/feed/index.php (added)
-
tags/1.1.2/display/options-main.php (added)
-
tags/1.1.2/display/user-link-feed.css (added)
-
tags/1.1.2/display/widget (added)
-
tags/1.1.2/display/widget/feed-control.php (added)
-
tags/1.1.2/display/widget/feed.php (added)
-
tags/1.1.2/license.txt (added)
-
tags/1.1.2/readme.txt (added)
-
tags/1.1.2/recaptcha (added)
-
tags/1.1.2/recaptcha/LICENSE (added)
-
tags/1.1.2/recaptcha/README (added)
-
tags/1.1.2/recaptcha/recaptchalib.php (added)
-
tags/1.1.2/screenshot-1.jpg (added)
-
tags/1.1.2/screenshot-2.jpg (added)
-
tags/1.1.2/screenshot-3.jpg (added)
-
tags/1.1.2/user-link-feed-class.php (added)
-
tags/1.1.2/user-link-feed-pagination-class.php (added)
-
tags/1.1.2/user-link-feed.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/user-link-feed-class.php (modified) (7 diffs)
-
trunk/user-link-feed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
user-link-feed/tags/1.1.1/user-link-feed-class.php
r174573 r175005 4 4 * 5 5 * @author Sulaeman 6 * @version 1.1. 06 * @version 1.1.1 7 7 * @package user-link-feed 8 8 */ -
user-link-feed/tags/1.1.1/user-link-feed.php
r174573 r175005 4 4 Plugin URI: http://sulaeman.nundut.com/2009/11/user-link-feed-plugin-for-wordpress/ 5 5 Description: User Link Feed enables user blog to contribute link feeds. 6 Version: 1.1. 06 Version: 1.1.1 7 7 Author: Sulaeman 8 8 Author URI: http://sulaeman.nundut.com/ -
user-link-feed/trunk/readme.txt
r174583 r175005 5 5 Requires at least: 2.8.x 6 6 Tested up to: 2.8.6 7 Stable tag: 1.1. 17 Stable tag: 1.1.2 8 8 9 9 == Description == … … 23 23 * Delete Feed on Admin Panel. 24 24 * Feed List Sidebar Widget 25 * New 5 Link Feed Dashboard Widget 25 26 * If you want to customize the user-link-feed.css stylesheet, you can place it in your active theme folder, and User Link Feed will find it there (that way you won't lose your stylesheet customizations when upgrading User Link Feed). 26 27 … … 37 38 38 39 == Changelog == 40 41 = 1.1.2 = 42 * add new 5 feed list dashboard widget 43 * fix url existance checking 39 44 40 45 = 1.1.1 = -
user-link-feed/trunk/user-link-feed-class.php
r174573 r175005 4 4 * 5 5 * @author Sulaeman 6 * @version 1.1. 06 * @version 1.1.2 7 7 * @package user-link-feed 8 8 */ … … 27 27 add_action('template_redirect', array(ULF_PLUGIN_NAME, 'get_head_tags')); 28 28 add_action('plugins_loaded', array(ULF_PLUGIN_NAME, 'setup_widget')); 29 30 // Hook to register new widgets 31 if (function_exists('wp_add_dashboard_widget')) 32 { 33 do_action('wp_dashboard_setup'); 34 wp_add_dashboard_widget('ulf_dashboard_widget', 'New User Link Feed', array(ULF_PLUGIN_NAME, 'dashboard_feed_list')); 35 } 29 36 30 37 // check for previously installed version 1.0.0 … … 191 198 } 192 199 193 function get_link_feed_list($template, $options, $ use_pagination = TRUE)200 function get_link_feed_list($template, $options, $approved = TRUE, $use_pagination = TRUE) 194 201 { 195 202 global $wpdb, $query_string; … … 199 206 $curr_feed_page = (isset($paged) && $paged > 0) ? $paged : 1; 200 207 201 $n_feed = $wpdb->get_var('SELECT count(meta_key) as n_new_feed FROM ' . $wpdb->postmeta . ' WHERE meta_key = "ulf" AND meta_value LIKE "%\"approved\";s:1:\"1\";%" LIMIT 1'); 202 $feeds = $wpdb->get_results('SELECT meta_key, meta_value FROM ' . $wpdb->postmeta . ' WHERE meta_key = "ulf" AND meta_value LIKE "%\"approved\";s:1:\"1\";%" ORDER BY meta_id DESC LIMIT ' . (($curr_feed_page - 1) * $max_feed_per_page) . ', ' . $max_feed_per_page, ARRAY_A); 208 $status_query = '\"approved\";s:1:\"1\";'; 209 if (!$approved) 210 { 211 $status_query = '\"approved\";s:1:\"0\";'; 212 } 213 214 $n_feed = $wpdb->get_var('SELECT count(meta_key) as n_new_feed FROM ' . $wpdb->postmeta . ' WHERE meta_key = "ulf" AND meta_value LIKE "%'.$status_query.'%" LIMIT 1'); 215 $feeds = $wpdb->get_results('SELECT meta_key, meta_value FROM ' . $wpdb->postmeta . ' WHERE meta_key = "ulf" AND meta_value LIKE "%'.$status_query.'%" ORDER BY meta_id DESC LIMIT ' . (($curr_feed_page - 1) * $max_feed_per_page) . ', ' . $max_feed_per_page, ARRAY_A); 203 216 204 217 if ($use_pagination) … … 264 277 265 278 // check is url already exist 266 $meta_id = $wpdb->get_var('SELECT meta_id FROM ' . $wpdb->postmeta . ' WHERE meta_key = "ulf" AND meta_value like "%\"'.mysql_real_escape_string($_POST['u rl']).'\";%" LIMIT 1');279 $meta_id = $wpdb->get_var('SELECT meta_id FROM ' . $wpdb->postmeta . ' WHERE meta_key = "ulf" AND meta_value like "%\"'.mysql_real_escape_string($_POST['ulf_url']).'\";%" LIMIT 1'); 267 280 if ($meta_id == null) 268 281 { … … 406 419 } 407 420 421 function dashboard_feed_list() 422 { 423 $options = array(); 424 $options['max_feed_per_page'] = 5; 425 $options['show_description'] = 0; 426 $options['view_all_url'] = 1; 427 echo User_Link_Feed::get_link_feed_list('dashboard/' . ULF_NEW_LIST_TEMPLATE, $options, FALSE, FALSE); 428 } 429 408 430 function setup_widget() 409 431 { … … 423 445 $title = $options['title']; 424 446 echo $before_widget . $before_title . $title . $after_title; 425 echo User_Link_Feed::get_link_feed_list('widget/' . ULF_LIST_TEMPLATE, $options, FALSE);447 echo User_Link_Feed::get_link_feed_list('widget/' . ULF_LIST_TEMPLATE, $options, TRUE, FALSE); 426 448 echo $after_widget; 427 449 } -
user-link-feed/trunk/user-link-feed.php
r174186 r175005 4 4 Plugin URI: http://sulaeman.nundut.com/2009/11/user-link-feed-plugin-for-wordpress/ 5 5 Description: User Link Feed enables user blog to contribute link feeds. 6 Version: 1.1. 06 Version: 1.1.2 7 7 Author: Sulaeman 8 8 Author URI: http://sulaeman.nundut.com/ … … 20 20 define('ULF_FORM_TEMPLATE', 'feed-form.php'); 21 21 define('ULF_WIDGET_FEED_CONTROL_TEMPLATE', 'feed-control.php'); 22 define('ULF_NEW_LIST_TEMPLATE', 'new-feed.php'); 23 24 require_once(ABSPATH . '/wp-includes/pluggable.php'); 25 26 get_currentuserinfo(); 27 28 if ($current_user->wp_capabilities['administrator'] == 1) 29 { 30 require_once(ABSPATH . '/wp-admin/includes/template.php'); 31 require_once(ABSPATH . '/wp-admin/includes/dashboard.php'); 32 } 22 33 23 34 include_once('user-link-feed-class.php');
Note: See TracChangeset
for help on using the changeset viewer.