You are not connected. Please login or register

  1. ☆SimonFounder

    ☆Simon
    Giới tính :
    Nam
    Số bài viết :
    205
    Tham gia :
    20/01/2012
    [Code] Tô màu cho Javascript mọi phiên bản Flag_r10
    [You must be registered and logged in to see this link.]
    [Code] Tô màu cho Javascript mọi phiên bản 9-16-210
    Nguồn: view source [You must be registered and logged in to see this link.] ( có chính sửa class pun và viết cho phpBB2 )
    Bước 1: ACP - Display - Pictures and Colors - Colors - CSS Stylesheet:
    Code:
    .prettyprint .pln{color:#000}.prettyprint .str{color:#080}.prettyprint .kwd{color:#008}.prettyprint .com{color:#800}.prettyprint .typ{color:#606}.prettyprint .lit{color:#066}.prettyprint .fmvip{color:#660}.prettyprint .tag{color:#008}.prettyprint .atn{color:#606}.prettyprint .atv{color:#080}.prettyprint .dec{color:#606}.prettyprint .linenums li{border-left:3px solid #EBEFF9;padding-left:5px}.prettyprint{font-family:Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;font-size:13px;padding:2px}.prettyprint ol.linenums{margin-bottom:0;margin-top:0}ol.linenums:hover{list-style-type:none}

    Bước 2: ACP - Modules - HTML & JAVASCRIPT - Javascript codes management:
    • Title * : prettyprint for code forumotion
    • Placement : In the topics
    • Javascript Code * :
      • phpBB3 - punBB - Invision
        Code:
        $(function () {
           if ($("code").filter(function () {
              var a = $(this).text().indexOf("["),
                 b = $(this).text().indexOf("]"),
                 c = $(this).text().indexOf("[/"),
                 d = $(this).text().indexOf("<"),
                 e = $(this).text().indexOf('"'),
                 f = $(this).text().indexOf("'"),
                 g = $(this).text().indexOf("/");
              return a == -1 || b == -1 || c == -1 || a > b || b > c || d != -1 && d < a || e != -1 && e < a || f != -1 && f < a || g != -1 && g < a
           }).each(function () {
              $(this).wrapInner('<pre class="prettyprint' + ($(this).text().indexOf("<") == -1 && /[\s\S]+{[\s\S]+:[\s\S]+}/.test($(this).text()) ? " lang-css" : "") + ' linenums" />')
           }).length) {
              var s = document.createElement("script");
              s.type = "text/javascript";
              s.async = !0;
              s.src = "http://fmvi-group.googlecode.com/files/fmvi-color-code.js";
              document.getElementsByTagName("head")[0].appendChild(s)
           };
        });
      • phpBB2
        Code:
        $(function () {
           if ($("div.cont_code").filter(function () {
              var a = $(this).text().indexOf("["),
                 b = $(this).text().indexOf("]"),
                 c = $(this).text().indexOf("[/"),
                 d = $(this).text().indexOf("<"),
                 e = $(this).text().indexOf('"'),
                 f = $(this).text().indexOf("'"),
                 g = $(this).text().indexOf("/");
              return a == -1 || b == -1 || c == -1 || a > b || b > c || d != -1 && d < a || e != -1 && e < a || f != -1 && f < a || g != -1 && g < a
           }).each(function () {
              $(this).wrapInner('<pre class="prettyprint' + ($(this).text().indexOf("<") == -1 && /[\s\S]+{[\s\S]+:[\s\S]+}/.test($(this).text()) ? " lang-css" : "") + ' linenums" />')
           }).length) {
              var s = document.createElement("script");
              s.type = "text/javascript";
              s.async = !0;
              s.src = "http://fmvi-group.googlecode.com/files/fmvi-color-code.js";
              document.getElementsByTagName("head")[0].appendChild(s)
           };
        });

    Lưu ý: Để sử dụng Javascript codes management bạn phải cập nhật Templates: [You must be registered and logged in to see this link.]
    Thêm chức năng Select Content [You must be registered and logged in to see this link.]
    Viết bởi baivong - [You must be registered and logged in to see this link.]

Permissions in this forum:
Bạn không có quyền trả lời bài viết

 
  • Free forum | ©phpBB | Free forum support | Báo cáo lạm dụng | Thảo luận mới nhất
© 2012 Zone-A7
FM PunBB - Rip by Simon