Changeset 451687
- Timestamp:
- 10/16/2011 06:31:32 PM (14 years ago)
- Location:
- spoiler-block
- Files:
-
- 23 added
- 3 edited
-
tags/1.6 (added)
-
tags/1.6/css (added)
-
tags/1.6/css/spoiler_admin_style.css (added)
-
tags/1.6/css/style.css (added)
-
tags/1.6/js (added)
-
tags/1.6/js/scripts.js (added)
-
tags/1.6/js/spoiler_plugin (added)
-
tags/1.6/js/spoiler_plugin/images (added)
-
tags/1.6/js/spoiler_plugin/images/spoiler.png (added)
-
tags/1.6/js/spoiler_plugin/spoiler_mce.js (added)
-
tags/1.6/languages (added)
-
tags/1.6/languages/spoiler-block-pt_BR.mo (added)
-
tags/1.6/languages/spoiler-block-pt_BR.po (added)
-
tags/1.6/readme.txt (added)
-
tags/1.6/screenshot-1.png (added)
-
tags/1.6/screenshot-2.png (added)
-
tags/1.6/screenshot-3.png (added)
-
tags/1.6/screenshot-4.png (added)
-
tags/1.6/spoiler_block.php (added)
-
tags/1.6/spoiler_render_config.php (added)
-
trunk/languages (added)
-
trunk/languages/spoiler-block-pt_BR.mo (added)
-
trunk/languages/spoiler-block-pt_BR.po (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/spoiler_block.php (modified) (8 diffs)
-
trunk/spoiler_render_config.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
spoiler-block/trunk/readme.txt
r451498 r451687 42 42 == Changelog == 43 43 44 = 1.6 = 45 * Resolve some bugs; 46 * Add i18n support; 47 * Include Brazilian Portugueses language; 48 44 49 = 1.5 = 45 50 * Now you can clear spoiler block if you click in spoiler button! :) … … 73 78 = How can I remove a spoiler of my post? = 74 79 75 To remove a spoiler block, select HTML mode, and remove tags <span class="spoiler"> and </span> that are around your text. (the feature to automatize this function is under development) 80 To remove a spoiler block, just select the spoiler block then click in spoiler button. 81 82 = How can I customize the spoilers blocks in my blog? 83 84 To customize the blocks of spoilers, just add the follow selectors in your css file: 85 * .spoiler to spoilers closed blocks; 86 * .spoiler-open to spoilers already clicked by users; -
spoiler-block/trunk/spoiler_block.php
r451498 r451687 4 4 Plugin URI: https://github.com/squiter85/Spoiler-Block 5 5 Description: Create spoiler's block in your posts to hide contents. 6 Version: 1. 56 Version: 1.6 7 7 Author: Brunno dos Santos 8 8 Author URI: http://brunno.abstraindo.com … … 28 28 /* Let's code guys */ 29 29 30 if (!defined('SPOILERBLOCK_PLUGIN_BASENAME')) { 31 //spoiler-block/spoiler/block.php 32 define('SPOILERBLOCK_PLUGIN_BASENAME', plugin_basename(__FILE__)); 33 } 34 if (!defined('SPOILERBLOCK_PLUGIN_NAME')) { 35 //spoiler-block 36 define('SPOILERBLOCK_PLUGIN_NAME', trim(dirname(SPOILERBLOCK_PLUGIN_BASENAME), '/')); 37 } 38 if (!defined('SPOILERBLOCK_NAME')) { 39 define('SPOILERBLOCK_NAME', 'Spoiler Block'); 40 } 41 if (!defined('SPOILERBLOCK_TEXTDOMAIN')) { 42 define('SPOILERBLOCK_TEXTDOMAIN', 'spoiler-block'); 43 } 44 if (!defined('SPOILERBLOCK_PLUGIN_DIR')) { 45 // /path/to/wordpress/wp-content/plugins/spoiler-block 46 define('SPOILERBLOCK_PLUGIN_DIR', dirname(__FILE__)); 47 } 48 if (!defined('SPOILERBLOCK_PLUGIN_URL')) { 49 // http://www.domain.com/wordpress/wp-content/plugins/spoiler-block 50 define('SPOILERBLOCK_PLUGIN_URL', WP_PLUGIN_URL . '/' . SPOILERBLOCK_PLUGIN_NAME); 51 } 52 if (!defined('SPOILERBLOCK_CONFIG_PAGE')) { 53 define('SPOILERBLOCK_CONFIG_PAGE', "spoiler-block-config"); 54 } 30 55 31 56 add_action('wp_print_styles', 'add_sb_style'); 32 57 add_action('wp_enqueue_scripts', 'add_sb_scripts'); 33 58 59 load_plugin_textdomain( SPOILERBLOCK_TEXTDOMAIN, false, "/spoiler-block/languages" ); 60 34 61 /* enfileirando os marotos */ 35 62 36 63 function add_sb_style() { 37 $myStyleUrl = plugins_url('css/style.css', __FILE__);64 $myStyleUrl = SPOILERBLOCK_PLUGIN_URL . 'css/style.css'; 38 65 39 66 wp_register_style('spoiler_block', $myStyleUrl); … … 44 71 wp_enqueue_script("jquery"); 45 72 wp_enqueue_script('scripts', 46 plugins_url('/js/scripts.js', __FILE__),73 SPOILERBLOCK_PLUGIN_URL . '/js/scripts.js', 47 74 array('scriptaculous'), 48 75 '1.0', true ); … … 66 93 function spoiler_register($plugin_array){ 67 94 68 $url = plugins_url('/js/spoiler_plugin/spoiler_mce.js', __FILE__);95 $url = SPOILERBLOCK_PLUGIN_URL . '/js/spoiler_plugin/spoiler_mce.js'; 69 96 70 97 $plugin_array["spoiler"] = $url; … … 80 107 $url .= ','; 81 108 82 $url .= plugins_url('/css/spoiler_admin_style.css', __FILE__);109 $url .= SPOILERBLOCK_PLUGIN_URL . '/css/spoiler_admin_style.css'; 83 110 84 111 return $url; … … 88 115 add_action('admin_menu', 'spoiler_config_menu'); 89 116 function spoiler_config_menu(){ 90 add_plugins_page( "Spoiler Block", "Spoiler Block Config", "activate_plugins", "spoiler-block-config", "spoiler_render_config");117 add_plugins_page( "Spoiler Block", __("Spoiler Block Config", SPOILERBLOCK_TEXTDOMAIN), "activate_plugins", SPOILERBLOCK_CONFIG_PAGE, "spoiler_render_config"); 91 118 } 92 119 93 120 function spoiler_render_config(){ 94 121 require("spoiler_render_config.php"); … … 101 128 add_action('wp_head', "spoiler_selected_message"); 102 129 103 add_option("spoiler_alert", "Warning! Spoiler area! To read click here!");130 add_option("spoiler_alert", __("Warning! Spoiler area! To read click here!",SPOILERBLOCK_TEXTDOMAIN)); 104 131 105 132 function spoiler_selected_message(){ … … 107 134 } 108 135 109 spoiler_selected_message($spoiler_alert); 110 111 136 add_action("wp_head","spoiler_selected_message"); 112 137 ?> -
spoiler-block/trunk/spoiler_render_config.php
r450857 r451687 15 15 <div id="message" class="updated"> 16 16 <p> 17 <strong> Congratulations! Your settings is updated! :D</strong>17 <strong><?php _e("Congratulations! Your settings is updated! :D",SPOILERBLOCK_TEXTDOMAIN);?></strong> 18 18 </p> 19 19 </div> … … 22 22 ?> 23 23 <div class="wrap"> 24 <h2> Spoiler Block Configuration</h2>25 <p> This page is where you'll configure your plugin.<br />Let's go :)</p>24 <h2><?php _e("Spoiler Block Configuration",SPOILERBLOCK_TEXTDOMAIN);?></h2> 25 <p><?php _e("This page is where you'll configure your plugin.<br />Let's go :)",SPOILERBLOCK_TEXTDOMAIN);?></p> 26 26 27 27 <div class="wrap-config"> … … 29 29 <table border="0"> 30 30 <tr> 31 <td><label for="alert"> Spoiler Alert:<span>This alert message will replace your spoilers. You need let your visitors know that they need to click in this message.</span></label></td>31 <td><label for="alert"><?php _e("Spoiler Alert:",SPOILERBLOCK_TEXTDOMAIN);?><span><?php _e("This alert message will replace your spoilers. You need let your visitors know that they need to click in this message.",SPOILERBLOCK_TEXTDOMAIN);?></span></label></td> 32 32 <td><input type="text" name="alert" value="<?php echo get_option("spoiler_alert");?>" id="alert" /> 33 33 </tr> … … 41 41 42 42 <div class="donate postbox"> 43 <p> If you like my plugin, please buy me a Coke</p>43 <p><?php _e("If you like my plugin, please buy me a Coke",SPOILERBLOCK_TEXTDOMAIN);?></p> 44 44 <div class="wrap-paypal"> 45 45 <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
Note: See TracChangeset
for help on using the changeset viewer.