CHINH PHỤC
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.
Đăng nhập

Ghi nhớ
Latest topics
» Tôi sẽ đỗ đại học!
by nightWalker 9/2/2024, 7:00 pm

» Kỷ niệm xưa của chúng ta
by nightWalker 9/2/2024, 6:49 pm

» Bị lệch khung cần người giúp đỡ
by webhuy28 7/10/2021, 10:34 pm

» [HỎI ĐÁP] Danh sách bạn bè không thể hiển thị
by anhdaodaica1 2/10/2021, 10:04 pm

» [HỎI ĐÁP] Thông tin tài khoản không thể lưu thay đổi
by anhdaodaica1 2/10/2021, 6:05 am

» Phim bố già full
by huy.pc52 24/8/2021, 12:20 am

» Xin code Box HTML cho Forumvi
by Larva 1/7/2021, 12:57 pm

» Hello Anh Em Chinh phục
by HoàngTửNaivip5p 28/5/2021, 5:03 am

» Trang chủ tin tức cập nhật HOT 2016
by kenbi05 1/1/2020, 11:02 pm

» Không Dang9 bài viết = hình ảnh được
by huy.pc52 30/11/2019, 10:52 am

» CHÚC ANH EM NĂM MỚI VUI VẺ TRÀNG ĐẦY HẠNH PHÚC
by sps.kủn 12/2/2019, 1:16 pm

» Skin CNTT-K3 2015 (Full Mod)[✔]
by kenbi05 6/7/2018, 12:30 am

» baivong, handsome,....
by sps.kủn 29/6/2018, 1:54 pm

» [SHARE] SKIN ĐHFM.V7 @PUNBB
by tonyhoaivu 2/5/2018, 2:37 pm

» Share Skin Xanh Dương Cùi Bắp
by tonyhoaivu 28/4/2018, 5:57 pm

» Xin Skin http://v1.hotrofm.net/
by tonyhoaivu 28/4/2018, 5:45 pm

» Xin Skin Rao Vặt
by tonyhoaivu 15/4/2018, 12:07 pm

» Làm Sao Để Xóa Khung Này
by tonyhoaivu 14/4/2018, 7:18 pm

» [Lập nhóm]Lập nhóm fm
by vietkanpy 31/3/2018, 11:53 am

» [Help] về server úp ảnh của phutu [✔]
by baivong 17/3/2018, 10:18 pm

» Đừng khóc cho “tôi – Chinh Phục!”…
by AnHung 27/2/2018, 5:33 pm

» [Share] Skin Diendandaihoc.com [ Punbb ] [✔]
by Lu Mờ 13/2/2018, 7:28 pm

» Mời mấy thím vào groups Forumotion Việt Nam.
by dang02315 13/2/2018, 12:40 am

» Có thể làm các kiểu giao diện được không?
by Lu Mờ 9/2/2018, 3:40 pm

» ltns chinhphuc.info
by Shinichi Kudo 27/1/2018, 2:27 am

Top posting users this week
No user


[FMvi.Org] Tô màu cho code với Javascript code prettifier

2 posters

Go down

[FMvi.Org] Tô màu cho code với Javascript code prettifier Empty [FMvi.Org] Tô màu cho code với Javascript code prettifier

Bài gửi by baivong 15/10/2011, 11:23 am

[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this image.]
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.]

Viết bởi baivong - [You must be registered and logged in to see this link.]
baivong
baivong
CPYellowMember
CPYellowMember

Firefox Invision
Ngày đăng ký : 02/04/2010
Số bài : 3114
CPP : 1212
Châm ngôn sống : Sống để được chết một lần.

http://devs.forumvi.com

Về Đầu Trang Go down

[FMvi.Org] Tô màu cho code với Javascript code prettifier Empty Re: [FMvi.Org] Tô màu cho code với Javascript code prettifier

Bài gửi by handsomevip007 15/10/2011, 11:55 am

Nó hỗ trợ những loại code nào huynh kiêu
CSS + HTML có C++, Pascal, bbcode hay cái gì khác ko huynh là sao
handsomevip007
handsomevip007
CPAdministrator
CPAdministrator

Opera Invision
Ngày đăng ký : 22/12/2010
Số bài : 6406
CPP : 11255
Châm ngôn sống : Tuổi trẻ sẽ dừng lại nhưng sáng tạo là mãi mãi ...

http://a14toiyeu.forumvi.net/

Về Đầu Trang Go down

[FMvi.Org] Tô màu cho code với Javascript code prettifier Empty Re: [FMvi.Org] Tô màu cho code với Javascript code prettifier

Bài gửi by baivong 15/10/2011, 12:11 pm

Nghe cao siêu ế, thử là biết ngay mà sợ
baivong
baivong
CPYellowMember
CPYellowMember

Firefox Invision
Ngày đăng ký : 02/04/2010
Số bài : 3114
CPP : 1212
Châm ngôn sống : Sống để được chết một lần.

http://devs.forumvi.com

Về Đầu Trang Go down

[FMvi.Org] Tô màu cho code với Javascript code prettifier Empty Re: [FMvi.Org] Tô màu cho code với Javascript code prettifier

Bài gửi by Sponsored content


Sponsored content


Về Đầu Trang Go down

Về Đầu Trang

- Similar topics

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