Changeset 1527 in ExiteCMS


Ignore:
Timestamp:
07/06/08 08:55:55 (4 years ago)
Author:
hverton
Message:

more fixed to the code block fold-out. Style sheet adjusted, line numbers right-aligned, made sure the options line under the block is the same width as the code block

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/administration/tools/language_pack_English.php

    r1524 r1527  
    22982298        $localestrings['580'] = "skype"; 
    22992299        $localestrings['581'] = "Top"; 
     2300        $localestrings['582'] = "Toggle full code view"; 
     2301        $localestrings['583'] = "download this %s code"; 
     2302        $localestrings['584'] = "download"; 
     2303        $localestrings['585'] = "Code:"; 
    23002304        load_localestrings($localestrings, LP_LOCALE, "forum.main", $step); 
    23012305 
  • trunk/administration/tools/language_pack_Nederlands.php

    r1524 r1527  
    22982298        $localestrings['580'] = "skype"; 
    22992299        $localestrings['581'] = "Naar boven"; 
     2300        $localestrings['582'] = "Zichtbare code aanpassen"; 
     2301        $localestrings['583'] = "deze %s code downloaden"; 
     2302        $localestrings['584'] = "download"; 
     2303        $localestrings['585'] = "Code:"; 
    23002304        load_localestrings($localestrings, LP_LOCALE, "forum.main", $step); 
    23012305 
  • trunk/files/locales/en.main.global.php

    r1524 r1527  
    33// locale       : English 
    44// locale name  : main.global 
    5 // generated on : Sat Jul 5 2008, 12:21:41 CEST 
     5// generated on : Sat Jul 5 2008, 21:35:58 CEST 
    66// translators  : ExiteCMS team,WanWizard 
    77// ---------------------------------------------------------- 
  • trunk/includes/forum_functions_include.php

    r1526 r1527  
    330330 
    331331function _parseubb_codeblock($matches) { 
    332     global $codeblocks, $blockcount, $current_message, $raw_color_blocks; 
     332    global $codeblocks, $blockcount, $current_message, $raw_color_blocks, $locale; 
    333333 
    334334    // empty code block? 
     
    364364    $id = count($codeblocks); 
    365365    ++$blockcount; 
    366     $link = "<img src='".THEME."images/panel_on.gif' alt='' title='Toggle full code view' name='b_code_".$blockcount."' onclick=\"javascript:flipOverflow('code_".$blockcount."')\" />"; 
    367     $link .= "<div class='side' style='display:inline;'> <a href='".BASEDIR."getfile.php?type=fc&amp;forum_id=".$current_message['forum_id']."&amp;thread_id=".$current_message['thread_id']."&amp;post_id=".$current_message['post_id']."&amp;id=".$id."' title='download this ".$matches[1]." code'>download</a> </div>"; 
    368     $codeblocks[] = array(" 
    369     <div id='box_code_".$blockcount."' class='codecontainer'> 
    370     <table class='codeblock' cellpadding='0' cellspacing='0'> 
    371         <tr style='padding:0px;margin:0px;'> 
    372             <td class='codenr'>".$ln."</td> 
    373             <td class='code'>".$matches[2]."</td> 
    374         </tr> 
    375     </table> 
    376     </div>".$link." 
    377     ", $matches[1]); 
     366    $link = "<table class='codecontainer' style='border:0px;'><tr><td align='left'><a href='".BASEDIR."getfile.php?type=fc&amp;forum_id=".$current_message['forum_id']."&amp;thread_id=".$current_message['thread_id']."&amp;post_id=".$current_message['post_id']."&amp;id=".$id."' title='".sprintf($locale['583'],$matches[1])."'>".$locale['584']."</a></td><td align='right'><img src='".THEME."images/right.gif' alt='' title='".$locale['582']."' name='b_code_".$blockcount."' onclick=\"javascript:flipOverflow('code_".$blockcount."')\" /></td></tr></table>"; 
     367    $codeblocks[] = array("<div id='box_code_".$blockcount."' class='codecontainer'><table class='codeblock' cellpadding='0' cellspacing='0'><tr style='padding:0px;margin:0px;'><td class='codenr'>".$ln."</td><td class='code'>".$matches[2]."</td></tr></table></div>".$link, $matches[1]); 
    378368    return "{**@".($id)."@**}"; 
    379369} 
     
    427417    $rawmsg = parseubb($rawmsg); 
    428418    // convert any newlines to html <br> 
     419    $rawmsg = str_replace("\r\n\r\n", "\r\n", $rawmsg); 
    429420    $rawmsg = nl2br($rawmsg); 
     421     
    430422 
    431423    // re-insert the saved code blocks 
  • trunk/includes/templates/forum.viewthread.tpl

    r1526 r1527  
    2222function flipOverflow(who) { 
    2323    var tmp; 
    24     var status; 
    25     if (document.images['b_' + who].src.indexOf('_on') == -1) {  
    26         tmp = document.images['b_' + who].src.replace('_off', '_on'); 
     24    if (document.images['b_' + who].src.indexOf('right.gif') == -1) { 
     25        tmp = document.images['b_' + who].src.replace('left.gif', 'right.gif'); 
    2726        document.getElementById('box_' + who).style.overflowX = 'hidden'; 
    2827        document.getElementById('box_' + who).style.overflow = 'hidden'; 
    2928    } else {  
    30         tmp = document.images['b_' + who].src.replace('_on', '_off'); 
     29        tmp = document.images['b_' + who].src.replace('right.gif', 'left.gif'); 
    3130        if (BrowserDetect.browser == "Explorer") { 
    3231            document.getElementById('box_' + who).style.overflowX = 'scroll'; 
  • trunk/themes/ExiteCMS/templates/templates/_stylesheets.tpl

    r1524 r1527  
    176176.quote                  { color:#333; background-color:#ddd; padding:4px; margin:5px 10px 5px 10px; border:1px #444 solid; } 
    177177 
    178 .codecontainer          { width:480px; background-color:#ffffef; border:1px #bbb solid; overflow:hidden; position:relative; z-index:1; } 
     178.codecontainer          { width:480px; border:1px #bbb solid; overflow:hidden; position:relative; z-index:1; } 
    179179.codeblock              { } 
    180 .codenr                 { font-family:monospace; font-size:1em; background-color:#fffef; padding: 0px 5px 0px 5px; vertical-align:top; } 
     180.codenr                 { font-family:monospace; font-size:1em; background-color:#ffffdf; padding: 0px 5px 0px 5px; vertical-align:top; text-align:right;} 
    181181.code                   { font-family:monospace; background-color:#ffffef; white-space:nowrap; } 
    182182 
Note: See TracChangeset for help on using the changeset viewer.