Plugin Directory

Changeset 221949


Ignore:
Timestamp:
03/27/2010 02:39:57 AM (16 years ago)
Author:
jeff_
Message:

adding version 0.9.3

Location:
frontpage-slideshow/trunk
Files:
2 edited

Legend:

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

    r221871 r221949  
    44Plugin URI: http://www.modulaweb.fr/blog/wp-plugins/frontside-slideshow/en/
    55Description: 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>
    6 Version: 0.9.2
     6Version: 0.9.3
    77Author: Jean-François VIAL
    88Author URI: http://www.modulaweb.fr/
     
    2424    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2525*/
    26 define ('FRONTPAGE_SLIDESHOW_VERSION', '0.9.2');
     26define ('FRONTPAGE_SLIDESHOW_VERSION', '0.9.3');
    2727$fs_already_displayed = false; // the slideshow dont have been displayed yet
    2828function frontpageSlideshow($content,$force_display=false,$options=array()) {
     
    7575        $fslast = count($fsentries) -1;
    7676        if (count($fsentries)) {
    77             $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 (jQuery(\'#fs-entry-link-\'+fsid).html() != \'\') { this.href=jQuery(\'#fs-entry-link-\'+fsid).html(); alert(jQuery(\'#fs-entry-link-\'+fsid).html()); } }">&nbsp;</a></div><div id="fs-text"><div id="fs-title">&nbsp;</div><div id="fs-excerpt">&nbsp;</div></div></div></div><ul>';
     77            $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 (jQuery(\'#fs-entry-link-\'+fsid).html() != \'\') { this.href=jQuery(\'#fs-entry-link-\'+fsid).html(); } }">&nbsp;</a></div><div id="fs-text"><div id="fs-title">&nbsp;</div><div id="fs-excerpt">&nbsp;</div></div></div></div><ul>';
    7878            foreach ($fsentries as $id=>$entry) {
    7979                $fscontent .= '<li id="fs-entry-'.$id.'" class="fs-entry" onclick="window.clearInterval(fsinterval); fsChangeSlide('.$id.')">';
     
    9898    // loads the needed frameworks to load as a safe way
    9999    // now using jQuery framework instead of Prototype+Scriptaculous
     100    wp_deregister_script('jquery');
     101    wp_deregister_script('jquery-ui-core');
     102    wp_register_script('jquery','http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', array(), '1.4.2');
     103    wp_register_script('jquery-ui-core','http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js', array('jquery'), '1.8');
    100104    wp_register_script('jquery-ui-effects',get_bloginfo('url').'/wp-content/plugins/frontpage-slideshow/js/jquery-ui-effects.js', array('jquery-ui-core'));
    101105    wp_enqueue_script('jquery-ui-effects');
     
    10971101                                ));
    10981102                        $pics = '';
    1099 
    1100                         foreach ($attachments as $attachment) {
    1101                             $pics.= '<img class="draggable" style="border: 1px solid transparent; cursor: pointer;" src="'.$attachment->guid.'" width="100" onmouseover="jQuery(this).draggable({revert: true});" /> ';
     1103                        if (is_array($attachments) && count($attachments)) {
     1104                            foreach ($attachments as $attachment) {
     1105                                $pics.= '<img class="draggable" style="border: 1px solid transparent; cursor: pointer;" src="'.$attachment->guid.'" width="100" onmouseover="jQuery(this).draggable({revert: true});" /> ';
     1106                            }
     1107                        } else {
     1108                            $pics = __('No images found.','frontpage-slideshow');
    11021109                        }
    11031110                        echo '<p>'._e('Drag\'n\'drop a picture to the place you want it to be to specify a background image/texture or loader.','frontpage-slideshow').'</p>';
    1104                         echo '<textarea id="fs-pictures-chooser-keeper" style="display: none!important;">'.$pics.'</textarea><div id="background_images_selector" style="display: block; height: 100px; width: 100%; border: 1px solid #dfdfdf;"><a href="#" onclick="jQuery(this).parent().html(jQuery(\'#fs-pictures-chooser-keeper\').val()); return false;">'.__('Click here to load the image selector and choose an image.').'</a></div>';
     1111                        echo '<textarea id="fs-pictures-chooser-keeper" style="display: none!important;">'.$pics.'</textarea><div id="background_images_selector" style="display: block; width: 100%; border: 1px solid #dfdfdf;"><a href="#" onclick="jQuery(this).parent().html(jQuery(\'#fs-pictures-chooser-keeper\').val()); return false;">'.__('Click here to load the image selector and choose an image.').'</a></div>';
    11051112                       
    11061113                        $image_selectors = array(
     
    12071214                                        jQuery(this).find('label').html('<?php _e('Slideshow background image','frontpage-slideshow')?>');
    12081215                                        jQuery(this).find('div').css('background-image','url('+ui.draggable.attr('src')+')');
    1209                                         alert(jQuery(this).attr('id'));
    12101216                                        if (jQuery(this).attr('id') == 'fs_loader_image_droppable') {
    12111217                                            jQuery(this).find('div').css('background-repeat', 'no-repeat');
     
    12781284                                'name' => 'fs-link',
    12791285                                'title' => __('Slide link','frontpage-slideshow'),
    1280                                 'description' => __('When the user is clicking onto the picture, this URI is used. Leave blank to set this post link as the slide link (if this poton is activated into <a href="options-general.php?page=frontpage-slideshow">the plugin admin page</a>)','frontpage-slideshow'),
     1286                                'description' => __('When the user is clicking onto the picture, this URI is used. Leave blank to set this post link as the slide link (if this option is activated into <a href="options-general.php?page=frontpage-slideshow">the plugin admin page</a>)','frontpage-slideshow'),
    12811287                                ),
    12821288                    );
     
    13131319                                ));
    13141320                        $pics = '';
    1315                         foreach ($attachments as $attachment) {
    1316                             $pics.= '<img style="border: 1px solid transparent; cursor: pointer;';
    1317                             if (get_post_meta($post->ID, $meta_box['name'], true) == $attachment->guid) $pics.= ' border-color: red;';
    1318                             $pics.= '" onclick="jQuery(\'#'.$meta_box['name'].'\').val(this.src); this.style.borderColor=\'red\';" onmouseout="if (jQuery(\'#'.$meta_box['name'].'\').val() != this.src) this.style.borderColor=\'transparent\';" onmouseover="if (jQuery(\'#'.$meta_box['name'].'\').val() != this.src) this.style.borderColor=\'cyan\';" src="'.$attachment->guid.'" width="100" /> ';
     1321                        if (is_array($attachments) && count($attachments)) {
     1322                            foreach ($attachments as $attachment) {
     1323                                $pics.= '<img style="border: 1px solid transparent; cursor: pointer;';
     1324                                if (get_post_meta($post->ID, $meta_box['name'], true) == $attachment->guid) $pics.= ' border-color: red;';
     1325                                $pics.= '" onclick="jQuery(\'#'.$meta_box['name'].'\').val(this.src); this.style.borderColor=\'red\';" onmouseout="if (jQuery(\'#'.$meta_box['name'].'\').val() != this.src) this.style.borderColor=\'transparent\';" onmouseover="if (jQuery(\'#'.$meta_box['name'].'\').val() != this.src) this.style.borderColor=\'cyan\';" src="'.$attachment->guid.'" width="100" /> ';
     1326                            }
     1327                        } else {
     1328                            $pics = __('No images found.','frontpage-slideshow');
    13191329                        }
    1320                         //$pics.='<a href="media-upload.php?post_id=1&amp;type=image&amp;TB_iframe=true" id="add_image2" class="thickbox" title="'.__('Add an Image').'" onclick="return false;"><img width="100" src="images/media-button-image.gif" alt="'.__('Add an Image').'"></a>';
    1321                         echo '<p>'.__('Click on one of the following image (or add one) to choose the slide picture.').'</p>';
     1330                        echo '<p>'.__('Click on one of the following image to choose the slide picture.').'</p>';
    13221331                        echo '<textarea id="fs-pictures-chooser-keeper" style="display: none!important;">'.$pics.'</textarea><div style="display: block; overflow:hidden; overflow-x: hidden; overflow-y: auto; height: 100px; width: 100%; border: 1px solid #dfdfdf;"><a href="#" onclick="jQuery(this).parent().html(jQuery(\'#fs-pictures-chooser-keeper\').val()); return false;" onkeypress="jQuery(this).parent().html(jQuery(\'#fs-pictures-chooser-keeper\').val()); return false;">'.__('Click here to load the image selector and choose an image.').'</a></div>';
    1323                         echo '<p><a href="#" target="_blank" onclick="if (jQuery(\'#'.$meta_box['name'].'\').val() !=\'\') { this.href=jQuery(\'#'.$meta_box['name'].'\').val(); this.title=jQuery(\'#'.$meta_box['name'].'\').val(); } else { alert(\''.__('No specified picture, no preview...').'\') }" class="thickbox">'.__('Preview the current picture').'</a></p>';
     1332                        echo '<p><a href="#" target="_blank" onclick="if (jQuery(\'#'.$meta_box['name'].'\').val() !=\'\') { this.href=jQuery(\'#'.$meta_box['name'].'\').val(); this.title=jQuery(\'#'.$meta_box['name'].'\').val(); jQuery(this).addClass(\'thickbox\'); } else { alert(\''.__('No explicitely specified picture for this post, no preview...\nThe first picture inserted in this post will be used.').'\'); jQuery(this).removeClass(\'thickbox\'); return false; }">'.__('Preview the current picture if one is explicitely specified in th field below.').'</a></p>';
    13241333                    }
    13251334                    if ($meta_box['name'] == 'fs-link') {
  • frontpage-slideshow/trunk/readme.txt

    r221871 r221949  
    8484* v 0.9.1 : some improuvement and correcting svn files (js files were missing).
    8585* v 0.9.2 : Improuve the way to find the URL of very first image of a post.
     86* v 0.9.3 : Uses the CDN copy of jQuery instead of the one included into Wordpress ans minor graphical bugs corrections in admin page and modify post page.
    8687
    8788== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.