Plugin Directory

Changeset 146859


Ignore:
Timestamp:
08/18/2009 05:30:47 AM (17 years ago)
Author:
jeff_
Message:

minor javascript and CSS bug fixed ; last preparation for the option page

Location:
frontpage-slideshow/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • frontpage-slideshow/trunk/frontpage-slideshow.php

    r146858 r146859  
    55Plugin URI: http://www.modulaweb.fr/blog/wp-plugins/frontside-slideshow/en/
    66Description: Frontpage Slideshow provides a slide show like you can see on <a href="http://linux.com">linux.com</a> or <a href="http://modulaweb.fr/">modulaweb.fr</a> front page. <a href="options-general.php?page=frontpage-slideshow">Configuration Page</a>
    7 Version: 0.2
     7Version: 0.3
    88Author: Jean-François VIAL
    99Author URI: http://www.modulaweb.fr/
     
    2828function frontpageSlideshow($content,$admin_page=false) {
    2929   
    30     // modify this var to change the slideshow category
    31     $fscategory='fs-cat';
    32     // make sur to change this var on the other funtion below
     30    $options = frontpageSlideshow_get_options();
     31
     32    $fscategory = join(',',$options['values']['fs_cats']);
    3333
    3434    if ((!is_feed() && is_front_page()) || $admin_page) { // the slideshow is only displayed on frontpage
    3535        // get the 4th newer posts
    36         $fsposts = get_posts('category_name='.$fscategory.'&orderby=ID&numberposts=4&order=DESC');
     36        $fsposts = get_posts('category_name='.$fscategory.'&orderby=ID&numberposts='.$options['values']['fs_slides'].'&order=DESC');
    3737        // put post in more logical order
    3838        $fsposts = array_reverse($fsposts);
     
    6363                $fscontent .= '<div id="fs-entry-button-comment-'.$id.'" class="fs-comment">'.$entry['button-comment'].'</div>';
    6464                $fscontent .= '<img id="fs-entry-img-'.$id.'" class="fs-skip" src="'.$entry['image'].'"';
    65                 if ($id == $fslast) $fscontent .= ' onload="fsDoSlide()"'; // put this to makeanother loop after the last image
     65                if ($id == $fslast) $fscontent .= ' onload="fsDoSlide()"'; // put this to make another loop after the last image
    6666                $fscontent .= ' />';
    6767                $fscontent .= '<span id="fs-entry-comment-'.$id.'" class="fs-skip">'.$entry['comment'].'</span>';
     
    7777}
    7878
    79 function frontpageSlideshow_header() {
     79function frontpageSlideshow_header($admin_page=false) {
    8080    $options = frontpageSlideshow_get_options();
    81     // modify this var to change the slideshow category
    82     $fscategory='fs-cat';
    83     // make sur to change this var on the other funtion before
    84     $fsposts = get_posts('category_name='.$fscategory.'&orderby=ID&numberposts=4');
    85     $fslast = count($fsposts) - 1;
    86 
    87     frontpageSlideshow_JS($options,$fslast);
    88     frontpageSlideshow_CSS($options);
     81
     82    $fscategory = join(',',$options['values']['fs_cats']);
     83    if ((!is_feed() && is_front_page()) || $admin_page) { // the slideshow is only displayed on frontpage
     84        $fsposts = get_posts('category_name='.$fscategory.'&orderby=ID&numberposts='.$options['values']['fs_slides']);
     85        $fslast = count($fsposts) - 1;
     86   
     87        frontpageSlideshow_JS($options,$fslast);
     88        frontpageSlideshow_CSS($options);
     89    }
    8990}
    9091
     
    206207    font-weight: bold;
    207208    font-size: 11px;
    208     line-height: 1.2em;
     209    line-height: 1.4em;
    209210}
    210211#fs-excerpt {
     
    242243}
    243244.fs-current {
    244     background-color: #444;
     245    background-color: #444!important;
    245246}
    246247.fs-entry {
    247248    background-color: #000;
    248249    margin: 0;
     250    overflow: hidden;
    249251}
    250252.fs-entry:hover {
     
    383385                    <div class="inside" style="padding: 5px;">
    384386                        <?
    385                             frontpageSlideshow_header();
     387                            frontpageSlideshow_header(true);
    386388                            echo frontpageSlideshow('',true);                       
    387389                        ?>
  • frontpage-slideshow/trunk/readme.txt

    r146858 r146859  
    55Requires at least: 2.0
    66Tested up to: 2.8.4
    7 Stable tag: 0.2
     7Stable tag: 0.3
    88
    99Frontpage Slideshow provides a slide show like you can see in linux.com front page
     
    3232
    33331. Upload `frontpage-slideshow.zip` to the `/wp-content/plugins/` directory and uncompress it.
     341. Create a specific category called "fs-cat" and put some posts on it
    34351. Activate the plugin through the 'Plugins' menu in WordPress
    35 1. Create a specific category called "fs-cat"
    36 1. Put short-tag "[frontpage-slideshow]" onto your frontpage
     361. No short-tag is needed : the plugin work as soon as activated
    3737
    3838== Frequently Asked Questions ==
     
    4343v 0.1 : very first release usable but no option page
    4444v 0.2 : some terrible graphic bugs fixed : option page under construction and preview
     45v 0.3 : some minor javascript and CSS bugs fixed : now the plugon is ready for the option-page and fine tunes.
    4546
    4647== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.