Changeset 834867
- Timestamp:
- 01/08/2014 11:10:37 AM (12 years ago)
- Location:
- s2member-secure-file-browser/trunk
- Files:
-
- 16 edited
-
class/psk_s2msfb.class.php (modified) (2 diffs)
-
img/blank.png (modified) (previous)
-
img/comment.png (modified) (previous)
-
img/download.png (modified) (previous)
-
img/flash.png (modified) (previous)
-
img/folder_open.png (modified) (previous)
-
img/linux.png (modified) (previous)
-
img/play.png (modified) (previous)
-
img/playpause.png (modified) (previous)
-
img/psd.png (modified) (previous)
-
img/reset.png (modified) (previous)
-
img/search.png (modified) (previous)
-
img/vsa.png (modified) (previous)
-
inc/tools.class.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
s2member-secure-file-browser.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
s2member-secure-file-browser/trunk/class/psk_s2msfb.class.php
r728335 r834867 279 279 280 280 281 /* 281 /** 282 282 * Load javascript and css for Public and Admin part 283 * Called from the shortcode only !284 283 * 285 284 * @return void 286 285 */ 287 /**288 *289 */290 286 public static function init_assets() { 291 wp_deregister_script( 'jquery' );292 wp_register_script( 'jquery' , PSK_S2MSFB_JS_URL . 'jquery-1.8.3.min.js' , false );293 287 wp_enqueue_script( 'jquery' ); 294 } 295 296 297 /* 298 * WP wp_enqueue_scripts 299 * Load javascript and css for Public and Admin part 300 * 301 * @param array $atts the arguments from the editor 302 * 303 * @return void 304 */ 305 public static function init_shortcode_assets( $atts ) { 306 307 if ( isset( $atts[ 'previewext' ] ) ) { 308 foreach ( explode( ',' , $atts[ 'previewext' ] ) as $ext ) { 309 switch ( trim( strtolower( $ext ) ) ) { 310 case 'mp3': 311 wp_register_script( 'jquery.jplayer' , PSK_S2MSFB_JS_URL . 'jquery.jplayer.min.js' , array( 'jquery' ) , '2.2.0' , true ); 312 wp_enqueue_script( 'jquery.jplayer' ); 313 break; 314 case 'jpg': 315 case 'jpeg': 316 case 'gif': 317 case 'png': 318 wp_register_script( 'jquery.prettyPhoto' , PSK_S2MSFB_JS_URL . 'jquery.prettyPhoto.js' , array( 'jquery' ) , '3.1.5' , true ); 319 wp_enqueue_script( 'jquery.prettyPhoto' ); 320 wp_register_style( 'jquery.prettyPhoto' , PSK_S2MSFB_CSS_URL . 'prettyPhoto.css' ); 321 wp_enqueue_style( 'jquery.prettyPhoto' ); 322 break; 323 default: 324 break; 325 } 326 } 327 } 328 329 wp_enqueue_script( PSK_S2MSFB_ID , PSK_S2MSFB_JS_URL . 'jqueryFileTree.' . PSK_S2MSFB_EXT_JS , array( 'jquery' ) , false , true ); 330 wp_register_style( PSK_S2MSFB_ID , PSK_S2MSFB_CSS_URL . 'jqueryFileTree.' . PSK_S2MSFB_EXT_CSS ); 331 wp_enqueue_style( PSK_S2MSFB_ID ); 288 wp_enqueue_script( PSK_S2MSFB_ID , PSK_S2MSFB_JS_URL . 'jqueryFileTree.' . PSK_S2MSFB_EXT_JS , array( 'jquery' ) , false , false ); 289 wp_enqueue_style( PSK_S2MSFB_ID , PSK_S2MSFB_CSS_URL . 'jqueryFileTree.' . PSK_S2MSFB_EXT_CSS ); 332 290 333 291 // Set localize javascript 334 292 $prefix = ( is_admin() ) ? 'admin_' : ''; 335 293 wp_localize_script( PSK_S2MSFB_ID , __CLASS__ , array( 336 'imgurl' => PSK_S2MSFB_IMG_URL , 337 'ajaxurl' => admin_url( 'admin-ajax.php' ) , 338 'nonce' => wp_create_nonce( PSK_S2MSFB_ID . '-nonce' ) , 339 'errorsearch' => __( 'Please type some words!' , PSK_S2MSFB_ID ) , 340 'action_get_dir' => $prefix . PSK_S2MSFB_ID . '_get_dir' , 341 'action_df' => $prefix . PSK_S2MSFB_ID . '_df' , 342 'action_cf' => $prefix . PSK_S2MSFB_ID . '_cf' , 343 'action_rf' => $prefix . PSK_S2MSFB_ID . '_rf' , 344 'action_nf' => $prefix . PSK_S2MSFB_ID . '_nf' , 345 ) ); 346 294 'imgurl' => PSK_S2MSFB_IMG_URL , 295 'ajaxurl' => admin_url( 'admin-ajax.php' ) , 296 'nonce' => wp_create_nonce( PSK_S2MSFB_ID . '-nonce' ) , 297 'errorsearch' => __( 'Please type some words!' , PSK_S2MSFB_ID ) , 298 'action_get_dir' => $prefix . PSK_S2MSFB_ID . '_get_dir' , 299 'action_df' => $prefix . PSK_S2MSFB_ID . '_df' , 300 'action_cf' => $prefix . PSK_S2MSFB_ID . '_cf' , 301 'action_rf' => $prefix . PSK_S2MSFB_ID . '_rf' , 302 'action_nf' => $prefix . PSK_S2MSFB_ID . '_nf' , 303 ) ); 304 305 /* 306 * Load these assets here and not on demand when the shortcode is used because some themes load the content in ajax requests ! 307 */ 308 wp_register_script( 'jquery.jplayer' , PSK_S2MSFB_JS_URL . 'jquery.jplayer.min.js' , array( 'jquery' ) , '2.2.0' , true ); 309 wp_enqueue_script( 'jquery.jplayer' ); 310 wp_register_script( 'jquery.prettyPhoto' , PSK_S2MSFB_JS_URL . 'jquery.prettyPhoto.js' , array( 'jquery' ) , '3.1.5' , true ); 311 wp_enqueue_script( 'jquery.prettyPhoto' ); 312 wp_register_style( 'jquery.prettyPhoto' , PSK_S2MSFB_CSS_URL . 'prettyPhoto.css' ); 313 wp_enqueue_style( 'jquery.prettyPhoto' ); 347 314 } 348 315 … … 1299 1266 public 1300 1267 static function shortcode_s2member_secure_files_browser( $atts ) { 1301 self::init_shortcode_assets( $atts );1302 1303 1268 $i = self::$shortcode_instance; 1304 1269 self::$shortcode_instance ++; -
s2member-secure-file-browser/trunk/inc/tools.class.php
r704612 r834867 26 26 */ 27 27 class PSK_Tools { 28 29 public static function log( $message ) { 30 file_put_contents( dirname( __FILE__ ) . '/../log.txt' , date('Y/m/d H:i:s') . ' | ' . $_SERVER['REMOTE_ADDR'] . ' | ' . $message . "\n" , FILE_APPEND ); 31 } 28 32 29 33 /** -
s2member-secure-file-browser/trunk/readme.txt
r824919 r834867 5 5 Requires at least: 3.3 6 6 Tested up to: 3.8 7 Stable tag: 0.4.1 07 Stable tag: 0.4.11 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 193 193 == Changelog == 194 194 195 = 0.4.11 = 196 * Enhancement : plugin now always loads assets at the beginning even if the shortcode is not used on a page. It handles by this way some themes which load page content next to the assets. 197 195 198 = 0.4.10 = 196 199 * Enhancement : plugin now checks by itself the wordpress upgrade include (problem with some customers) -
s2member-secure-file-browser/trunk/s2member-secure-file-browser.php
r824919 r834867 6 6 You can display the file browser via the shortcode [s2member_secure_files_browser /]. 7 7 You can manage files and get statistics in the Dashboard > s2Member > Secure File Browser 8 Version: 0.4.1 09 Date: 201 3-12-168 Version: 0.4.11 9 Date: 2014-01-08 10 10 Author: Potsky 11 11 Author URI: http://www.potsky.com/about/ 12 12 Licence: 13 Copyright © 201 3Raphael Barbate (potsky) <potsky@me.com> [http://www.potsky.com]13 Copyright © 2014 Raphael Barbate (potsky) <potsky@me.com> [http://www.potsky.com] 14 14 This file is part of s2member Secure File Browser. 15 15
Note: See TracChangeset
for help on using the changeset viewer.