Plugin Directory

Changeset 173905


Ignore:
Timestamp:
11/15/2009 08:56:14 PM (16 years ago)
Author:
john0001
Message:
 
Location:
random-posts-widget-include/trunk
Files:
8 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • random-posts-widget-include/trunk/randompages.php

    r158320 r173905  
    1818Description: This is a widget that displays a list of random pages/posts on your widgetized sidebar.
    1919Author: John 0001   
    20 Version: 1.00
     20Version: 1.01
    2121*/
    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
    2326function random_pages($before,$after)
    2427{
     
    2831    $list_type = $options['type'] ? $options['type'] : 'ul';
    2932    $numPosts = $options['count'];
     33    wp_enqueue_script('thickbox');
    3034    if(is_null($numPosts) || $numPosts == 0)
    3135        $numPosts = '5';
     
    6266    }
    6367    if (strlen($closing) > 0) $string_to_echo .= $closing;
     68     $string_to_echo .= questionmark();
    6469    return $string_to_echo;
     70}
     71
     72function 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>';
    6577}
    6678
     
    194206}
    195207
     208add_action('admin_menu', 'my_plugin_menu');
     209
     210function my_plugin_menu() {
     211  add_options_page('My Plugin Options', 'My Plugin', 'capability_required', 'your-unique-identifier', 'my_plugin_options');
     212}
     213
     214function 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
    196221add_action('widgets_init', 'widget_randompages_init');
    197222
    198 /* Attention Plugin Users
    199    The following line adds a link for my website to this widget in the footer
    200    I ask for no donations for this plugin.  All that I ask is that
    201    you leave this link in place.  I would also be happy to have a
    202    shout out to my plugin included in a post or footer or blogroll
    203    link or whereever, instead. 
    204    To remove the link comment out the line below
    205    John [email protected]
    206 */
    207 add_action('wp_footer','random_footer_action');
    208223
    209224?>
  • random-posts-widget-include/trunk/readme.txt

    r158317 r173905  
    33Tags: widget,widgets,wordpress,Post, posts, admin, plugin, sidebar, links, page, pages,random, sidebar,google,seo,list
    44Requires at least: 2.1
    5 Tested up to: 2.8.3
     5Tested up to: 2.8.6
    66Stable tag: trunk
    77
    8 Displays random posts and pages in sidebar
     8Displays 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
     12This 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
     14Benefits:
     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
     21Please leave questions and comments on my <a href="http://bunkandloftbeds.com/random-pages-widget/">plugin page</a>
     22
     23If 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
     271. Upload folder into to the `/wp-content/plugins/` directory
     281. Activate the plugin through the 'Plugins' menu in WordPress
     291. Use your 'Presentation'/'Sidebar Widgets' settings to drag and configure
     30
     31== Screenshots ==
     321. Setup: Setting Title
     332. Setup: Choose to display random pages or posts or both.  Standard blog users most likley want to selected 'posts'
     343. Setup: List type - <ul> should work for 99% of cases but is adjustable to suit your theme.
     354. 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
     48Why does this include jquery
     49
     50* Newer versions of wordpress include jquery automatically.  I am including it here to support old versions.
     51
     52What 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 ==
     601.01
     61
     62* initial release
     63
     641.01
     65
     66* revamped
     67
     68Known 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.