Changeset 221949
- Timestamp:
- 03/27/2010 02:39:57 AM (16 years ago)
- Location:
- frontpage-slideshow/trunk
- Files:
-
- 2 edited
-
frontpage-slideshow.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
frontpage-slideshow/trunk/frontpage-slideshow.php
r221871 r221949 4 4 Plugin URI: http://www.modulaweb.fr/blog/wp-plugins/frontside-slideshow/en/ 5 5 Description: 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. 26 Version: 0.9.3 7 7 Author: Jean-François VIAL 8 8 Author URI: http://www.modulaweb.fr/ … … 24 24 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 25 25 */ 26 define ('FRONTPAGE_SLIDESHOW_VERSION', '0.9. 2');26 define ('FRONTPAGE_SLIDESHOW_VERSION', '0.9.3'); 27 27 $fs_already_displayed = false; // the slideshow dont have been displayed yet 28 28 function frontpageSlideshow($content,$force_display=false,$options=array()) { … … 75 75 $fslast = count($fsentries) -1; 76 76 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());} }"> </a></div><div id="fs-text"><div id="fs-title"> </div><div id="fs-excerpt"> </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(); } }"> </a></div><div id="fs-text"><div id="fs-title"> </div><div id="fs-excerpt"> </div></div></div></div><ul>'; 78 78 foreach ($fsentries as $id=>$entry) { 79 79 $fscontent .= '<li id="fs-entry-'.$id.'" class="fs-entry" onclick="window.clearInterval(fsinterval); fsChangeSlide('.$id.')">'; … … 98 98 // loads the needed frameworks to load as a safe way 99 99 // 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'); 100 104 wp_register_script('jquery-ui-effects',get_bloginfo('url').'/wp-content/plugins/frontpage-slideshow/js/jquery-ui-effects.js', array('jquery-ui-core')); 101 105 wp_enqueue_script('jquery-ui-effects'); … … 1097 1101 )); 1098 1102 $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'); 1102 1109 } 1103 1110 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>'; 1105 1112 1106 1113 $image_selectors = array( … … 1207 1214 jQuery(this).find('label').html('<?php _e('Slideshow background image','frontpage-slideshow')?>'); 1208 1215 jQuery(this).find('div').css('background-image','url('+ui.draggable.attr('src')+')'); 1209 alert(jQuery(this).attr('id'));1210 1216 if (jQuery(this).attr('id') == 'fs_loader_image_droppable') { 1211 1217 jQuery(this).find('div').css('background-repeat', 'no-repeat'); … … 1278 1284 'name' => 'fs-link', 1279 1285 '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'), 1281 1287 ), 1282 1288 ); … … 1313 1319 )); 1314 1320 $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'); 1319 1329 } 1320 //$pics.='<a href="media-upload.php?post_id=1&type=image&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>'; 1322 1331 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>'; 1324 1333 } 1325 1334 if ($meta_box['name'] == 'fs-link') { -
frontpage-slideshow/trunk/readme.txt
r221871 r221949 84 84 * v 0.9.1 : some improuvement and correcting svn files (js files were missing). 85 85 * 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. 86 87 87 88 == Screenshots ==
Note: See TracChangeset
for help on using the changeset viewer.