Plugin Directory

Changeset 158307


Ignore:
Timestamp:
09/27/2009 02:25:24 AM (17 years ago)
Author:
jeff_
Message:

improving the loading of javascript frameworks needed, the shortcode funtionnality added, alternative picture option added, when no link is set, the URL of the post can be used

Location:
frontpage-slideshow/trunk
Files:
1 deleted
2 edited

Legend:

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

    r147714 r158307  
    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.5
     7Version: 0.6
    88Author: Jean-François VIAL
    99Author URI: http://www.modulaweb.fr/
     
    2525    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2626*/
    27 
    28 function frontpageSlideshow($content,$admin_page=false,$options=array()) {
     27$fs_already_displayed = false; // the slideshow dont have been displayed yet
     28function frontpageSlideshow($content,$force_display=false,$options=array()) {
     29    global $fs_already_displayed;
     30
     31    if ($fs_already_displayed) return false;
     32
    2933    if (!count($options)) $options = frontpageSlideshow_get_options();
    30     if (!$options['values']['fs_is_activated'] && !$admin_page) return $content;
     34    if (!$options['values']['fs_is_activated'] && !$force_display) return $content;
    3135
    3236    $fscategories = join(',',$options['values']['fs_cats']);
    3337
    34     if ((!is_feed() && is_front_page()) || $admin_page) { // the slideshow is only displayed on frontpage
     38    if ((!is_feed() && is_front_page() && $options['values']['fs_insert']!='shortcode') || $force_display) { // the slideshow is only displayed on frontpage
     39        $fs_already_displayed = true;
    3540        // get the 4th newer posts
    3641        $fsposts = get_posts('category='.$fscategories.'&orderby=ID&numberposts='.$options['values']['fs_slides'].'&order=DESC');
     
    4348            $comment = get_post_meta($fspost->ID,'fs-comment',true);
    4449            $buttoncomment = get_post_meta($fspost->ID,'fs-button-comment',true);
     50            $link='';
     51            // if the option is on, uses the post permalink as slide link
     52            ($options['values']['fs_default_link_to_page_link'] && get_post_meta($fspost->ID,'fs-link',true) == '') ? $link = get_permalink($fspost->ID) : $link = get_post_meta($fspost->ID,'fs-link',true);
     53            $image = get_post_meta($fspost->ID,'fs-picture',true);
     54            if ($image == '') { // if no image : use the first image on the post
     55                $image = $fspost->post_content;
     56                preg_match('/<img.*src="([^"]*)"/',$image,$matches);
     57                $image = $matches[1];
     58            }
     59
    4560            // handles https for the link
    46             (!is_ssl()) ? $link = str_replace('https://','http://',get_post_meta($fspost->ID,'fs-link',true)) : $link = str_replace('http://','https://',get_post_meta($fspost->ID,'fs-link',true));
    47             $image = $fspost->post_content;
    48             preg_match('/<img.*src="([^"]*)"/',$image,$matches);
    49             $image = $matches[1];
     61            (!is_ssl()) ? $link = str_replace('https://','http://',$link) : $link = str_replace('http://','https://',$link);
    5062            // handles https for image
    5163            (!is_ssl()) ? $image = str_replace('https://','http://',$image) : $image = str_replace('http://','https://',$image);
    5264            // put infos into an array
     65
    5366            $fsentries[] = array('title' => $title.'&nbsp;', 'image' => $image, 'comment' => $comment.'&nbsp;', 'button-comment' => $buttoncomment.'&nbsp;', 'link' => $link);
    5467        }
     
    5770        $fslast = count($fsentries) -1;
    5871        if (count($fsentries)) {
    59             $fscontent = '<div id="fs-main"><div id="fs-slide"><div id="fs-image"><div id="fs-placeholder"><a href="#top" onclick="if (fsid>-1) { if ($(\'fs-entry-link-\'+fsid).innerHTML != \'\') { this.href=$(\'fs-entry-link-\'+fsid).innerHTML; } }">&nbsp;</a></div><div id="fs-text"><div id="fs-title">&nbsp;</div><div id="fs-excerpt">&nbsp;</div></div></div></div><ul>';
     72            $fscontent = '<div id="fs-main"><div id="fs-slide"><div id="fs-picture"><div id="fs-placeholder"><a href="#frontpage-slideshow" onclick="if (fsid>-1) { if ($(\'fs-entry-link-\'+fsid).innerHTML != \'\') { this.href=$(\'fs-entry-link-\'+fsid).innerHTML; } }">&nbsp;</a></div><div id="fs-text"><div id="fs-title">&nbsp;</div><div id="fs-excerpt">&nbsp;</div></div></div></div><ul>';
    6073            foreach ($fsentries as $id=>$entry) {
    6174                $fscontent .= '<li id="fs-entry-'.$id.'" class="fs-entry" onclick="window.clearInterval(fsinterval); fsChangeSlide('.$id.')">';
     
    7790}
    7891
    79 function frontpageSlideshow_header($admin_page=false,$options=array()) {
    80     if (!count($options)) $options = frontpageSlideshow_get_options();
    81     if (!$options['values']['fs_is_activated'] && !$admin_page) return;
    82 
    83     $fscategories = join(',',$options['values']['fs_cats']);
    84     if ((!is_feed() && is_front_page()) || $admin_page) { // the slideshow is only displayed on frontpage
    85         $fsposts = get_posts('category='.$fscategories.'&orderby=ID&numberposts='.$options['values']['fs_slides']);
    86         $fslast = count($fsposts) - 1;
    87    
    88         frontpageSlideshow_JS($options,$fslast);
    89         frontpageSlideshow_CSS($options);
    90     }
    91 }
    92 
    93 function frontpageSlideshow_JS($options,$fslast) {
     92function frontpageSlideshow_init() {
     93    // loads the needed frameworks to load as a safe way
     94    wp_enqueue_script('scriptaculous-effects'); // will load PrototypeJS ans Scriptaculous + Scriptaculous Effects
     95}
     96
     97function frontpageSlideshow_header($force_display=false,$options=array()) {
     98    if ((!is_feed() && is_front_page()) || $force_display) {
     99        if (!count($options)) $options = frontpageSlideshow_get_options();
     100        if (!$options['values']['fs_is_activated'] && !$force_display) return;
     101
     102        $fscategories = join(',',$options['values']['fs_cats']);
     103        if ((!is_feed() && is_front_page()) || $force_display) { // the slideshow is only displayed on frontpage
     104            $fsposts = get_posts('category='.$fscategories.'&orderby=ID&numberposts='.$options['values']['fs_slides']);
     105            $fslast = count($fsposts) - 1;
     106
     107            frontpageSlideshow_JS($options,$fslast,$force_display);
     108            frontpageSlideshow_CSS($options,$force_display);
     109        }
     110    }
     111}
     112
     113function frontpageSlideshow_JS($options,$fslast,$force_display=false) {
     114    if ((!is_feed() && is_front_page() && is_page()) || $force_display) {
    94115?>
    95 <? /*   If the Prototype javascript framework is already loaded before, you could comment this line */ ?>
    96 <script type="text/javascript" src="<? (is_ssl()) ? $url = str_replace('http://','https://',get_bloginfo('url')) : $url = str_replace('https://','http://',get_bloginfo('url')); echo $url  ?>/wp-includes/js/prototype.js"></script>
    97 <? /*   If the Scriptaculous javascript framework is already loaded before, you could comment this line */ ?>
    98 <script type="text/javascript" src="<? (is_ssl()) ? $url = str_replace('http://','https://',get_bloginfo('url')) : $url = str_replace('https://','http://',get_bloginfo('url')); echo $url  ?>/wp-content/plugins/frontpage-slideshow/js/scriptaculous.js?load=effects"></script>
    99 <?/*    Please, do not edit the javascript code below  */ ?>
    100116<script type="text/javascript">
    101117/* <![CDATA[ */
     
    110126}
    111127function fsChangeSlide2() {
    112     $('fs-image').style.backgroundImage='url('+$('fs-entry-img-'+fsid).src+')';
     128    $('fs-picture').style.backgroundImage='url('+$('fs-entry-img-'+fsid).src+')';
    113129    $('fs-title').innerHTML=$('fs-entry-title-'+fsid).innerHTML;
    114130    $('fs-excerpt').innerHTML=$('fs-entry-comment-'+fsid).innerHTML;
     
    129145</script>
    130146<?
    131 }
    132 
    133 function frontpageSlideshow_CSS($options) {
     147    }
     148}
     149
     150function frontpageSlideshow_CSS($options,$force_display=false) {
     151    if ((!is_feed() && is_front_page() && is_page()) || $force_display) {
    134152/*
    135153    Here comes the CSS ruleset
    136154    You can, of course, edit it to fit your needs
    137155    Maybe later, a configuration page will come and allow to tweak the css rules in a more flexible way
    138    
     156
    139157*/
    140158?>
     
    170188    border-radius: 5px;
    171189}
    172 #fs-image {
     190#fs-picture {
    173191    width: 100%;
    174192    height: 100%;
     
    245263
    246264    list-style: none!important;
    247    
     265
    248266    background-image: none!important;
    249267
     
    291309</style>
    292310<?
    293 }
    294 
    295 function frontpageSlideshow_get_options($get_defaults=false) {
     311    }
     312}
     313
     314function frontpageSlideshow_dedicated_shortcode ($attributes, $content=null) {
     315    global $fs_already_displayed;
     316
     317    $options = frontpageSlideshow_get_options(); // get default or tweaked options
     318
     319    // dont do anything if
     320    //  - the slideshow has already been displayed
     321    //  - the slideshow has not been activated
     322    //  - the shortcode option is not activated
     323    // parse the other eventually nested shortcodes and display the enventualy specified content
     324    if ($fs_already_displayed || !$options['values']['fs_is_activated'] || $options['values']['fs_insert']!='shortcode') return do_shortcode($content);
     325
     326    $options['values'] = shortcode_atts($options['values'], $attributes);
     327    $force_display_if_shortcode = true;
     328    frontpageSlideshow_header(true,$options);
     329    return frontpageSlideshow('',true,$options);
     330}
     331
     332function frontpageSlideshow_get_options($get_defaults=false,$return_unique=null) {
    296333    $defaults = array (
    297334                'values' => array (
     
    300337                    'fs_slides'             => 4,
    301338                    'fs_show_buttons'       => 1,
     339                    'fs_shortcode'          => 'FrontpageSlideshow',
     340                    'fs_insert'             => 'frontpage',
     341                    'fs_default_link_to_page_link'  => 0,
    302342                    'fs_main_width'         => '732px',
    303343                    'fs_main_height'        => '260px',
     
    321361                    'fs_slides'             => 'integer',
    322362                    'fs_show_buttons'       => 'bool',
     363                    'fs_shortcode'          => 'shortcode',
     364                    'fs_insert'             => 'insert-mode',
     365                    'fs_default_link_to_page_link'  => 'bool',
    323366                    'fs_main_width'         => 'css-size',
    324367                    'fs_main_height'        => 'css-size',
     
    341384                    'fs_slides'             => __('The number of slides to show','frontpage-slideshow'),
    342385                    'fs_show_buttons'       => __('The "Show buttons" option','frontpage-slideshow'),
     386                    'fs_shortcode'          => __('The "Custom shortcode" option','frontpage-slideshow'),
     387                    'fs_insert'             => __('The "how to include" mode','frontpage-slideshow'),
     388                    'fs_default_link_to_page_link'  => __('The "default link behavior" mode','frontpage-slideshow'),
    343389                    'fs_main_width'         => __('The slideshow width','frontpage-slideshow'),
    344390                    'fs_main_height'        => __('The slideshow height','frontpage-slideshow'),
     
    357403                ),
    358404              );
    359                    
     405
    360406    if ($get_defaults) {
    361407        $options = $defaults;
    362     } else {   
     408    } else {
    363409        $options = get_option('frontpage-slideshow',$defaults);
    364410    }
    365    
     411    if (!is_null($return_unique) && isset($options['values'][$return_unique])) return $options['values'][$return_unique];
     412
    366413    return $options + $infos;
    367414}
     
    448495                    } else {
    449496                        $val = str_replace('%','',trim($val)).'%';
     497                        $value_ok = true;
     498                    }
     499                    break;
     500                case 'shortcode':
     501                    if (strlen(trim($val))==0 && trim($_POST['fs_insert']) == 'shortcode' && !preg_match('/^[a-z0-9-_]*$/i',trim($val)) ) {
     502                        $bad_values[] = $options['names'][$key];
     503                    } else {
     504                        $val = trim($val);
     505                        $value_ok = true;
     506                    }
     507                    break;
     508                case 'insert-mode':
     509                    $insertModes = array('frontpage', 'shortcode');
     510                    if (!in_array(trim($val),$insertModes)) {
     511                        $bad_values[] = $options['names'][$key];
     512                    } else {
     513                        $val = trim($val);
    450514                        $value_ok = true;
    451515                    }
     
    520584        $message = '<p>'.__('The plugins has been enabled.', 'frontpage-slideshow').'</p>';
    521585    }
    522    
     586
    523587    if (!$options['values']['fs_is_activated']) $message .= '<p style="color: red; font-weight: bold;">'.__('The plugin is currently disabled.', 'frontpage-slideshow').'</p>';
    524588    ?>
     
    535599                        <?
    536600                            frontpageSlideshow_header(true,$options);
    537                             echo frontpageSlideshow('',true,$options);                                                 
     601                            echo frontpageSlideshow('',true,$options);
    538602                        ?>
    539                         <p><strong><?_e('Important: ','frontpage-slideshow')?></strong> <?_e('due to some big differences between themes ans due to some','frontpage-slideshow')?></p>
     603                        <p><strong><?_e('Important: ','frontpage-slideshow')?></strong> <?_e('the slideshow may appear differently here and on your site due to the stylesheet of your theme.','frontpage-slideshow')?></p>
    540604                    </div>
    541605                </div>
     
    558622                        ?>
    559623                        </label></p>
     624                    </div>
     625                </div>
     626                <div class="postbox closed">
     627                    <div class="handlediv" title="Cliquez pour ouvrir/fermer"><br /></div>
     628                    <h3><span><?_e('About inserting the slideshow','frontpage-slideshow')?></span></h3>
     629                    <div class="inside" style="padding: 5px;">
     630                        <p><?_e('Where to insert the slideshow ?','frontpage-slideshow')?></p><? echo $options['values']['fs_insert']; ?>
     631                        <ul style="list-style: none">
     632                            <li><label for="fs_insert_1"><input type="radio" id="fs_insert_1" name="fs_insert" value="frontpage"<? if ($options['values']['fs_insert']=='frontpage') echo ' checked="checked"'; ?> /> <?_e('On front-page','frontpage-slideshow')?></label><br />
     633                                <label for="fs_insert_shortcode">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;→ <?_e('The slideshow will appear only on the front page when it has been configured to display a static-page only.','frontpage-slideshow')?>
     634                            </li>
     635                            <li><label for="fs_insert_2"><input type="radio" id="fs_insert_2" name="fs_insert" value="shortcode"<? if ($options['values']['fs_insert']=='shortcode') echo ' checked="checked"'; ?> /> <?_e('Everywhere on content post (using the dedicated shortcode)','frontpage-slideshow')?></label><br />
     636                                <label for="fs_insert_shortcode">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;→ <?_e('Shortcode','frontpage-slideshow')?> : <input id="fs_shortcode" name="fs_shortcode" value="<?=$options['values']['fs_shortcode']?>" /></label>
     637                            </li>
     638                        </ul>
     639                        <p><?_e('The default shortcode is [FrontpageSlideshow]. By using the shortcode, you will be able to pass some directives to the slideshow directly from the shortcode in order to override the current slideshow options.','frontpage-slideshow')?></p>
     640                        <p><?_e('The accepted chars are a to z 0 to 9 - (minus) and _ (underscore). ','frontpage-slideshow')?></p>
     641                        <p><?_e('You can use the shortcode as an enclosing one : you can put replacement content in case of the slideshow cannot be shown (if it has already been added earlier in the document flow) or is not activated. ','frontpage-slideshow')?></p>
     642                        <p><?_e('When using shortcode, you can use other shortcodes into the replacement content : they will be parsed well, so that you can use another plugin (a gallery for example) to show some content','frontpage-slideshow')?></p>
     643                        <p><?_e('Note that only one slideshow can be displayed at this time, if you need to display more than one slideshow, contact the author.','frontpage-slideshow')?></p>
    560644                    </div>
    561645                </div>
     
    595679                </div>
    596680                <div class="postbox closed">
     681                    <h3><span><?_e('About default link','frontpage-slideshow')?></span></h3>
     682                    <div class="inside" style="padding: 5px;">
     683                        <p><label for="fs_default_link_to_page_link"><select id="fs_default_link_to_page_link" name="fs_default_link_to_page_link">
     684                            <option value="0"<? if ($options['values']['fs_default_link_to_page_link']) echo ' selected="selected"'?>><? _e('If no link is specidied : dont use the slide URL','frontpage-slideshow'); ?></option>
     685                            <option value="1"<? if (!$options['values']['fs_default_link_to_page_link']) echo ' selected="selected"'?>><? _e('If no link is specidied : use the slide URL','frontpage-slideshow'); ?></option>
     686                        </select></p>
     687                        <p><input type="submit" name="fs_preview" class="button-primary" value="<? _e('Preview'); ?>" /></p>
     688                    </div>
     689                </div>
     690                <div class="postbox closed">
    597691                    <h3><span><?_e('About sizes and positions','frontpage-slideshow')?></span></h3>
    598692                    <div class="inside" style="padding: 5px;">
     
    631725                </div>
    632726                <p><label for="fs_submit"><?_e('When you are satified by the settings, you can press this button :','frontpage-slideshow')?>
    633                 <input type="submit" id="fs_submit" name="fs_submit" class="button-primary" value="<? _e('Save the settings ans apply them immediately','frontpage-slideshow'); ?>" onclick="if(!confirm('<?_e('The changes will be seen immediately !','frontpage-slideshow')?>')) return false;" onkeypress="if(!confirm('<?_e('The changes will be seen immediately !','frontpage-slideshow')?>')) return false;" /></label></p>
     727                <input type="submit" id="fs_submit" name="fs_submit" class="button-primary" value="<? _e('Save the settings and apply them immediately','frontpage-slideshow'); ?>" onclick="if(!confirm('<?_e('The changes will be seen immediately !','frontpage-slideshow')?>')) return false;" onkeypress="if(!confirm('<?_e('The changes will be seen immediately !','frontpage-slideshow')?>')) return false;" /></label></p>
    634728            </div>
    635729        </form>
     
    649743}
    650744
    651 
    652 
    653 
    654 
    655 
     745/******************************************************************************/
     746/*  Registering stuff                             */
     747/******************************************************************************/
     748
     749if (frontpageSlideshow_get_options(false,'fs_insert') == 'shortcode') {
     750    add_shortcode(frontpageSlideshow_get_options(false,'fs_shortcode'), 'frontpageSlideshow_dedicated_shortcode');
     751    if (function_exists('add_action')) {
     752        add_filter('init', 'frontpageSlideshow_init',1);
     753        add_filter('wp_head', 'frontpageSlideshow_header',1);
     754    }
     755} else {
     756    if (function_exists('add_action')) {
     757        add_filter('the_content', 'frontpageSlideshow');
     758        add_filter('init', 'frontpageSlideshow_init',1);
     759        add_filter('wp_head', 'frontpageSlideshow_header',1);
     760    }
     761}
    656762if (function_exists('add_action')) {
    657     add_filter('the_content', 'frontpageSlideshow');
    658     add_filter('wp_head', 'frontpageSlideshow_header',1);
    659763    add_action('admin_menu', 'frontpageSlideshow_admin_menu');
    660764}
     765
    661766?>
  • frontpage-slideshow/trunk/readme.txt

    r147714 r158307  
    22Contributors: Jean-François “Jeff” VIAL
    33Donate link: http://www.modulaweb.fr/blog/wp-plugins-en/
    4 Tags: slideshow, frontpage, categories
     4Tags: slideshow, pictures, no-flash, css, javascript
    55Requires at least: 2.0
    66Tested up to: 2.8.4
    7 Stable tag: 0.5
     7Stable tag: 0.6
    88
    99Frontpage Slideshow provides a slide show like you can see in linux.com front page
     
    1313This plugin allows you to put a slideshow on your Wordpress frontpage. like the one on linux.com
    1414
    15 The slide is made of a cliquable image zone, some buttons with title and specific comment allowing to display a particular slide and a text zone to add a comment on slide.
     15The slide is made of a cliquable picture zone, some buttons with title and specific comment allowing to display a particular slide and a text zone to add a comment on slide.
    1616
    17 Images are pre-loaded and the default design is elegant and clean with a black background, transparencies ans rounded corners (except for IE).
     17pictures are pre-loaded and the default design is elegant and clean with a black background, transparencies ans rounded corners (except for IE).
    1818
    1919Transitions are faded to add more eye-candy and sweetness.
     
    4040* v 0.4 : fully functional administration page with preview, reset to default
    4141* v 0.5 : important bug fix when the plugin is loaded before jQuery and some CSS improvement
     42* v 0.6 : improving the loading of javascript frameworks needed, the shortcode funtionnality added, alternative picture option added, when no link is set, the URL of the post can be used
    4243
    4344== Screenshots ==
    4445
     461. live at http://wwww.modulaweb.fr french webagency
     472. live at http://www.smartyweb.org/
    4548
    4649== How to use ==
    4750
    4851When it has been installed and activated, you just have to select from wich categories you want the slides comes from by using the administration page.
    49 The displayed image onto the slideshow is the first image of each articles, so make sure the article contains at least one image.
     52The displayed picture onto the slideshow is the first picture of each articles, so make sure the article contains at least one picture.
    5053
    5154Then you got to addd thoses custom parameters to each slide-posts :
     
    5356    * fs-button-comment : the button specific message
    5457    * fs-comment : the comment
    55     * fs-link : the URL of page where to redirect users when they click on the image.
     58    * fs-link : the URL of page where to redirect users when they click on the picture, can be set to the page URL if none is given
     59    * fs-picture : the URL of the picture to display, the first picture on post-content is used if this parameter is missing
    5660
    57 The title of slides is made by the title of posts.
     61The title of posts is used as the title of slides
    5862
    5963When all is done, tune up the slider and enable it.
     64
     65By default, the slideshow is added at the beginning of the front-page content. The best way to use if is to use a static-page as the front-page. If you are displaying a list of last posts, the slideshow is added at the beginning of the fist post shown.
     66You can use a customisable shortcode to display the slideshow. You can use the shortcode as an enclosing one : you can put replacement content in case of the slideshow cannot be shown (if it has already been added earlier in the document flow) or is not activated.
     67Example :
     68`[FrontpageSlideshow fs_main_width=100% fs_main_color=pink]
     69<a href="/images/me.png" rel="lightbox" title="This is image caption"><img src="/images/me.png" width="80" height="80" alt="This is image title" /></a>
     70<a href="/images/me2.png" rel="lightbox" title="This is image caption"><img src="/images/me2.png" width="80" height="80" alt="This is image title" /></a>
     71[/FrontpageSlideshow]`
     72
     73If you need a new functionality, you can ask for it by contacting the author directly or by posting a feature request on related forum on wordpress.org website.
     74If those functionnlity can't wait, consider making a donation.
    6075
    6176== Milestones ==
     
    71862. allow the use of multiples categories to find slides <= done
    72873. widgetize the slider to allow to put it on sidebar an create small sliders
     884. Allowing the use of shortcode to add the slideshow <= done
    7389
    7490
Note: See TracChangeset for help on using the changeset viewer.