Changeset 344571
- Timestamp:
- 02/12/2011 04:35:14 PM (15 years ago)
- Location:
- auto-syntaxhighlighter/trunk
- Files:
-
- 7 added
- 4 deleted
- 4 edited
-
auto-syntaxhighlighter.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
-
screenshot-2.png (modified) (previous)
-
tinymce/ash (added)
-
tinymce/ash.gif (deleted)
-
tinymce/ash/ash.htm (added)
-
tinymce/ash/editor_plugin.js (added)
-
tinymce/ash/img (added)
-
tinymce/ash/img/ash.gif (added)
-
tinymce/ash/js (added)
-
tinymce/ash/js/ash.js (added)
-
tinymce/auto-syntax-highlighter-config.php (deleted)
-
tinymce/editor_plugin.js (deleted)
-
tinymce/tinymce.php (modified) (1 diff)
-
tinymce/window.php (deleted)
Legend:
- Unmodified
- Added
- Removed
-
auto-syntaxhighlighter/trunk/auto-syntaxhighlighter.php
r332024 r344571 3 3 Plugin Name: Auto SyntaxHighlighter 4 4 Plugin URI: http://www.akii.org/auto-syntaxhighlighter.html 5 Description: Autoload SyntaxHighlighter only requisite js files and display you code. Uses Alex Gorbatchev's SyntaxHighlighter: <a href="http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/">SyntaxHighlighter Brushes</a>. Full Support for : AppleScript, ActionScript3, Bash/shell, C#, C++, CSS, Delphi, Diff, Groovy, JavaScript, Java, Perl, PHP, Plain Text, Python, Ruby, Sass, Scala, SQL, Visual Basic and XML .6 Version: 1.3.25 Description: Autoload SyntaxHighlighter only requisite js files and display you code. Uses Alex Gorbatchev's SyntaxHighlighter: <a href="http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/">SyntaxHighlighter Brushes</a>. Full Support for : AppleScript, ActionScript3, Bash/shell, C#, C++, CSS, Delphi, Diff, Groovy, JavaScript, Java, Perl, PHP, Plain Text, Python, Ruby, Sass, Scala, SQL, Visual Basic and XML/HTML... 6 Version: 2.0 7 7 Author: digihero 8 8 Author URI: http://www.akii.org … … 57 57 wp_register_style( 'syntaxhighlighter-theme-midnight', plugins_url('auto-syntaxhighlighter/styles/shThemeMidnight.css'), array('syntaxhighlighter-core'), $this->_shlver ); 58 58 wp_register_style( 'syntaxhighlighter-theme-rdark', plugins_url('auto-syntaxhighlighter/styles/shThemeRDark.css'), array('syntaxhighlighter-core'), $this->_shlver ); 59 59 60 60 $this->_brushes = apply_filters('syntaxhighlighter_brushes',array( 61 61 'applescript' => 'applescript', … … 122 122 return $content; 123 123 } 124 124 125 125 function outputScripts(){ 126 126 global $wp_styles; … … 133 133 echo "<!-- Auto SyntaxHighlighter -->\n"; 134 134 wp_print_scripts($this->_used_burshes); 135 136 ?><script type='text/javascript'>135 ?> 136 <script type='text/javascript'> 137 137 (function(){ 138 138 var corecss = document.createElement('link'); … … 144 144 $core_css_url = apply_filters('syntaxhighlighter_corecssurl' , add_query_arg( 'ver', $this->_shlver, $wp_styles->registered['syntaxhighlighter-core']->src )); 145 145 $theme_css_url = apply_filters('syntaxhighlighter_cssthemeurl', add_query_arg( 'ver', $this->_shlver, $wp_styles->registered[$theme]->src )); 146 ?>146 ?> 147 147 var corecssurl = "<?php echo esc_js( $core_css_url ); ?>"; 148 148 if ( corecss.setAttribute ) { … … 172 172 </script> 173 173 <!-- /Auto SyntaxHighlighter --> 174 <?php 175 } 176 174 <?php 175 } 177 176 // fix php4 178 177 function AutoSyntaxHighlighter() { 179 178 $this->__construct(); 180 179 } 181 182 180 } 183 181 … … 192 190 * 193 191 */ 194 195 192 class wp_ash { 196 193 function wp_ash() { 197 194 global $wp_version; 198 195 199 196 // The current version 200 define('ash_VERSION', ' 1.0');201 197 define('ash_VERSION', '2.0'); 198 202 199 // Check for WP2.6 installation 203 200 if (!defined ('IS_WP26')) 204 define('IS_WP26', version_compare($wp_version, '2.6', '>=') );205 201 define('IS_WP26', version_compare($wp_version, '2.6', '>=') ); 202 206 203 //This works only in WP2.6 or higher 207 204 if ( IS_WP26 == FALSE) { 208 add_action('admin_notices', create_function('', 'echo \'<div id="message" class="error fade"><p><strong>Sorry, Auto Syntax Highlighter works only under WordPress 2.6 or higher</strong></p></div>\';'));205 add_action('admin_notices', create_function('', 'echo \'<div id="message" class="error fade"><p><strong>Sorry, The Wordpress Plugins "Auto Syntax Highlighter" works only under WordPress 2.6 or higher.</strong></p></div>\';')); 209 206 return; 210 207 } else { 211 // define URL 212 define('ash_ABSPATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' ); 213 define('ash_URLPATH', WP_PLUGIN_URL.'/'.plugin_basename( dirname(__FILE__) ).'/' ); 214 include_once (dirname (__FILE__)."/tinymce/tinymce.php"); 215 208 // define URL 209 define('ash_ABSPATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' ); 210 define('ash_URLPATH', WP_PLUGIN_URL.'/'.plugin_basename( dirname(__FILE__) ).'/' ); 211 include_once (dirname (__FILE__)."/tinymce/tinymce.php"); 216 212 } 217 213 } -
auto-syntaxhighlighter/trunk/readme.txt
r332024 r344571 4 4 Tags: SyntaxHighlighter, code, sourcecode, syntax, highlighter 5 5 Requires at least: 2.6 6 Tested up to: 3.0. 46 Tested up to: 3.0.5 7 7 Stable tag: trunk 8 8 … … 88 88 89 89 == Changelog == 90 = 2.0 = 91 Full screen mode support. Apple script support. 92 90 93 = v1.3.2 = 91 94 Fix js for delphi bug. -
auto-syntaxhighlighter/trunk/tinymce/tinymce.php
r259964 r344571 1 1 <?php 2 class add_ash_button { 3 var $pluginname = "ash"; 2 4 3 class add_ash_button {4 5 var $pluginname = "ash";6 7 5 function add_ash_button() { 8 // Modify the version when tinyMCE plugins are changed. 9 add_filter('tiny_mce_version', array (&$this, 'change_tinymce_version') ); 10 11 // init process for button control 12 add_action('init', array (&$this, 'addbuttons') ); 6 add_action('init', $this->addbuttons() ); 13 7 } 14 8 15 9 function addbuttons() { 16 10 17 11 // Don't bother doing this stuff if the current user lacks permissions 18 if ( !current_user_can('edit_posts') && !current_user_can('edit_pages') ) return; 19 12 if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') ) 13 return; 14 20 15 // Add only in Rich Editor mode 21 16 if ( get_user_option('rich_editing') == 'true') { 22 23 // add the button for wp2.5 in a new way 24 add_filter("mce_external_plugins", array (&$this, "add_tinymce_plugin" ), 5); 25 add_filter('mce_buttons', array (&$this, 'register_button' ), 5); 17 // add the button for wp2.5 in a new way 18 add_filter("mce_external_plugins", array ($this, 'add_tinymce_plugin' )); 19 add_filter('mce_buttons', array ($this, 'register_button' )); 26 20 } 27 21 } 28 22 29 23 // used to insert button in wordpress 2.5x editor 30 24 function register_button($buttons) { 31 32 25 array_push($buttons, "separator", $this->pluginname ); 33 34 26 return $buttons; 35 27 } 36 28 37 29 // Load the TinyMCE plugin : editor_plugin.js (wp2.5) 38 function add_tinymce_plugin($plugin_array) { 39 40 $plugin_array[$this->pluginname] = ash_URLPATH.'tinymce/editor_plugin.js'; 41 30 function add_tinymce_plugin() { 31 $plugin_array[$this->pluginname] = ash_URLPATH.'tinymce/ash/editor_plugin.js'; 42 32 return $plugin_array; 43 33 } 44 45 function change_tinymce_version($version) {46 return ++$version;47 }48 49 34 } 50 35 51 36 // Call it now 52 37 $tinymce_button = new add_ash_button (); 53 54 ?>
Note: See TracChangeset
for help on using the changeset viewer.