Plugin Directory

Changeset 344159


Ignore:
Timestamp:
02/11/2011 03:53:00 PM (15 years ago)
Author:
FractalizeR
Message:

2.3 version commit

Location:
wp-synhighlight/trunk
Files:
1 added
14 edited

Legend:

Unmodified
Added
Removed
  • wp-synhighlight/trunk/About.html

    r291644 r344159  
    1414<body>
    1515<p align="center">&nbsp;</p>
    16 <h1 align="center">WP-SynHighlight v2.2.5</h1>
     16<h1 align="center">WP-SynHighlight v2.3</h1>
    1717<p align="center">WordPress GUI-Friendly Syntax Highlighting Plugin</p>
    1818<p align="center">by <a href="mailto:[email protected]">Vladislav &quot;FractalizeR&quot; Rastrusny</a></p>
  • wp-synhighlight/trunk/README.txt

    r294532 r344159  
    33Donate link: http://www.fractalizer.ru
    44Requires at least: 2.8
    5 Tested up to: 3.0.1
    6 Stable tag: 2.2.7
     5Tested up to: 3.0.5
     6Stable tag: 2.3
    77
    88Plugin provides syntax highlighting for about 116 programming languages via Geshi.
     
    3636[/codesyntax]
    3737
     38[filesyntax filename="test.phps" lang="php"]
     39
     40The tag in the last example should be enabled in settings. See it's description below also.
     41
    3842and you will get wonderful geshi formatting. Format all your source code with Preformatted style to preserve spaces.
    3943
     
    4347
    4448
     49
     50**filename**
     51
     52The relative filename of the file inside a folder, allowed for [filesyntax] tag to take the source for highlighting from. Works only in [filesyntax] tag
    4553
    4654**lang**
     
    123131Provides a comma-separated list of lines, that should be specially highlighted in the code
    124132
     133**doclinks (new in 2.3)**
     134Enables or disables generation of documentation links for keywords
     135
    125136== Installation ==
    126137
     
    166177
    167178== Changelog ==
     179= 2.3 (11.02.2011) =
     180* Added [filesytax] tag, that allows to insert into post files, highlighted from filesystem. Related security settings are added to options. The use of this tag should be enabled in options too.
     181* Due to security settings added to options, only blog admin is now allowed to change them
     182* Added doclinks_off settings option which enables you to control the generation of documentation URLs for keywords by default
     183* Added doclinks option to [codesyntax] and [filesyntax] tags to control the generation of documentation URLs per each source piece
     184* Several bugfixes
     185* User satisfactory texts are now displayed after some time of using plugin in settings
     186* Bugfix: comments are now highlighted correctly even when using external CSS styles for highlighting
     187
    168188= 2.2.7 (28.09.2010) =
    169189* Critical bug fix (not all blogs affected though): slashes in theme folder name do not duplicate now
  • wp-synhighlight/trunk/modules/comments.php

    r291644 r344159  
    3636    if (isset($m[4])) {
    3737        // enclosing tag - extra parameter
    38         return fr_codesyntax_handler($attr, $m[4], false);
     38        return fr_codesyntax_handler($attr, html_entity_decode($m[4]), false, true);
    3939    } else {
    4040        // self-closing tag
    41         return fr_codesyntax_handler($attr, NULL, false);
     41        return fr_codesyntax_handler($attr, NULL, false, true);
    4242    }
    4343}
  • wp-synhighlight/trunk/modules/highlighter.php

    r291644 r344159  
    11<?php
     2//Compatibility with plugins preloaded Geshi before.
    23if (! class_exists('GeSHi')) {
    34    require_once (dirname(__FILE__) . '/../geshi/geshi.php');
     
    1112
    1213/**
    13  * Function handler for ShortCode [codesyntax]
     14 * Function handler for coloring shortcodes. It's used in comments and for [filesyntax tag]
    1415 *
    1516 * @param string $atts
     
    1718 * @return string
    1819 */
    19 function fr_codesyntax_handler($atts, $content = null, $cleanHTML = true) {
     20function fr_codesyntax_handler($atts, $content = null, $cleanHTML = true, $commentProcessing = false) {
    2021    global $wp_sh_styling_type;
    2122    if (empty($content)) {
     
    4546                    'blockstate' => get_option('wp_synhighlight_default_blockstate') ? get_option(
    4647                            'wp_synhighlight_default_blockstate') : 'default',
    47                     'highlight_lines' => ""), $atts);
     48                    'highlight_lines' => "",
     49                    'doclinks' => ! get_option('wp_synhighlight_doclinks_off')), $atts);
    4850   
    4951    if ($cleanHTML) {
     
    5355        //Converting HTML entities
    5456        $content = html_entity_decode($content, ENT_QUOTES);
    55        
     57   
    5658    }
    5759    //Trimming first and last incorrect newlines
     
    6567    //Highlighting
    6668    $geshi = new GeSHi($content, $params['lang']);
    67     if (($wp_sh_styling_type == 'theme') or ($wp_sh_styling_type == 'embedbody')) {
     69    if ((! $commentProcessing) and (($wp_sh_styling_type == 'theme') or ($wp_sh_styling_type == 'embedbody'))) {
    6870        $geshi->enable_classes();
    6971    }
     
    147149            break;
    148150    }
     151   
     152    //Controlling doclinks
     153    $geshi->enable_keyword_links($params['doclinks']);
    149154   
    150155    static $instanceNumber = 0;
     
    180185}
    181186
     187function fr_filesyntax_handler($atts, $content = null, $cleanHTML = true) {
     188    global $wpsh_upload_dir;
     189   
     190    if (! get_option('wp_synhighlight_filesyntax_on')) {
     191        return ('<font color="red"><b>' . __(
     192                'WP-SYNHIGHLIGHT PLUGIN: [FILESYNTAX SHORTCODE IS DISABLED IN PLUGIN SETTINGS! PLEASE READ README.TXT IN PLUGIN FOLDER!',
     193                'wp-synhighlighter') . '</b></font>');
     194    }
     195   
     196    if (! isset($atts['filename'])) {
     197        return ('<font color="red"><b>' . __(
     198                'WP-SYNHIGHLIGHT PLUGIN: NOTHING TO HIGHLIGHT USING FILESYNTAX TAG! FILENAME REQUIRED. PLEASE READ README.TXT IN PLUGIN FOLDER!',
     199                'wp-synhighlighter') . '</b></font>');
     200    }
     201   
     202    $wpsh_exts = get_option('wp_synhighlight_filesyntax_ext') ? get_option(
     203            'wp_synhighlight_filesyntax_ext') : "filesyntax phps source";
     204    $wpsh_exts = preg_split('/\s+/', $wpsh_exts, null, PREG_SPLIT_NO_EMPTY);
     205   
     206    $fileToHighlight = realpath($wpsh_upload_dir . '/' . $atts['filename']);
     207   
     208    if (strpos($fileToHighlight, $wpsh_upload_dir) !== 0) {
     209        return ('<font color="red"><b>' . __(
     210                'WP-SYNHIGHLIGHT PLUGIN: SECURITY VIOLATION! FILENAME FOR [FILESYNTAX] TAG DOES NOT EXIST OR IS OUTSIDE ALLOWED DIR! PLEASE READ README.TXT IN PLUGIN FOLDER!',
     211                'wp-synhighlighter') . '</b></font>');
     212    }
     213   
     214    $pathinfo = pathinfo($fileToHighlight);
     215    if (! in_array($pathinfo['extension'], $wpsh_exts)) {
     216        return ('<font color="red"><b>' . __(
     217                'WP-SYNHIGHLIGHT PLUGIN: SECURITY VIOLATION! FILENAME FOR [FILESYNTAX] TAG DOES HAVE ALLOWED EXTENSIONS! PLEASE READ README.TXT IN PLUGIN FOLDER!',
     218                'wp-synhighlighter') . '</b></font>');
     219    }
     220    return fr_codesyntax_handler($atts, file_get_contents($fileToHighlight), false);
     221}
     222
    182223function fr_no_texturize_shortcodes($shortcodes_arr) {
    183224    $shortcodes_arr[] = 'codesyntax';
  • wp-synhighlight/trunk/modules/on_install.php

    r260765 r344159  
    66 */
    77function wp_synhighlight_on_install() {
     8    global $wpsh_upload_dir;
     9   
    810    //Creating options
    911    add_option('wp_synhighlight_process_comments', 1);
     
    1921    add_option('wp_synhighlight_default_blockstate', 'default');
    2022    add_option('wp_synhighlight_styling_type', 'theme');
     23    add_option('wp_synhighlight_override_css_height', 0);
     24    add_option('wp_synhighlight_filesyntax_dir', $wpsh_upload_dir);
     25    add_option('wp_synhighlight_filesyntax_ext', "filesyntax phps source");
     26    add_option('wp_synhighlight_filesyntax_on', false);
     27    add_option('wp_synhighlight_doclinks_off', false);
     28}
     29
     30function wpsh_welcome_text() {
     31    echo "<div id='akismet-warning' class='updated fade'><p><strong>" . __(
     32            'WP-SynHighligher plugin is almost ready.') . "</strong> " . sprintf(
     33            __(
     34                    'You might want to <a href="%1$s">adjust its settings</a> for it to work as you want.'),
     35            "options-general.php?page=wp-synhighlight/modules/settings.php") . "</p></div>";
     36}
     37
     38function wpsh_satisfaction_text() {
     39    echo "<div id='akismet-warning' class='updated fade'><p><strong>" . __(
     40            'You are using WP-SynHighligher plugin for quite long already. ') . "</strong> " . sprintf(
     41            __(
     42                    'Thank you! You might want to <a href="%1$s">donate to its development</a>, <a href="%2$s">rate it</a>, <a href="%3$s">ask a question about it or just tell us how you like it or not.</a>'),
     43            "options-general.php?page=wp-synhighlight/modules/settings.php",
     44            "http://wordpress.org/extend/plugins/wp-synhighlight/",
     45            "http://wordpress.org/tags/wp-synhighlight?forum_id=10") . "</p></div>";
     46}
     47
     48function wpsh_check_date() {
     49    $date = get_option('wp_synhighlight_date');
     50   
     51    if (! $date) {
     52        add_action('admin_notices', 'wpsh_welcome_text');
     53        add_option('wp_synhighlight_date', time());
     54        return;
     55    }
     56   
     57    if ((time() - $date) > 2 * 30 * 24 * 60 * 60) {
     58        add_action('admin_notices', 'wpsh_satisfaction_text');
     59        update_option('wp_synhighlight_date', time());
     60        return;
     61    }
    2162}
    2263?>
  • wp-synhighlight/trunk/modules/post_parser.php

    r192343 r344159  
    1313    foreach ($posts as $post) {
    1414        $matches = array();
    15         preg_match_all('/\[codesyntax[^]]+lang\s*=\s*\"?(\w+)\"?/', $post->post_content, $matches);
    16         foreach($matches[1] as $language) {
     15        preg_match_all('/\[(?:code|file)syntax[^]]+lang\s*=\s*\"?(\w+)\"?/', $post->post_content,
     16                $matches);
     17        foreach ($matches[1] as $language) {
    1718            $language = trim(html_entity_decode($language), '"'); //Windows Live Writer fix
    1819            wp_register_style("geshi-$language", "$wp_sh_themeURL/geshi/$language.css");
    19             wp_enqueue_style("geshi-$language");
    20         }       
     20            wp_enqueue_style("geshi-$language");
     21        }
    2122    }
    2223    return $posts;
    2324}
     25
     26/**
     27 * Function for post parsing to apply different post stylings. the_posts hook.
     28 * @param array $posts
     29 * @return array $posts
     30 */
     31function wp_synhighlight_parse_comments($comments) {
     32    global $wp_sh_themeURL;
     33    if (empty($comments))
     34        return $comments;
     35   
     36    foreach ($comments as $comment) {
     37        $matches = array();
     38        preg_match_all('/\[(?:code|file)syntax[^]]+lang\s*=\s*\"?(\w+)\"?/',
     39                $comment->comment_content, $matches);
     40        foreach ($matches[1] as $language) {
     41            $language = trim(html_entity_decode($language), '"'); //Windows Live Writer fix
     42            wp_register_style("geshi-$language", "$wp_sh_themeURL/geshi/$language.css");
     43            wp_enqueue_style("geshi-$language");
     44        }
     45    }
     46    return $comments;
     47}
  • wp-synhighlight/trunk/modules/settings.php

    r237110 r344159  
    11<?php
    22//Processing option values
    3 
     3if (! is_admin()) {
     4    echo "You does not have sufficiend permissions to change this plugin's options!";
     5}
    46
    57//Process comments
     
    1820
    1921//Theme to use
    20 $o_wp_sh_use_theme = (get_option('wp_synhighlight_use_theme') ? (get_option('wp_synhighlight_use_theme')) : ('wp-content/plugins/wp-synhighlight/themes/default'));
     22$o_wp_sh_use_theme = (get_option('wp_synhighlight_use_theme') ? (get_option(
     23        'wp_synhighlight_use_theme')) : ('wp-content/plugins/wp-synhighlight/themes/default'));
    2124
    2225//Code block title
     
    224227        'wp_synhighlight_override_css_height')) : ("0");
    225228
     229//Process comments
     230if (get_option('wp_synhighlight_filesyntax_on')) {
     231    $o_wp_sh_filesyntax_on = 'checked="checked"';
     232} else {
     233    $o_wp_sh_filesyntax_on = '';
     234}
     235
     236//Process comments
     237if (get_option('wp_synhighlight_doclinks_off')) {
     238    $o_wp_sh_doclinks_off = 'checked="checked"';
     239} else {
     240    $o_wp_sh_doclinks_off = '';
     241}
     242
     243
     244$wpsh_upload_dir = wp_upload_dir();
     245$wpsh_upload_dir = realpath($wpsh_upload_dir['basedir']);
     246
     247$o_wp_sh_filesyntax_dir = get_option('wp_synhighlight_filesyntax_dir') ? (get_option(
     248        'wp_synhighlight_filesyntax_dir')) : ($wpsh_upload_dir);
     249
     250$o_wp_sh_filesyntax_ext = get_option('wp_synhighlight_filesyntax_ext') ? (get_option(
     251        'wp_synhighlight_filesyntax_ext')) : ("filesyntax phps source");
    226252?>
    227253
     
    234260<p align="center"><?php
    235261_e(
    236         'If you like this plugin, you can make a donation with WebMoney (R704473788938, Z590997805426), Yandex.Money (41001122895969), MoneyBookers ([email protected]) or just send a special donation SMS directly <a href="http://www.fractalizer.ru" target="_blank">from my website</a> (just click that read SMS Donate button and follow instructions)',
     262        '<b>If you like this plugin, you can make a donation with WebMoney (R704473788938, Z590997805426), Yandex.Money (41001122895969), MoneyBookers (<a mailto:="[email protected]">[email protected]</a>) or just send a special donation SMS directly <a href="http://www.fractalizer.ru" target="_blank">from my website</a> (just click that read SMS Donate button and follow instructions)<br /><a href="https://www.moneybookers.com/app/send.pl" target="_blank"><img src="../wp-content/plugins/wp-synhighlight/themes/default/images/moneybookers.gif"></a></b>',
    237263        'wp-synhighlighter');
    238264?></p>
     
    575601    </tr>
    576602
     603    <tr valign="top">
     604        <th valign="middle" scope="row"><?php
     605        _e('Enable the use of [filesyntax] tag (see README for details)', 'wp-synhighlighter');
     606        ?></th>
     607        <td valign="middle"><label> <input
     608            name="wp_synhighlight_filesyntax_on" type="checkbox"
     609            id="wp_synhighlight_filesyntax_on" value="1"
     610            <?php
     611            echo $o_wp_sh_filesyntax_on;
     612            ?> /> </label></td>
     613    </tr>
     614
     615    <tr valign="top">
     616        <th valign="middle" scope="row"><?php
     617        _e('Disable documentation links for keywords in highlighted source', 'wp-synhighlighter');
     618        ?></th>
     619        <td valign="middle"><label> <input
     620            name="wp_synhighlight_doclinks_off" type="checkbox"
     621            id="wp_synhighlight_doclinks_off" value="1"
     622            <?php
     623            echo $o_wp_sh_doclinks_off;
     624            ?> /> </label></td>
     625    </tr>
     626
     627    <tr valign="top">
     628        <th valign="middle" scope="row"><?php
     629        _e('Limit [filesyntax] tag to work with files from this folder only', 'wp-synhighlighter');
     630        ?></th>
     631        <td valign="middle"><label
     632            title="<?php
     633            _e(
     634                    'Only files from this folder will be available for highlighting using [filesyntax] shortcode tag. Required.',
     635                    'wp-synhighlighter');
     636            ?>"> <input name="wp_synhighlight_filesyntax_dir" type="text"
     637            id="wp_synhighlight_filesyntax_dir" size=80
     638            value="<?php
     639            echo $o_wp_sh_filesyntax_dir;
     640            ?>" /> </label></td>
     641    </tr>
     642
     643    <tr valign="top">
     644        <th valign="middle" scope="row"><?php
     645        _e('Limit [filesyntax] tag to files with these extensions only', 'wp-synhighlighter');
     646        ?></th>
     647        <td valign="middle"><label
     648            title="<?php
     649            _e(
     650                    '[filesyntax] tag will work only on files with these extensions (separate with spaces). Required.',
     651                    'wp-synhighlighter');
     652            ?>"> <input name="wp_synhighlight_filesyntax_ext" type="text"
     653            id="wp_synhighlight_filesyntax_ext" size=80
     654            value="<?php
     655            echo $o_wp_sh_filesyntax_ext;
     656            ?>" /> </label></td>
     657    </tr>
    577658</table>
    578659<input type="hidden" name="action" value="update" /> <input
    579660    type="hidden" name="page_options"
    580     value="wp_synhighlight_maxlines_wo_scrollbar,wp_synhighlight_process_comments,wp_synhighlight_use_theme,wp_synhighlight_default_codeblock_title,wp_synhighlight_default_lines,wp_synhighlight_default_lines_start_with,wp_synhighlight_default_container,wp_synhighlight_default_capitalize_keywords,wp_synhighlight_default_tab_width,wp_synhighlight_default_strict_mode,wp_synhighlight_default_blockstate,wp_synhighlight_disable_editarea,wp_synhighlight_styling_type,wp_synhighlight_override_css_height" />
     661    value="wp_synhighlight_maxlines_wo_scrollbar,wp_synhighlight_process_comments,wp_synhighlight_use_theme,wp_synhighlight_default_codeblock_title,wp_synhighlight_default_lines,wp_synhighlight_default_lines_start_with,wp_synhighlight_default_container,wp_synhighlight_default_capitalize_keywords,wp_synhighlight_default_tab_width,wp_synhighlight_default_strict_mode,wp_synhighlight_default_blockstate,wp_synhighlight_disable_editarea,wp_synhighlight_styling_type,wp_synhighlight_override_css_height,wp_synhighlight_filesyntax_dir,wp_synhighlight_filesyntax_ext,wp_synhighlight_filesyntax_on,wp_synhighlight_doclinks_off" />
    581662<p class="submit"><input type="submit" name="Submit"
    582663    value="<?php
  • wp-synhighlight/trunk/tinymce/langs/en_dlg.js

    r192264 r344159  
    3737    InitialBlockStateCollapsed: 'collapsed',
    3838    HighlightLines: 'Highlight lines with these numbers',
    39     PHPNote: '<b>Note</b>: please always start PHP code from &lt;?php tag to be highlighted correctly.'
     39    PHPNote: '<b>Note</b>: please always start PHP code from &lt;?php tag to be highlighted correctly.',
     40    DocLinks: 'Generate documentation links for URLs',
     41    DocLinksDefault: 'default',
     42    DocLinksOn: 'yes',
     43    DocLinksOff: 'no'
    4044});
  • wp-synhighlight/trunk/tinymce/langs/ru_dlg.js

    r192264 r344159  
    3737    InitialBlockStateCollapsed: 'свернут',
    3838    HighlightLines: 'Выделить строки c этими номерами',
    39     PHPNote: '<b>Внимание</b>: начинайте PHP код с тега &lt;?php чтобы он корректно подствечивался Geshi'
     39    PHPNote: '<b>Внимание</b>: начинайте PHP код с тега &lt;?php чтобы он корректно подствечивался Geshi',
     40    DocLinks: 'Генерировать ссылки на документацию для ключевых слов',
     41    DocLinksDefault: 'по умолчанию',
     42    DocLinksOn: 'да',
     43    DocLinksOff: 'нет'
    4044});
  • wp-synhighlight/trunk/tinymce/panel.php

    r192264 r344159  
    2121<script type="text/javascript" src="js/panel.js"></script>
    2222<link type="text/css" rel="stylesheet" href="css/media.css?ver=327-1235" />
    23 <?php if (! get_option('wp_synhighlight_disable_editarea')) :   ?>
     23<?php
     24if (! get_option('wp_synhighlight_disable_editarea')) :
     25    ?>
    2426<script language="Javascript" type="text/javascript"
    2527    src="../edit_area/edit_area_full_with_plugins.js"></script>
    26 <?php endif; ?>
     28
     29<?php endif;
     30?>
    2731<script language="javascript">
    2832
    2933function displayCodeTab() {
    30     <?php if (! get_option('wp_synhighlight_disable_editarea')) : ?>
     34    <?php
     35    if (! get_option('wp_synhighlight_disable_editarea')) :
     36        ?>
    3137    if(editAreas.sourcecode)
    3238        editAreaLoader.delete_instance('sourcecode');
     
    3844        ,word_wrap: true
    3945        ,toolbar: "search, go_to_line, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, word_wrap, |, help"
    40         ,language: "<?php $lang = substr(WPLANG, 0, 2);
    41         if (in_array($lang, array('bg', 'cs', 'de', 'dk', 'en', 'eo', 'es', 'fi', 'fr', 'hr', 'it', 'ja', 'mk', 'nl', 'pl', 'pt', 'ru', 'sk', 'zh'))) {
     46        ,language: "<?php
     47        $lang = substr(WPLANG, 0, 2);
     48        if (in_array($lang,
     49                array('bg', 'cs', 'de', 'dk', 'en', 'eo', 'es', 'fi', 'fr', 'hr', 'it', 'ja',
     50                        'mk', 'nl', 'pl', 'pt', 'ru', 'sk', 'zh'))) {
    4251            echo $lang;
    4352        } else {
    4453            echo "en";
    45         } ?>"
     54        }
     55        ?>"
    4656        ,syntax: getSelectValue('lang')
    4757    });
    48     <?php endif; ?>
     58   
     59    <?php endif;
     60    ?>
    4961    mcTabs.displayTab('code_tab','code_panel');     
    5062}
    5163
    5264function resizeTextArea() {
    53     <?php if (! get_option('wp_synhighlight_disable_editarea')) : ?>
     65    <?php
     66    if (! get_option('wp_synhighlight_disable_editarea')) :
     67        ?>
    5468    if(editAreas.sourcecode)
    5569        editAreaLoader.delete_instance('sourcecode');
    56     <?php endif; ?>
     70   
     71    <?php endif;
     72    ?>
    5773           
    5874    var vp = tinyMCEPopup.dom.getViewPort(window), el;
     
    6480    el.style.width = (vp.w - 30) + 'px';
    6581    el.style.height = (vp.h - 90) + 'px';
    66     <?php if (! get_option('wp_synhighlight_disable_editarea')) : ?>
     82    <?php
     83    if (! get_option('wp_synhighlight_disable_editarea')) :
     84        ?>
    6785            editAreaLoader.init({
    6886                id: "sourcecode"    // id of the textarea to transform     
     
    7189                ,allow_toggle: true
    7290                ,word_wrap: true
    73                 ,language: "<?php echo substr('en', 0, 2); ?>"
     91                ,language: "<?php
     92        echo substr('en', 0, 2);
     93        ?>"
    7494                ,syntax: getSelectValue('lang')
    7595            });         
    7696   
    77     <?php endif; ?>
     97   
     98    <?php endif;
     99    ?>
    78100           
    79101}
     
    94116    optionsString += getOptionFromSelect('blockstate');
    95117    optionsString += getOptionFromText('highlight_lines');
    96     <?php if (! get_option('wp_synhighlight_disable_editarea')) : ?>
     118    optionsString += getOptionFromSelect('doclinks');
     119    <?php
     120    if (! get_option('wp_synhighlight_disable_editarea')) :
     121        ?>
    97122        var sh_sourcecode = htmlspecialchars(editAreaLoader.getValue('sourcecode'));
    98         <?php else: ?>
     123       
     124    <?php else :
     125        ?>
    99126        var sh_sourcecode = getTextValue('sourcecode');
    100     <?php endif;?> 
     127   
     128    <?php
     129    endif;
     130    ?> 
    101131    ed.selection.setContent('[codesyntax' + optionsString + ']<pre>' + sh_sourcecode + '</pre>[/codesyntax]');
    102132    tinyMCEPopup.close();
     
    107137<body onresize="return resizeTextArea()">
    108138<form id="codesyntax_form" name="codesyntax_form">
    109   <div class="tabs">
    110     <ul>
    111       <li id="options_tab" class="current"><span><a
     139<div class="tabs">
     140<ul>
     141    <li id="options_tab" class="current"><span><a
    112142        href="javascript:mcTabs.displayTab('options_tab','options_panel');"
    113143        onmousedown="return false;">{#WPSynHighlight_dlg.Settings}</a></span></li>
    114       <li id="code_tab"><span><a href="javascript:displayCodeTab();"
     144    <li id="code_tab"><span><a href="javascript:displayCodeTab();"
    115145        onmousedown="return false;">{#WPSynHighlight_dlg.Code}</a></span></li>
    116     </ul>
    117   </div>
    118   <div class="panel_wrapper">
    119     <div id="options_panel" class="panel current" style="height: auto">
    120       <table border="0">
    121         <tr>
    122           <th align="right" scope="row">{#WPSynHighlight_dlg.Language}:</th>
    123           <td width="3">&nbsp;</td>
    124           <td><select name="lang" id="lang">
    125               <option value="abap">abap</option>
    126               <option value="actionscript">actionscript</option>
    127               <option value="actionscript3">actionscript3</option>
    128               <option value="ada">ada</option>
    129               <option value="apache">apache</option>
    130               <option value="applescript">applescript</option>
    131               <option value="apt_sources">apt_sources</option>
    132               <option value="asm">asm</option>
    133               <option value="asp">asp</option>
    134               <option value="autoit">autoit</option>
    135               <option value="avisynth">avisynth</option>
    136               <option value="bash">bash</option>
    137               <option value="basic4gl">basic4gl</option>
    138               <option value="blitzbasic">blitzbasic</option>
    139               <option value="bnf">bnf</option>
    140               <option value="boo">boo</option>
    141               <option value="c">c</option>
    142               <option value="c1">c1</option>
    143               <option value="caddcl">caddcl</option>
    144               <option value="cadlisp">cadlisp</option>
    145               <option value="cfdg">cfdg</option>
    146               <option value="cfm">cfm</option>
    147               <option value="cil">cil</option>
    148               <option value="cobol">cobol</option>
    149               <option value="cpp-qt">cpp-qt</option>
    150               <option value="cpp">cpp</option>
    151               <option value="csharp">csharp</option>
    152               <option value="css">css</option>
    153               <option value="c_mac">c_mac</option>
    154               <option value="d">d</option>
    155               <option value="delphi">delphi</option>
    156               <option value="diff">diff</option>
    157               <option value="div">div</option>
    158               <option value="dos">dos</option>
    159               <option value="dot">dot</option>
    160               <option value="eiffel">eiffel</option>
    161               <option value="email">email</option>
    162               <option value="fortran">fortran</option>
    163               <option value="freebasic">freebasic</option>
    164               <option value="genero">genero</option>
    165               <option value="gettext">gettext</option>
    166               <option value="glsl">glsl</option>
    167               <option value="gml">gml</option>
    168               <option value="gnuplot">gnuplot</option>
    169               <option value="groovy">groovy</option>
    170               <option value="haskell">haskell</option>
    171               <option value="html4strict">html4strict</option>
    172               <option value="idl">idl</option>
    173               <option value="ini">ini</option>
    174               <option value="inno">inno</option>
    175               <option value="io">io</option>
    176               <option value="java">java</option>
    177               <option value="java5">java5</option>
    178               <option value="javascript">javascript</option>
    179               <option value="kixtart">kixtart</option>
    180               <option value="klonec">klonec</option>
    181               <option value="klonecpp">klonecpp</option>
    182               <option value="latex">latex</option>
    183               <option value="lisp">lisp</option>
    184               <option value="list.txt">list.txt</option>
    185               <option value="lotusformulas">lotusformulas</option>
    186               <option value="lotusscript">lotusscript</option>
    187               <option value="lua">lua</option>
    188               <option value="m68k">m68k</option>
    189               <option value="make">make</option>
    190               <option value="matlab">matlab</option>
    191               <option value="mirc">mirc</option>
    192               <option value="mpasm">mpasm</option>
    193               <option value="mxml">mxml</option>
    194               <option value="mysql">mysql</option>
    195               <option value="nsis">nsis</option>
    196               <option value="objc">objc</option>
    197               <option value="ocaml-brief">ocaml-brief</option>
    198               <option value="ocaml">ocaml</option>
    199               <option value="oobas">oobas</option>
    200               <option value="oracle11">oracle11</option>
    201               <option value="oracle8">oracle8</option>
    202               <option value="pascal">pascal</option>
    203               <option value="per">per</option>
    204               <option value="perl">perl</option>
    205               <option value="php-brief">php-brief</option>
    206               <option value="php" selected="selected">php</option>
    207               <option value="pic16">pic16</option>
    208               <option value="plsql">plsql</option>
    209               <option value="povray">povray</option>
    210               <option value="powershell">powershell</option>
    211               <option value="progress">progress</option>
    212               <option value="prolog">prolog</option>
    213               <option value="python">python</option>
    214               <option value="qbasic">qbasic</option>
    215               <option value="rails">rails</option>
    216               <option value="reg">reg</option>
    217               <option value="robots">robots</option>
    218               <option value="ruby">ruby</option>
    219               <option value="sas">sas</option>
    220               <option value="scala">scala</option>
    221               <option value="scheme">scheme</option>
    222               <option value="scilab">scilab</option>
    223               <option value="sdlbasic">sdlbasic</option>
    224               <option value="smalltalk">smalltalk</option>
    225               <option value="smarty">smarty</option>
    226               <option value="sql">sql</option>
    227               <option value="tcl">tcl</option>
    228               <option value="teraterm">teraterm</option>
    229               <option value="text">text</option>
    230               <option value="thinbasic">thinbasic</option>
    231               <option value="tsql">tsql</option>
    232               <option value="typoscript">typoscript</option>
    233               <option value="vb">vb</option>
    234               <option value="vbnet">vbnet</option>
    235               <option value="verilog">verilog</option>
    236               <option value="vhdl">vhdl</option>
    237               <option value="visualfoxpro">visualfoxpro</option>
    238               <option value="winbatch">winbatch</option>
    239               <option value="xml">xml</option>
    240               <option value="xorg_conf">xorg_conf</option>
    241               <option value="xpp">xpp</option>
    242               <option value="z80">z80</option>
    243             </select></td>
    244         </tr>
    245         <tr>
    246           <th align="right" scope="row">{#WPSynHighlight_dlg.LineNumbers}:</th>
    247           <td width="3">&nbsp;</td>
    248           <td><select name="lines" id="lines">
    249               <option value="default">{#WPSynHighlight_dlg.LineNumbersDefault}</option>
    250               <option value="no">{#WPSynHighlight_dlg.LineNumbersNo}</option>
    251               <option value="normal">{#WPSynHighlight_dlg.LineNumbersNormal}</option>
    252               <option value="fancy">{#WPSynHighlight_dlg.LineNumbersFancy}</option>
    253             </select></td>
    254         </tr>
    255         <tr>
    256           <th align="right" scope="row">{#WPSynHighlight_dlg.LineNumbersStartWith}:</th>
    257           <td width="3">&nbsp;</td>
    258           <td><input name="lines_start" type="text" id="lines_start" size="10" /></td>
    259         </tr>
    260         <tr>
    261           <th align="right" scope="row"> <p>{#WPSynHighlight_dlg.Container}:</p>
    262           </th>
    263           <td width="3">&nbsp;</td>
    264           <td><select name="container" id="container">
    265               <option value="default">{#WPSynHighlight_dlg.ContainerDefault}</option>
    266               <option value="none">{#WPSynHighlight_dlg.ContainerNone}</option>
    267               <option value="div">{#WPSynHighlight_dlg.ContainerDiv}</option>
    268               <option value="pre">{#WPSynHighlight_dlg.ContainerPre}</option>
    269               <option value="pre_valid">{#WPSynHighlight_dlg.ContainerPre_valid}</option>
    270               <option value="pre_table">{#WPSynHighlight_dlg.ContainerPre_table}</option>
    271             </select></td>
    272         </tr>
    273         <tr>
    274           <th align="right" scope="row">{#WPSynHighlight_dlg.CapitalizeKeywords}:</th>
    275           <td width="3">&nbsp;</td>
    276           <td><select name="capitalize" id="capitalize">
    277               <option value="default">{#WPSynHighlight_dlg.CapitalizeKeywordsDefault}</option>
    278               <option value="no">{#WPSynHighlight_dlg.CapitalizeKeywordsNo}</option>
    279               <option value="upper">{#WPSynHighlight_dlg.CapitalizeKeywordsUppercase}</option>
    280               <option value="lower">{#WPSynHighlight_dlg.CapitalizeKeywordsLowercase}</option>
    281             </select></td>
    282         </tr>
    283         <tr>
    284           <th align="right" scope="row">{#WPSynHighlight_dlg.TabWidth}:</th>
    285           <td width="3">&nbsp;</td>
    286           <td><input name="tab_width" type="text" id="tab_width" size="10" /></td>
    287         </tr>
    288         <tr>
    289           <th align="right" scope="row">{#WPSynHighlight_dlg.StrictMode}:</th>
    290           <td width="3">&nbsp;</td>
    291           <td><select name="strict" id="strict">
    292               <option value="default">{#WPSynHighlight_dlg.StrictModeDefault}</option>
    293               <option value="no">{#WPSynHighlight_dlg.StrictModeNo}</option>
    294               <option value="yes">{#WPSynHighlight_dlg.StrictModeYes}</option>
    295             </select></td>
    296         </tr>
    297         <tr>
    298           <th align="right" scope="row">{#WPSynHighlight_dlg.Title}:</th>
    299           <td width="3">&nbsp;</td>
    300           <td><input name="title" type="text" id="title" size="50" /></td>
    301         </tr>
    302         <tr>
    303           <th align="right" scope="row">{#WPSynHighlight_dlg.BookmarkName}:</th>
    304           <td width="3">&nbsp;</td>
    305           <td><input name="bookmarkname" type="text" id="bookmarkname" size="50" /></td>
    306         </tr>
    307         <tr>
    308           <th align="left" scope="row">&nbsp;</th>
    309           <td width="3">&nbsp;</td>
    310           <td>&nbsp;</td>
    311         </tr>
    312         <tr>
    313           <th align="right" scope="row">{#WPSynHighlight_dlg.InitialBlockState}:</th>
    314           <td width="3">&nbsp;</td>
    315           <td><select name="blockstate" id="blockstate">
    316               <option value="default">{#WPSynHighlight_dlg.InitialBlockStateDefault}</option>
    317               <option value="expanded">{#WPSynHighlight_dlg.InitialBlockStateExpanded}</option>
    318               <option value="collapsed">{#WPSynHighlight_dlg.InitialBlockStateCollapsed}</option>
    319             </select></td>
    320         </tr>
    321         <tr>
    322           <th align="right" scope="row">{#WPSynHighlight_dlg.HighlightLines}:</th>
    323           <td width="3">&nbsp;</td>
    324           <td><input name="highlight_lines" type="text" id="highlight_lines"
     146</ul>
     147</div>
     148<div class="panel_wrapper">
     149<div id="options_panel" class="panel current" style="height: auto">
     150<table border="0">
     151    <tr>
     152        <th align="right" scope="row">{#WPSynHighlight_dlg.Language}:</th>
     153        <td width="3">&nbsp;</td>
     154        <td><select name="lang" id="lang">
     155            <option value="abap">abap</option>
     156            <option value="actionscript">actionscript</option>
     157            <option value="actionscript3">actionscript3</option>
     158            <option value="ada">ada</option>
     159            <option value="apache">apache</option>
     160            <option value="applescript">applescript</option>
     161            <option value="apt_sources">apt_sources</option>
     162            <option value="asm">asm</option>
     163            <option value="asp">asp</option>
     164            <option value="autoit">autoit</option>
     165            <option value="avisynth">avisynth</option>
     166            <option value="bash">bash</option>
     167            <option value="basic4gl">basic4gl</option>
     168            <option value="blitzbasic">blitzbasic</option>
     169            <option value="bnf">bnf</option>
     170            <option value="boo">boo</option>
     171            <option value="c">c</option>
     172            <option value="c1">c1</option>
     173            <option value="caddcl">caddcl</option>
     174            <option value="cadlisp">cadlisp</option>
     175            <option value="cfdg">cfdg</option>
     176            <option value="cfm">cfm</option>
     177            <option value="cil">cil</option>
     178            <option value="cobol">cobol</option>
     179            <option value="cpp-qt">cpp-qt</option>
     180            <option value="cpp">cpp</option>
     181            <option value="csharp">csharp</option>
     182            <option value="css">css</option>
     183            <option value="c_mac">c_mac</option>
     184            <option value="d">d</option>
     185            <option value="delphi">delphi</option>
     186            <option value="diff">diff</option>
     187            <option value="div">div</option>
     188            <option value="dos">dos</option>
     189            <option value="dot">dot</option>
     190            <option value="eiffel">eiffel</option>
     191            <option value="email">email</option>
     192            <option value="fortran">fortran</option>
     193            <option value="freebasic">freebasic</option>
     194            <option value="genero">genero</option>
     195            <option value="gettext">gettext</option>
     196            <option value="glsl">glsl</option>
     197            <option value="gml">gml</option>
     198            <option value="gnuplot">gnuplot</option>
     199            <option value="groovy">groovy</option>
     200            <option value="haskell">haskell</option>
     201            <option value="html4strict">html4strict</option>
     202            <option value="idl">idl</option>
     203            <option value="ini">ini</option>
     204            <option value="inno">inno</option>
     205            <option value="io">io</option>
     206            <option value="java">java</option>
     207            <option value="java5">java5</option>
     208            <option value="javascript">javascript</option>
     209            <option value="kixtart">kixtart</option>
     210            <option value="klonec">klonec</option>
     211            <option value="klonecpp">klonecpp</option>
     212            <option value="latex">latex</option>
     213            <option value="lisp">lisp</option>
     214            <option value="list.txt">list.txt</option>
     215            <option value="lotusformulas">lotusformulas</option>
     216            <option value="lotusscript">lotusscript</option>
     217            <option value="lua">lua</option>
     218            <option value="m68k">m68k</option>
     219            <option value="make">make</option>
     220            <option value="matlab">matlab</option>
     221            <option value="mirc">mirc</option>
     222            <option value="mpasm">mpasm</option>
     223            <option value="mxml">mxml</option>
     224            <option value="mysql">mysql</option>
     225            <option value="nsis">nsis</option>
     226            <option value="objc">objc</option>
     227            <option value="ocaml-brief">ocaml-brief</option>
     228            <option value="ocaml">ocaml</option>
     229            <option value="oobas">oobas</option>
     230            <option value="oracle11">oracle11</option>
     231            <option value="oracle8">oracle8</option>
     232            <option value="pascal">pascal</option>
     233            <option value="per">per</option>
     234            <option value="perl">perl</option>
     235            <option value="php-brief">php-brief</option>
     236            <option value="php" selected="selected">php</option>
     237            <option value="pic16">pic16</option>
     238            <option value="plsql">plsql</option>
     239            <option value="povray">povray</option>
     240            <option value="powershell">powershell</option>
     241            <option value="progress">progress</option>
     242            <option value="prolog">prolog</option>
     243            <option value="python">python</option>
     244            <option value="qbasic">qbasic</option>
     245            <option value="rails">rails</option>
     246            <option value="reg">reg</option>
     247            <option value="robots">robots</option>
     248            <option value="ruby">ruby</option>
     249            <option value="sas">sas</option>
     250            <option value="scala">scala</option>
     251            <option value="scheme">scheme</option>
     252            <option value="scilab">scilab</option>
     253            <option value="sdlbasic">sdlbasic</option>
     254            <option value="smalltalk">smalltalk</option>
     255            <option value="smarty">smarty</option>
     256            <option value="sql">sql</option>
     257            <option value="tcl">tcl</option>
     258            <option value="teraterm">teraterm</option>
     259            <option value="text">text</option>
     260            <option value="thinbasic">thinbasic</option>
     261            <option value="tsql">tsql</option>
     262            <option value="typoscript">typoscript</option>
     263            <option value="vb">vb</option>
     264            <option value="vbnet">vbnet</option>
     265            <option value="verilog">verilog</option>
     266            <option value="vhdl">vhdl</option>
     267            <option value="visualfoxpro">visualfoxpro</option>
     268            <option value="winbatch">winbatch</option>
     269            <option value="xml">xml</option>
     270            <option value="xorg_conf">xorg_conf</option>
     271            <option value="xpp">xpp</option>
     272            <option value="z80">z80</option>
     273        </select></td>
     274    </tr>
     275    <tr>
     276        <th align="right" scope="row">{#WPSynHighlight_dlg.LineNumbers}:</th>
     277        <td width="3">&nbsp;</td>
     278        <td><select name="lines" id="lines">
     279            <option value="default">{#WPSynHighlight_dlg.LineNumbersDefault}</option>
     280            <option value="no">{#WPSynHighlight_dlg.LineNumbersNo}</option>
     281            <option value="normal">{#WPSynHighlight_dlg.LineNumbersNormal}</option>
     282            <option value="fancy">{#WPSynHighlight_dlg.LineNumbersFancy}</option>
     283        </select></td>
     284    </tr>
     285    <tr>
     286        <th align="right" scope="row">{#WPSynHighlight_dlg.LineNumbersStartWith}:</th>
     287        <td width="3">&nbsp;</td>
     288        <td><input name="lines_start" type="text" id="lines_start" size="10" /></td>
     289    </tr>
     290    <tr>
     291        <th align="right" scope="row">
     292        <p>{#WPSynHighlight_dlg.Container}:</p>
     293        </th>
     294        <td width="3">&nbsp;</td>
     295        <td><select name="container" id="container">
     296            <option value="default">{#WPSynHighlight_dlg.ContainerDefault}</option>
     297            <option value="none">{#WPSynHighlight_dlg.ContainerNone}</option>
     298            <option value="div">{#WPSynHighlight_dlg.ContainerDiv}</option>
     299            <option value="pre">{#WPSynHighlight_dlg.ContainerPre}</option>
     300            <option value="pre_valid">{#WPSynHighlight_dlg.ContainerPre_valid}</option>
     301            <option value="pre_table">{#WPSynHighlight_dlg.ContainerPre_table}</option>
     302        </select></td>
     303    </tr>
     304    <tr>
     305        <th align="right" scope="row">{#WPSynHighlight_dlg.CapitalizeKeywords}:</th>
     306        <td width="3">&nbsp;</td>
     307        <td><select name="capitalize" id="capitalize">
     308            <option value="default">{#WPSynHighlight_dlg.CapitalizeKeywordsDefault}</option>
     309            <option value="no">{#WPSynHighlight_dlg.CapitalizeKeywordsNo}</option>
     310            <option value="upper">{#WPSynHighlight_dlg.CapitalizeKeywordsUppercase}</option>
     311            <option value="lower">{#WPSynHighlight_dlg.CapitalizeKeywordsLowercase}</option>
     312        </select></td>
     313    </tr>
     314    <tr>
     315        <th align="right" scope="row">{#WPSynHighlight_dlg.TabWidth}:</th>
     316        <td width="3">&nbsp;</td>
     317        <td><input name="tab_width" type="text" id="tab_width" size="10" /></td>
     318    </tr>
     319    <tr>
     320        <th align="right" scope="row">{#WPSynHighlight_dlg.StrictMode}:</th>
     321        <td width="3">&nbsp;</td>
     322        <td><select name="strict" id="strict">
     323            <option value="default">{#WPSynHighlight_dlg.StrictModeDefault}</option>
     324            <option value="no">{#WPSynHighlight_dlg.StrictModeNo}</option>
     325            <option value="yes">{#WPSynHighlight_dlg.StrictModeYes}</option>
     326        </select></td>
     327    </tr>
     328    <tr>
     329        <th align="right" scope="row">{#WPSynHighlight_dlg.Title}:</th>
     330        <td width="3">&nbsp;</td>
     331        <td><input name="title" type="text" id="title" size="50" /></td>
     332    </tr>
     333    <tr>
     334        <th align="right" scope="row">{#WPSynHighlight_dlg.BookmarkName}:</th>
     335        <td width="3">&nbsp;</td>
     336        <td><input name="bookmarkname" type="text" id="bookmarkname" size="50" /></td>
     337    </tr>
     338    <tr>
     339        <th align="left" scope="row">&nbsp;</th>
     340        <td width="3">&nbsp;</td>
     341        <td>&nbsp;</td>
     342    </tr>
     343    <tr>
     344        <th align="right" scope="row">{#WPSynHighlight_dlg.InitialBlockState}:</th>
     345        <td width="3">&nbsp;</td>
     346        <td><select name="blockstate" id="blockstate">
     347            <option value="default">{#WPSynHighlight_dlg.InitialBlockStateDefault}</option>
     348            <option value="expanded">{#WPSynHighlight_dlg.InitialBlockStateExpanded}</option>
     349            <option value="collapsed">{#WPSynHighlight_dlg.InitialBlockStateCollapsed}</option>
     350        </select></td>
     351    </tr>
     352    <tr>
     353        <th align="right" scope="row">{#WPSynHighlight_dlg.HighlightLines}:</th>
     354        <td width="3">&nbsp;</td>
     355        <td><input name="highlight_lines" type="text" id="highlight_lines"
    325356            size="50" /></td>
    326         </tr>
    327         <tr>
    328           <td colspan="3" align="center">&nbsp;</td>
    329         </tr>
    330         <tr>
    331           <td colspan="3" align="center">{#WPSynHighlight_dlg.PHPNote}</td>
    332         </tr>
    333       </table>
    334     </div>
    335     <div id="code_panel" class="panel">
    336       <textarea name="sourcecode"
    337     id="sourcecode"> Enter code here</textarea>
    338     </div>
    339   </div>
    340   <p>
    341   <div style="float: left;">
    342     <input type="button" id="insert"
     357    </tr>
     358    <tr>
     359        <th align="right" scope="row">{#WPSynHighlight_dlg.DocLinks}:</th>
     360        <td width="3">&nbsp;</td>
     361        <td><select name="doclinks" id="doclinks">
     362            <option value="default">{#WPSynHighlight_dlg.DocLinksDefault}</option>
     363            <option value="1">{#WPSynHighlight_dlg.DocLinksOn}</option>
     364            <option value="0">{#WPSynHighlight_dlg.DocLinksOff}</option>
     365        </select></td>
     366    </tr>
     367    <tr>
     368        <td colspan="3" align="center">&nbsp;</td>
     369    </tr>
     370    <tr>
     371        <td colspan="3" align="center">{#WPSynHighlight_dlg.PHPNote}</td>
     372    </tr>
     373</table>
     374</div>
     375<div id="code_panel" class="panel"><textarea name="sourcecode"
     376    id="sourcecode"> Enter code here</textarea></div>
     377</div>
     378<p>
     379<div style="float: left;"><input type="button" id="insert"
    343380    value="{#WPSynHighlight_dlg.Insert}" onclick="insertShortCode()"
    344     style="width: 120" />
    345   </div>
    346   <div style="float: right;">
    347     <input type="button" id="cancel"
     381    style="width: 120" /></div>
     382<div style="float: right;"><input type="button" id="cancel"
    348383    value="{#WPSynHighlight_dlg.Cancel}" onclick="tinyMCEPopup.close();"
    349     style="width: 120" />
    350   </div>
    351   </p>
     384    style="width: 120" /></div>
     385</p>
    352386</form>
    353387</body>
  • wp-synhighlight/trunk/tinymce/tinymce_buttons.js

    r190111 r344159  
    1818                    file : url + '/panel.php',
    1919                    width : 600,
    20                     height : 400,
     20                    height : 430,
    2121                    inline : 1,
    2222                    resizable: 1,
     
    6161                authorurl : 'http://www.fractalizer.ru',
    6262                infourl : 'http://wordpress.org/extend/plugins/wp-synhighlight/',
    63                 version : '2.0'
     63                version : '2.3'
    6464            };
    6565        }
  • wp-synhighlight/trunk/wp-synhighlighter-ru_RU.po

    r192365 r344159  
    33"Project-Id-Version: WP-SynHighlight\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2010-01-10 23:35+0300\n"
     5"POT-Creation-Date: 2011-02-10 17:02+0300\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: FractalizeR <[email protected]>\n"
     
    1414"X-Poedit-SearchPath-0: .\n"
    1515
    16 #: modules/highlighter.php:23
     16#: modules/highlighter.php:24
    1717msgid "WP-SYNHIGHLIGHT PLUGIN: NOTHING TO HIGHLIGHT! PLEASE READ README.TXT IN PLUGIN FOLDER!"
    1818msgstr "WP-SYNHIGHLIGHT PLUGIN: НЕТ ТЕКСТА ДЛЯ ВЫДЕЛЕНИЯ! ПОЖАЛУЙСТА, ПРОЧТИТЕ README.TXT В ПАПКЕ С ПЛАГИНОМ!"
    1919
    20 #: modules/highlighter.php:31
     20#: modules/highlighter.php:32
    2121msgid "Code block"
    2222msgstr "Исходный код"
    2323
    24 #: modules/on_install.php:12
    25 #: modules/settings.php:25
     24#: modules/highlighter.php:192
     25msgid "WP-SYNHIGHLIGHT PLUGIN: [FILESYNTAX SHORTCODE IS DISABLED IN PLUGIN SETTINGS! PLEASE READ README.TXT IN PLUGIN FOLDER!"
     26msgstr "WP-SYNHIGHLIGHT PLUGIN: тег [filesyntax] отключен в настройках. См. README файл в корневой папке плагина."
     27
     28#: modules/highlighter.php:198
     29msgid "WP-SYNHIGHLIGHT PLUGIN: NOTHING TO HIGHLIGHT USING FILESYNTAX TAG! FILENAME REQUIRED. PLEASE READ README.TXT IN PLUGIN FOLDER!"
     30msgstr "WP-SYNHIGHLIGHT PLUGIN: для использование тега [filesyntax] требуется указание атрибута filename. См. README файл в корневой папке плагина"
     31
     32#: modules/highlighter.php:210
     33msgid "WP-SYNHIGHLIGHT PLUGIN: SECURITY VIOLATION! FILENAME FOR [FILESYNTAX] TAG DOES NOT EXIST OR IS OUTSIDE ALLOWED DIR! PLEASE READ README.TXT IN PLUGIN FOLDER!"
     34msgstr "WP-SYNHIGHLIGHT PLUGIN: ошибка безопасности. Файл для тега [filesyntax] отсутствует или находится вне разрешенного каталога. См. README файл в корневой папке плагина!"
     35
     36#: modules/highlighter.php:217
     37msgid "WP-SYNHIGHLIGHT PLUGIN: SECURITY VIOLATION! FILENAME FOR [FILESYNTAX] TAG DOES HAVE ALLOWED EXTENSIONS! PLEASE READ README.TXT IN PLUGIN FOLDER!"
     38msgstr "WP-SYNHIGHLIGHT PLUGIN: ошибка безопасности. Расширение файла для тега [filesyntax] не входит в список разрешенных в настройках. См. README файл в корневой папке плагина!"
     39
     40#: modules/on_install.php:14
     41#: modules/settings.php:27
    2642msgid "Source code"
    2743msgstr "Исходный код"
    2844
    29 #: modules/settings.php:227
     45#: modules/on_install.php:32
     46msgid "WP-SynHighligher plugin is almost ready."
     47msgstr "WP-SynHighligher почти готов к работе"
     48
     49#: modules/on_install.php:34
     50#, php-format
     51msgid "You might want to <a href=\"%1$s\">adjust its settings</a> for it to work as you want."
     52msgstr "Возможно, вы захотите <a href=\"%1$s\">изменить настройки плагина</a> чтобы он работал так, как вам этого хочется."
     53
     54#: modules/on_install.php:40
     55msgid "You are using WP-SynHighligher plugin for quite long already. "
     56msgstr "Вы используете плагин WP-SynHighligher уже довольно давно."
     57
     58#: modules/on_install.php:42
     59#, php-format
     60msgid "Thank you! You might want to <a href=\"%1$s\">donate to its development</a>, <a href=\"%2$s\">rate it</a>, <a href=\"%3$s\">ask a question about it or just tell us how you like it or not.</a>"
     61msgstr "Спасибо! Возможно, вам захочется <a href=\"%1$s\">сделать пожертвование</a>, <a href=\"%2$s\">оценить плагин</a>, <a href=\"%3$s\">задать вопрос по его использованию или просто высказаться.</a>"
     62
     63#: modules/settings.php:257
    3064msgid "WP-SynHighlighter Settings"
    3165msgstr "Настройки WP-SynHighlighter"
    3266
    33 #: modules/settings.php:232
    34 msgid "If you like this plugin, you can make a donation with WebMoney (R704473788938, Z590997805426), Yandex.Money (41001122895969), MoneyBookers ([email protected]) or just send a special donation SMS directly <a href=\"http://www.fractalizer.ru\" target=\"_blank\">from my website</a> (just click that read SMS Donate button and follow instructions)"
    35 msgstr "Если вам понравился этот плагин, вы можете поддержать разработку с помощью WebMoney (R704473788938, Z590997805426), Yandex.Money (41001122895969), MoneyBookers ([email protected]) или просто послав специальную SMS прямо <a href=\"http://ru.fractalizer.ru\" target=\"_blank\">с моего вебсайта</a> (просто кликните по красной кнопке SMS Donate и следуйте инструкциям)"
    36 
    37 #: modules/settings.php:242
     67#: modules/settings.php:262
     68msgid "<b>If you like this plugin, you can make a donation with WebMoney (R704473788938, Z590997805426), Yandex.Money (41001122895969), MoneyBookers (<a mailto:=\"[email protected]\">[email protected]</a>) or just send a special donation SMS directly <a href=\"http://www.fractalizer.ru\" target=\"_blank\">from my website</a> (just click that read SMS Donate button and follow instructions)<br /><a href=\"https://www.moneybookers.com/app/send.pl\" target=\"_blank\"><img src=\"../wp-content/plugins/wp-synhighlight/themes/default/images/moneybookers.gif\"></a></b>"
     69msgstr "<b>Если вам понравился этот плагин, вы можете поддержать разработку с помощью WebMoney (R704473788938, Z590997805426), Yandex.Money (41001122895969), MoneyBookers ([email protected]) или просто послав специальную SMS прямо <a href=\"http://ru.fractalizer.ru\" target=\"_blank\">с моего вебсайта</a> (просто кликните по красной кнопке SMS Donate и следуйте инструкциям)</b>"
     70
     71#: modules/settings.php:272
    3872msgid "Enable code highlighting in comments"
    3973msgstr "Разрешить подсветку кода в комментариях"
    4074
    41 #: modules/settings.php:253
     75#: modules/settings.php:283
    4276msgid "Disable EditArea (realtime code highlighting in GUI)"
    4377msgstr "Отключить EditArea (редактор исходного кода с подсветкой синтаксиса в редакторе)"
    4478
    45 #: modules/settings.php:264
     79#: modules/settings.php:294
    4680msgid "Use this theme folder"
    4781msgstr "Использовать оформление из этой папки"
    4882
    49 #: modules/settings.php:268
     83#: modules/settings.php:298
    5084msgid "The theme folder to use for block styling"
    5185msgstr "Папка темы для оформления блока с кодом"
    5286
    53 #: modules/settings.php:281
     87#: modules/settings.php:311
    5488msgid "Default code block title"
    5589msgstr "Заголовок блока с кодом по умолчанию"
    5690
    57 #: modules/settings.php:292
     91#: modules/settings.php:322
    5892msgid "Default line numbering style"
    5993msgstr "Стиль номеров строк по умолчанию"
    6094
    61 #: modules/settings.php:301
    62 #: modules/settings.php:352
    63 #: modules/settings.php:409
    64 #: modules/settings.php:462
     95#: modules/settings.php:331
     96#: modules/settings.php:382
     97#: modules/settings.php:439
     98#: modules/settings.php:492
    6599msgid "Geshi default"
    66100msgstr "как в geshi по умолчанию"
    67101
    68 #: modules/settings.php:309
    69 #: modules/settings.php:417
     102#: modules/settings.php:339
     103#: modules/settings.php:447
    70104msgid "no"
    71105msgstr "нет"
    72106
    73 #: modules/settings.php:317
     107#: modules/settings.php:347
    74108msgid "normal"
    75109msgstr "обычные"
    76110
    77 #: modules/settings.php:325
     111#: modules/settings.php:355
    78112msgid "fancy"
    79113msgstr "необычные"
    80114
    81 #: modules/settings.php:332
     115#: modules/settings.php:362
    82116msgid "Line numbers by default start with"
    83117msgstr "Номера строк по умолчанию начинаются с"
    84118
    85 #: modules/settings.php:343
     119#: modules/settings.php:373
    86120msgid "Default container"
    87121msgstr "Контейнер по умолчанию"
    88122
    89 #: modules/settings.php:360
     123#: modules/settings.php:390
    90124msgid "none"
    91125msgstr "нет"
    92126
    93 #: modules/settings.php:368
     127#: modules/settings.php:398
    94128msgid "DIV tag"
    95129msgstr "тег DIV"
    96130
    97 #: modules/settings.php:376
     131#: modules/settings.php:406
    98132msgid "PRE tag"
    99133msgstr "тег PRE"
    100134
    101 #: modules/settings.php:384
     135#: modules/settings.php:414
    102136msgid "valid PRE tag"
    103137msgstr "валидный тег PRE"
    104138
    105 #: modules/settings.php:392
     139#: modules/settings.php:422
    106140msgid "PRE and TABLE"
    107141msgstr "теги PRE и TABLE"
    108142
    109 #: modules/settings.php:399
     143#: modules/settings.php:429
    110144msgid "Change case of keywords by default"
    111145msgstr "Изменять регистр ключевых слов по умолчанию"
    112146
    113 #: modules/settings.php:425
     147#: modules/settings.php:455
    114148msgid "convert to uppercase"
    115149msgstr "преобразовывать в верхний регистр"
    116150
    117 #: modules/settings.php:434
     151#: modules/settings.php:464
    118152msgid "convert to lowercase"
    119153msgstr "преобразовывать в нижний регистр"
    120154
    121 #: modules/settings.php:442
     155#: modules/settings.php:472
    122156msgid "Default tab width"
    123157msgstr "Ширина табуляции по умолчанию"
    124158
    125 #: modules/settings.php:453
     159#: modules/settings.php:483
    126160msgid "Strict mode by default"
    127161msgstr "Строгий режим по умолчанию"
    128162
    129 #: modules/settings.php:470
     163#: modules/settings.php:500
    130164msgid "always"
    131165msgstr "всегда"
    132166
    133 #: modules/settings.php:478
     167#: modules/settings.php:508
    134168msgid "never"
    135169msgstr "никогда"
    136170
    137 #: modules/settings.php:486
     171#: modules/settings.php:516
    138172msgid "maybe"
    139173msgstr "иногда"
    140174
    141 #: modules/settings.php:493
     175#: modules/settings.php:523
    142176msgid "Default block state"
    143177msgstr "Состояние блока с кодом по умолчанию"
    144178
    145 #: modules/settings.php:502
     179#: modules/settings.php:532
    146180msgid "default"
    147181msgstr "по умолчанию"
    148182
    149 #: modules/settings.php:510
     183#: modules/settings.php:540
    150184msgid "expanded"
    151185msgstr "развернут"
    152186
    153 #: modules/settings.php:518
     187#: modules/settings.php:548
    154188msgid "collapsed"
    155189msgstr "свернут"
    156190
    157 #: modules/settings.php:525
     191#: modules/settings.php:555
    158192msgid "Styling type"
    159193msgstr "Тип оформления"
    160194
    161 #: modules/settings.php:534
     195#: modules/settings.php:564
    162196msgid "use inline styles"
    163197msgstr "встроенные стили"
    164198
    165 #: modules/settings.php:543
     199#: modules/settings.php:573
    166200msgid "use theme bundled css files"
    167201msgstr "внешние CSS файлы в папке темы"
    168202
    169 #: modules/settings.php:553
     203#: modules/settings.php:583
    170204msgid "embed styles into BODY (makes HTML invalid, browser-slow; see docs)"
    171205msgstr "внедрять стили (повреждает HTML, медленно отрисовывается браузером, см. документацию)"
    172206
    173 #: modules/settings.php:565
     207#: modules/settings.php:591
     208#: modules/settings.php:595
     209msgid "Code box height in pixels. 0 = use value from CSS"
     210msgstr "Высота блока в пикселях. 0 = использовать значение из CSS"
     211
     212#: modules/settings.php:605
     213msgid "Enable the use of [filesyntax] tag (see README for details)"
     214msgstr "Разрешить использование тега [filesyntax] (см. README файл)"
     215
     216#: modules/settings.php:617
     217msgid "Disable documentation links for keywords in highlighted source"
     218msgstr "Отключить генерацию ссылок на документацию при подсветке синтаксиса"
     219
     220#: modules/settings.php:629
     221msgid "Limit [filesyntax] tag to work with files from this folder only"
     222msgstr "Ограничить работу тега [filesyntax] только файлами из этого каталога"
     223
     224#: modules/settings.php:634
     225msgid "Only files from this folder will be available for highlighting using [filesyntax] shortcode tag. Required."
     226msgstr "Действие тега [filesyntax] будет распространяться только на файлы в этой папке и ниже"
     227
     228#: modules/settings.php:645
     229msgid "Limit [filesyntax] tag to files with these extensions only"
     230msgstr "Ограничить работу тега [filesyntax] только файлами следующих расширений"
     231
     232#: modules/settings.php:650
     233msgid "[filesyntax] tag will work only on files with these extensions (separate with spaces). Required."
     234msgstr "Тег [filesyntax] будет работать только с файлами с данными расширениями (разделяйте расширения пробелами). Требуется."
     235
     236#: modules/settings.php:664
    174237msgid "Save Changes"
    175238msgstr "Сохранить изменения"
    176239
    177 #: themes/default/block_template.php:35
     240#: themes/default/block_template.php:42
    178241msgid "Click to show/hide code block"
    179242msgstr "Нажмите, чтобы показать или скрыть блок кода"
    180243
    181 #: themes/default/block_template.php:41
     244#: themes/default/block_template.php:49
    182245msgid "Show code only"
    183246msgstr "Показать код отдельно"
    184247
    185 #: themes/default/block_template.php:42
     248#: themes/default/block_template.php:51
    186249msgid "Print code"
    187250msgstr "Напечатать код"
    188251
    189 #: themes/default/block_template.php:43
     252#: themes/default/block_template.php:53
    190253msgid "Show plugin information"
    191254msgstr "Показать информацию о плагине"
    192255
     256#~ msgid "Root folder to enable file highlighting in"
     257#~ msgstr "Разрешить работу тега [filesyntax] только в этой папке и ниже"
     258
  • wp-synhighlight/trunk/wp-synhighlighter.php

    r294532 r344159  
    44Plugin URI: http://www.fractalizer.ru/freeware-projects/wordpress-plugins/wp-synhighlight/
    55Description: Source code Syntax highlighting plugin with full GUI support. Please see README.txt and screenshots for more information. I'd love to get feature sugesstions and bug reports to my email. <a href="options-general.php?page=wp-synhighlight/modules/settings.php">Plugin settings</a> | <a href="http://wordpress.org/tags/wp-synhighlight?forum_id=10">Support forum</a>
    6 Version: 2.2.7
     6Version: 2.3
    77Author: Vladislav "FractalizeR" Rastrusny
    88Author URI: http://www.fractalizer.ru
     
    3131//Setting some vars
    3232$wp_sh_use_theme = get_option('wp_synhighlight_use_theme');
    33 $wp_sh_themeURL = trim(get_bloginfo("wpurl"), '/') . '/' . ($wp_sh_use_theme ? (trim($wp_sh_use_theme, '/')) : ('wp-content/plugins/wp-synhighlight/themes/default'));
     33$wp_sh_themeURL = trim(get_bloginfo("wpurl"), '/') . '/' . ($wp_sh_use_theme ? (trim(
     34        $wp_sh_use_theme, '/')) : ('wp-content/plugins/wp-synhighlight/themes/default'));
    3435
    3536$wp_sh_styling_type = get_option("wp_synhighlight_styling_type");
    3637$wp_sh_styling_type = $wp_sh_styling_type ? $wp_sh_styling_type : 'inline';
    3738
     39$wpsh_upload_dir = wp_upload_dir();
     40$wpsh_upload_dir = realpath($wpsh_upload_dir['basedir']);
     41
     42$wpsh_upload_dir = get_option('wp_synhighlight_filesyntax_dir') ? (get_option(
     43        'wp_synhighlight_filesyntax_dir')) : ($wpsh_upload_dir);
     44
    3845//Registering highlighter
    3946require_once 'modules/highlighter.php';
    4047add_shortcode('codesyntax', 'fr_codesyntax_handler');
     48add_shortcode('filesyntax', 'fr_filesyntax_handler');
     49
    4150add_filter('no_texturize_shortcodes', 'fr_no_texturize_shortcodes');
    4251
     
    5059require_once 'modules/on_install.php';
    5160register_activation_hook(__FILE__, 'wp_synhighlight_on_install');
     61add_action('init', 'wpsh_check_date');
    5262
    5363//Adding Geshi styles if needed
Note: See TracChangeset for help on using the changeset viewer.