Changeset 173905
- Timestamp:
- 11/15/2009 08:56:14 PM (16 years ago)
- Location:
- random-posts-widget-include/trunk
- Files:
-
- 8 added
- 1 deleted
- 2 edited
-
About.html (added)
-
defaults.php (deleted)
-
jquery-latest.pack.js (added)
-
randompages.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
-
screenshot-1.gif (added)
-
screenshot-2.gif (added)
-
screenshot-3.gif (added)
-
screenshot-4.gif (added)
-
thickbox-compressed.js (added)
-
thickbox.css (added)
Legend:
- Unmodified
- Added
- Removed
-
random-posts-widget-include/trunk/randompages.php
r158320 r173905 18 18 Description: This is a widget that displays a list of random pages/posts on your widgetized sidebar. 19 19 Author: John 0001 20 Version: 1.0 020 Version: 1.01 21 21 */ 22 include (dirname (__FILE__).'/defaults.php'); 22 23 24 //wp_register_script('thickbox', WP_PLUGIN_URL.'/random-posts-widget-include/thickbox-compressed.js',array('jquery'), '2.02'); 25 23 26 function random_pages($before,$after) 24 27 { … … 28 31 $list_type = $options['type'] ? $options['type'] : 'ul'; 29 32 $numPosts = $options['count']; 33 wp_enqueue_script('thickbox'); 30 34 if(is_null($numPosts) || $numPosts == 0) 31 35 $numPosts = '5'; … … 62 66 } 63 67 if (strlen($closing) > 0) $string_to_echo .= $closing; 68 $string_to_echo .= questionmark(); 64 69 return $string_to_echo; 70 } 71 72 function questionmark() 73 { 74 $path = WP_PLUGIN_URL.'/random-posts-widget-include/'; 75 return '<script type="text/javascript" src="'.$path.'jquery-latest.pack.js"></script> 76 <script type="text/javascript" src="'.WP_PLUGIN_URL.'thickbox-compressed.js"></script><link rel="stylesheet" href="'.$path.'thickbox.css" type="text/css" media="screen" /><span style="float:right;"><font size="1"><a class="thickbox" title="More About This Widget" href="'.$path.'About.html?height=120&width=400">?</a></font></span>'; 65 77 } 66 78 … … 194 206 } 195 207 208 add_action('admin_menu', 'my_plugin_menu'); 209 210 function my_plugin_menu() { 211 add_options_page('My Plugin Options', 'My Plugin', 'capability_required', 'your-unique-identifier', 'my_plugin_options'); 212 } 213 214 function my_plugin_options() { 215 echo '<div class="wrap">'; 216 echo '<p>Here is where the form would go if I actually had options.</p>'; 217 echo '</div>'; 218 } 219 220 196 221 add_action('widgets_init', 'widget_randompages_init'); 197 222 198 /* Attention Plugin Users199 The following line adds a link for my website to this widget in the footer200 I ask for no donations for this plugin. All that I ask is that201 you leave this link in place. I would also be happy to have a202 shout out to my plugin included in a post or footer or blogroll203 link or whereever, instead.204 To remove the link comment out the line below205 John [email protected]206 */207 add_action('wp_footer','random_footer_action');208 223 209 224 ?> -
random-posts-widget-include/trunk/readme.txt
r158317 r173905 3 3 Tags: widget,widgets,wordpress,Post, posts, admin, plugin, sidebar, links, page, pages,random, sidebar,google,seo,list 4 4 Requires at least: 2.1 5 Tested up to: 2.8. 35 Tested up to: 2.8.6 6 6 Stable tag: trunk 7 7 8 Displays random posts and pages in sidebar 8 Displays random posts and pages in sidebar. This increases the number of indexed pages and gives users an interesting way to browse your site. 9 10 == Description == 11 12 This is a widget that displays a list of random pages/posts on your widgetized sidebar. The widget displays random posts and pages in sidebar. This increases the number of indexed pages and gives users an interesting way to browse your site. 13 14 Benefits: 15 16 * Give visitors a fun way to browse your site. 17 * Get more pages of your site indexed. 18 19 **Questions, Comments and feature suggestions** 20 21 Please leave questions and comments on my <a href="http://bunkandloftbeds.com/random-pages-widget/">plugin page</a> 22 23 If you like this plugin please give me a good rating! I ask for no donations. If you'd like to donate, donate to wordpress.org. 24 25 == Installation == 26 27 1. Upload folder into to the `/wp-content/plugins/` directory 28 1. Activate the plugin through the 'Plugins' menu in WordPress 29 1. Use your 'Presentation'/'Sidebar Widgets' settings to drag and configure 30 31 == Screenshots == 32 1. Setup: Setting Title 33 2. Setup: Choose to display random pages or posts or both. Standard blog users most likley want to selected 'posts' 34 3. Setup: List type - <ul> should work for 99% of cases but is adjustable to suit your theme. 35 4. Setup: Page Count setting - how many pages should be displayed in the widget. 36 37 38 == Configuration == 39 40 * Widget title: the title of the widget 41 * Pages Or Posts: display random pages or random posts or both 42 * List types: ul for bulleted list, p for paragraph, br for paragraph with line breaks 43 * Page count: Number of random pages you would like to be displayed 44 45 == Frequently Asked Questions == 46 47 48 Why does this include jquery 49 50 * Newer versions of wordpress include jquery automatically. I am including it here to support old versions. 51 52 What is with the question mark 53 54 * There is a very small question mark included in the clock that leads you to the information page for this widget. This is to spread the word about my widget to other people who be interested in installing it. You can remove this if you like, but I would really appreciate some other form of attribution (blog post, blogroll link, or whatever) 55 56 57 58 59 == Change Log == 60 1.01 61 62 * initial release 63 64 1.01 65 66 * revamped 67 68 Known Issues: 69 70 * version 2.8.2 & 2.8.5 of wordpress + firefox make it hard to setup this widget from the admin panel upgrade wordpress OR try another browser. All other browser should work, and you can still set it properly, it is just hard to select the drop down values.
Note: See TracChangeset
for help on using the changeset viewer.