Plugin Directory

Changeset 618262


Ignore:
Timestamp:
10/28/2012 02:48:54 PM (13 years ago)
Author:
leethompson
Message:

Added New Features

Location:
lazy-content-slider
Files:
2 added
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • lazy-content-slider/tags/2.4/lzcs.php

    r559497 r618262  
    2323    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2424*/
    25 
     25add_action( 'admin_enqueue_scripts', 'add_jscss' );
    2626add_action('admin_menu', 'lzcs_add_admin_menu');
    2727add_action('wp_enqueue_scripts', 'add_jscss');
     
    7171    }
    7272        add_filter('plugin_row_meta', 'lzcs_Plugin_Links',10,2);
     73    add_option('lzcs_count');
    7374}
    74 
    7575function lzcs_deactivate() {
    7676    delete_option('lzcs_cat');
    7777    delete_option('lzcs_color');
     78    delete_option('lzcs_count');
    7879}
    7980
     
    9091}
    9192
    92 function getDisplayPosts($limit = 4)
     93
     94function getDisplayPosts()
    9395{
     96    $limit = get_option('lzcs_count')-1;
    9497    $posts = get_option('lzcs_cat');
    9598    $args = array('category' => $posts );
     
    98101    $output = array();
    99102    foreach ($recent_posts as $post) {
    100         setup_postdata($post);
    101103        if (has_post_thumbnail($post['ID'])) {
    102104            $output[] = $post;
     
    119121    echo "<div id=\"featured\" >";
    120122    echo "<ul class=\"ui-tabs-nav\">";
    121 
    122123    foreach( $recent_posts as $recent ){
    123         setup_postdata($recent);
    124124        $postid = $recent["ID"];
    125 
    126         $thumbnail =  get_the_post_thumbnail( $postid, array(50, 50) );
    127        
     125        $thumbnail =  get_the_post_thumbnail($postid, array(50,50) );
    128126?>
    129127        <li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-<?php echo $recent["ID"] ?> ">
    130             <a href="#fragment-<?php echo $recent["ID"]; ?>">
    131                     <?php echo $thumbnail ?>
    132                     <span><?php echo esc_attr($recent["post_title"]); ?></span>
    133             </a>
     128            <a href="#fragment-<?php echo $recent["ID"]; ?>"><?php echo $thumbnail ?><span><?php echo esc_attr($recent["post_title"]); ?></span></a>
    134129        </li>
    135130<?php
     
    145140        $postexcerpt = string_limit_words($postexcerpt,15);
    146141
    147         $largeimage = get_the_post_thumbnail( $postid, array(400, 250));
     142        $largeimage = get_the_post_thumbnail($postid, array(400,250));
    148143?>                     
    149144        <div id="fragment-<?php echo $recent["ID"] ?>" class="ui-tabs-panel" >
  • lazy-content-slider/tags/2.4/lzcs_admin.php

    r551362 r618262  
    1717*/
    1818
    19 
    2019function register_lzcssettings() {
    2120        register_setting( 'lzcs_cat', 'lzcs' );
    2221    register_setting( 'lzcs_color', 'lzcs' );
     22    register_setting( 'lzcs_count', 'lzcs' );
    2323}
    2424
     
    2626    $myvariable = get_option('lzcs_cat');
    2727    $lzcscolor = get_option('lzcs_color');
     28    $lzcscount = get_option('lzcs_count');
    2829    if ($lzcscolor == "dark"){
    2930    $selected = "checked";
     
    3940    <table class="form-table">
    4041        <tr valign="top">
    41         <th scope="row">Current Category</th>
    42     <th scope="row"><?php $catid = get_option('lzcs_cat'); echo get_cat_name( $catid )?> </th>
    43     <tr><td>Select new category</td></tr><tr>
    44         <td><?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'lzcs', 'hierarchical' => true, 'echo' => 1, 'selected' => 0)); ?>
     42<?php $curcat = get_option('lzcs_cat'); ?>
     43    <tr><td>Select new category</td>
     44        <td><?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'lzcs', 'hierarchical' => true, 'echo' => 1, 'selected' => $curcat)); ?>
    4545    </td>
    4646        </tr>
    4747    <tr>
    4848      <td>Select Color</td>
    49     </tr>
    5049      <td>
    5150        <Input type = 'Radio' Name ='lzcs_color' value= 'light' <?php echo $selected_default ?>> Light
    5251
    5352        <Input type = 'Radio' Name ='lzcs_color' value= 'dark' <?php echo $selected ?>> Dark
     53
     54    </tr>
    5455    <tr>
    55    
     56      <td>How many articles to display</td>
     57        <td>
     58        <select name ="lzcs_count">
     59            <option value="1" <?php if (get_option('lzcs_count') == 1) { echo "selected = selected"; } ?>>One</option>
     60            <option value="2" <?php if (get_option('lzcs_count') == 2) { echo "selected = selected"; } ?>>Two</option>
     61            <option value="3" <?php if (get_option('lzcs_count') == 3) { echo "selected = selected"; } ?>>Three</option>
     62            <option value="4" <?php if (get_option('lzcs_count') == 4) { echo "selected = selected"; } ?>>Four</option>
     63            <option value="5" <?php if (get_option('lzcs_count') == 5) { echo "selected = selected"; } ?>>Five</option>
     64        </select>
     65        </td>
    5666    </table>
    5767
     
    6272</form>
    6373</div>
     74<div class="wrap">
     75<?php if (function_exists("drawslider")){ drawslider(); }; ?>
     76</div>
     77<br><br>
    6478<div class="wrap">
    6579<strong>How to use</strong><br>
     
    87101        $myvariable=$_POST["lzcs"];
    88102    $lzcscolor=$_POST["lzcs_color"];
     103    $lzcscount=$_POST["lzcs_count"];   
    89104    update_option('lzcs_cat', $myvariable);
    90105    update_option('lzcs_color', $lzcscolor);
     106    update_option('lzcs_count', $lzcscount);
    91107    draw_form();
    92108}else{
  • lazy-content-slider/tags/2.4/readme.txt

    r559497 r618262  
    44Tags: slider,content,featured,rotator
    55Requires at least: 2.9.2
    6 Tested up to: 3.3.2
    7 Stable tag: 2.3
     6Tested up to: 3.4.2
     7Stable tag: 2.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434[Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=25LDNVSUTHKAJ "Donate to support continued development")
    3535
     36Please rank this plugin at [Rate this plugin] http://wordpress.org/extend/plugins/lazy-content-slider/
     37
     38For [Support] http://wordpress.org/support/plugin/lazy-content-slider
     39
    3640== Installation ==
    37411. Upload this plugin to the `/wp-content/plugins/` directory and unzip it, or
     
    4347
    44484. Add the shortcut code [lazyslider] to any page or post.
    45     4a. add this "<?php if (function_exists("drawslider")){ drawslider(); }; ?>"  to index.php or any page where you want to use the slider.
     49    4a. add this `<?php if (function_exists("drawslider")){ drawslider(); }; ?>`  to index.php or any page where you want to use the slider.
    4650
    47515. Make sure the post has a featured image set.
     
    6266Per request added a color option for darker themes
    6367= 1.3.1 =
    64 fixing svn
     68Fixing svn
    6569= 1.3.2 =
    66 forgot to add dark style
     70Forgot to add dark style
    6771= 1.3.3 =
    68 commiting files
     72Commiting files
    6973= 2.0 =
    7074Removed font-family from css
     
    7680= 2.3 =
    7781Added hover pause
    78 
     82= 2.4 =
     83Added Preview
     84Added Article count
     85Cleaned up interface
    7986
    8087
     
    99106= 2.3 =
    100107Added hover pause
     108= 2.4 =
     109Added Preview
     110Added Article count
     111Cleaned up interface
  • lazy-content-slider/trunk/lzcs.php

    r559497 r618262  
    2323    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2424*/
    25 
     25add_action( 'admin_enqueue_scripts', 'add_jscss' );
    2626add_action('admin_menu', 'lzcs_add_admin_menu');
    2727add_action('wp_enqueue_scripts', 'add_jscss');
     
    7171    }
    7272        add_filter('plugin_row_meta', 'lzcs_Plugin_Links',10,2);
     73    add_option('lzcs_count');
    7374}
    74 
    7575function lzcs_deactivate() {
    7676    delete_option('lzcs_cat');
    7777    delete_option('lzcs_color');
     78    delete_option('lzcs_count');
    7879}
    7980
     
    9091}
    9192
    92 function getDisplayPosts($limit = 4)
     93
     94function getDisplayPosts()
    9395{
     96    $limit = get_option('lzcs_count')-1;
    9497    $posts = get_option('lzcs_cat');
    9598    $args = array('category' => $posts );
     
    98101    $output = array();
    99102    foreach ($recent_posts as $post) {
    100         setup_postdata($post);
    101103        if (has_post_thumbnail($post['ID'])) {
    102104            $output[] = $post;
     
    119121    echo "<div id=\"featured\" >";
    120122    echo "<ul class=\"ui-tabs-nav\">";
    121 
    122123    foreach( $recent_posts as $recent ){
    123         setup_postdata($recent);
    124124        $postid = $recent["ID"];
    125 
    126         $thumbnail =  get_the_post_thumbnail( $postid, array(50, 50) );
    127        
     125        $thumbnail =  get_the_post_thumbnail($postid, array(50,50) );
    128126?>
    129127        <li class="ui-tabs-nav-item ui-tabs-selected" id="nav-fragment-<?php echo $recent["ID"] ?> ">
    130             <a href="#fragment-<?php echo $recent["ID"]; ?>">
    131                     <?php echo $thumbnail ?>
    132                     <span><?php echo esc_attr($recent["post_title"]); ?></span>
    133             </a>
     128            <a href="#fragment-<?php echo $recent["ID"]; ?>"><?php echo $thumbnail ?><span><?php echo esc_attr($recent["post_title"]); ?></span></a>
    134129        </li>
    135130<?php
     
    145140        $postexcerpt = string_limit_words($postexcerpt,15);
    146141
    147         $largeimage = get_the_post_thumbnail( $postid, array(400, 250));
     142        $largeimage = get_the_post_thumbnail($postid, array(400,250));
    148143?>                     
    149144        <div id="fragment-<?php echo $recent["ID"] ?>" class="ui-tabs-panel" >
  • lazy-content-slider/trunk/lzcs_admin.php

    r551362 r618262  
    1717*/
    1818
    19 
    2019function register_lzcssettings() {
    2120        register_setting( 'lzcs_cat', 'lzcs' );
    2221    register_setting( 'lzcs_color', 'lzcs' );
     22    register_setting( 'lzcs_count', 'lzcs' );
    2323}
    2424
     
    2626    $myvariable = get_option('lzcs_cat');
    2727    $lzcscolor = get_option('lzcs_color');
     28    $lzcscount = get_option('lzcs_count');
    2829    if ($lzcscolor == "dark"){
    2930    $selected = "checked";
     
    3940    <table class="form-table">
    4041        <tr valign="top">
    41         <th scope="row">Current Category</th>
    42     <th scope="row"><?php $catid = get_option('lzcs_cat'); echo get_cat_name( $catid )?> </th>
    43     <tr><td>Select new category</td></tr><tr>
    44         <td><?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'lzcs', 'hierarchical' => true, 'echo' => 1, 'selected' => 0)); ?>
     42<?php $curcat = get_option('lzcs_cat'); ?>
     43    <tr><td>Select new category</td>
     44        <td><?php wp_dropdown_categories(array('hide_empty' => 0, 'name' => 'lzcs', 'hierarchical' => true, 'echo' => 1, 'selected' => $curcat)); ?>
    4545    </td>
    4646        </tr>
    4747    <tr>
    4848      <td>Select Color</td>
    49     </tr>
    5049      <td>
    5150        <Input type = 'Radio' Name ='lzcs_color' value= 'light' <?php echo $selected_default ?>> Light
    5251
    5352        <Input type = 'Radio' Name ='lzcs_color' value= 'dark' <?php echo $selected ?>> Dark
     53
     54    </tr>
    5455    <tr>
    55    
     56      <td>How many articles to display</td>
     57        <td>
     58        <select name ="lzcs_count">
     59            <option value="1" <?php if (get_option('lzcs_count') == 1) { echo "selected = selected"; } ?>>One</option>
     60            <option value="2" <?php if (get_option('lzcs_count') == 2) { echo "selected = selected"; } ?>>Two</option>
     61            <option value="3" <?php if (get_option('lzcs_count') == 3) { echo "selected = selected"; } ?>>Three</option>
     62            <option value="4" <?php if (get_option('lzcs_count') == 4) { echo "selected = selected"; } ?>>Four</option>
     63            <option value="5" <?php if (get_option('lzcs_count') == 5) { echo "selected = selected"; } ?>>Five</option>
     64        </select>
     65        </td>
    5666    </table>
    5767
     
    6272</form>
    6373</div>
     74<div class="wrap">
     75<?php if (function_exists("drawslider")){ drawslider(); }; ?>
     76</div>
     77<br><br>
    6478<div class="wrap">
    6579<strong>How to use</strong><br>
     
    87101        $myvariable=$_POST["lzcs"];
    88102    $lzcscolor=$_POST["lzcs_color"];
     103    $lzcscount=$_POST["lzcs_count"];   
    89104    update_option('lzcs_cat', $myvariable);
    90105    update_option('lzcs_color', $lzcscolor);
     106    update_option('lzcs_count', $lzcscount);
    91107    draw_form();
    92108}else{
  • lazy-content-slider/trunk/readme.txt

    r559497 r618262  
    44Tags: slider,content,featured,rotator
    55Requires at least: 2.9.2
    6 Tested up to: 3.3.2
    7 Stable tag: 2.3
     6Tested up to: 3.4.2
     7Stable tag: 2.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3434[Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=25LDNVSUTHKAJ "Donate to support continued development")
    3535
     36Please rank this plugin at [Rate this plugin] http://wordpress.org/extend/plugins/lazy-content-slider/
     37
     38For [Support] http://wordpress.org/support/plugin/lazy-content-slider
     39
    3640== Installation ==
    37411. Upload this plugin to the `/wp-content/plugins/` directory and unzip it, or
     
    4347
    44484. Add the shortcut code [lazyslider] to any page or post.
    45     4a. add this "<?php if (function_exists("drawslider")){ drawslider(); }; ?>"  to index.php or any page where you want to use the slider.
     49    4a. add this `<?php if (function_exists("drawslider")){ drawslider(); }; ?>`  to index.php or any page where you want to use the slider.
    4650
    47515. Make sure the post has a featured image set.
     
    6266Per request added a color option for darker themes
    6367= 1.3.1 =
    64 fixing svn
     68Fixing svn
    6569= 1.3.2 =
    66 forgot to add dark style
     70Forgot to add dark style
    6771= 1.3.3 =
    68 commiting files
     72Commiting files
    6973= 2.0 =
    7074Removed font-family from css
     
    7680= 2.3 =
    7781Added hover pause
    78 
     82= 2.4 =
     83Added Preview
     84Added Article count
     85Cleaned up interface
    7986
    8087
     
    99106= 2.3 =
    100107Added hover pause
     108= 2.4 =
     109Added Preview
     110Added Article count
     111Cleaned up interface
Note: See TracChangeset for help on using the changeset viewer.