1Vit-Vn Post Sun Dec 29, 2013 2:19 pm

Vit-Vn
Vit-Vn
۩•.Ąðmįņ.•۩
  • Xóa bài viết
  • Sửa bài viết
First topic message reminder : 

[Code]zEditor 1.6 45cn


Tác giả: Zero
Quyền lợi: Bạn được quyền sử dụng miễn phí mod nếu bạn coi trọng bản quyền
Phiên bản: 1.6
Phiên bản cũ: [You must be registered and logged in to see this link.]

Chức năng:
- Rất nhẹ (~8kb) và nhanh
- Hiện dưới mỗi bài viết
- Gửi bài, sửa bài, quote bài, xem trước, chọn smiley, và chọn màu không chuyển trang
- Cập nhật bài mới không chuyển trang sau khi gửi và chỉnh sửa
- Viết dành cho punBB, phpBB3, và Invision
- Chỉnh sửa dễ dàng 100% cho giao diện và thành phần
- Những bbcode đang có: Bold, Italic, Underline, Strike, Color, Smilies, Tag
- Không phụ thuộc vào quickreply của SCeditor
- Chỉnh sửa thông tin và buttons dễ dàng

Chức năng cho những phiên bản tiếp theo:
- Hỗ trợ gửi tin nhắn vào inbox và vào wall
- Hỗ trợ nhiều giao diện (người dùng có thể tự cài)
- Thêm bbcode mới

Changelog 

Code:

 ----------------------------- 1.3 --------------------------------CHÍNH: - Thêm hiệu ứng đóng thanh công cụ khi sử dụng preview- Giao diện mới- Thêm bbcode [tag]- BBcode [tag] hoạt động khi sử dụng chức năng preview- Bỏ hỗ trợ nút multi-quote vì không cần thiếtPHỤ:- Thêm hỗ trợ language cho chức năng tag- Thêm một object mới tên lang- Bỏ variable reply_text, edit_text, quote_text, preview_text, reply_button, và loading_text- Nút Preview sẽ chuyển thành Close và thanh toolbar sẽ thu nhỏ khi chức năng preview đang được sử dụng---------------------------- 1.3.1 -------------------------------- Sửa css và js cho phù hợp với chrome- Thêm hàm mới zeditor.preview_close- Sửa lỗi không tự động hiện bài mới trên forum tiếng việt---------------------------- 1.3.2 -------------------------------- Sửa lỗi nút chọn màu chỉ hoạt động cho 1 vài người dùng----------------------------- 1.4 --------------------------------CHÍNH: - Sửa chức năng edit không hoạt động trên 1 vài forum- Thêm chức năng upload- Thêm chức năng advancedPHỤ: - Nâng cấp hàm zeditor.popup- Thêm hàm zeditor.advance----------------------------- 1.5 --------------------------------CHÍNH:- Thêm hex và RGB vào color picker- Thêm chức năng quote có linkPHỤ:- Hàm zeditor.color đượcc sửa thành zeditor.hideColor- Hàm zeditor.load được sửa thành zeditor.edit và zeditor.quote- Thêm hàm zeditor.convertHex, zeditor.convertRHB, zeditor.submitColor, và zeditor.createColor- Sửa lỗi hiện thêm 1 reply button khi gửi bài trong chế độ edit- Sửa lỗi zeditor.close_prieview không hoạt động và được sửa thành zeditor.closePreview- Sửa lỗi cursor không nằm trong textarea khi sử dụng popups----------------------------- 1.6 --------------------------------CHÍNH:- Thêm chức năng gửi pm- Bài mới gửi và chỉnh sửa bài sẽ hiện custom bbcode- Thêm hiệu ứng smooth scroll khi gửi bài- Thêm button ?PHỤ:- Chức năng tag sẽ báo lỗi khi không tìm thấy user- Đưa tất cả variable vào hàm zeditor- Xoá 1 vài variable không sử dụng- Sửa 1 vài chỗ về giao diện- Thêm hàm zeditor.copyright, zeditor.pm, và zeditor.post_pm


Hướng dẫn: 
[1] Tạo 1 js mới, cho cái bên dưới vào, đặt ở In all the topics 

[spoiler]

Code:

var zeditor = {   version: 'punbb', // punbb or phpbb3 or invision   lang: {      reply: "Mode: Reply",      pm: "Mode: Private Message",      edit: "Mode: Edit",      quote: "Mode: Quote",      preview: "Mode: Preview",      loading: "Loading...",      flood_message: "You cannot send 2 posts at the same. Please wait",      error_message: "An unexpected error has occurred. Please refresh the page",      notify_message: "Would you like to notify",      quote_message: "at Post",      tag_message_title: "You've been tagged in",      tag_message_error: "zEditor can\'t find the name of the user whom you want to tag",      pm_message_title: "A message from a topic named",      pm_message_error: "zEditor can't find the name of the user whom you want to send a private message to",      reply_button: "Reply",      pm_button: "PM",      preview_button: "Preview",      advance_button: "Advanced",      close_button: "Close",      bold_button: "Bold",      italic_button: "Italic",      strike_button: "Strike",      underline_button: "Underline",      color_button: "Color",      smiley_button: "Smilies",      upload_button: "Upload",      tag_button: "Tag"   },   editor: 0,   mode: 0,   url: 0,   textarea: 0,   post_dom: 0,   message_dom: 0,   preview_dom: 0,   button_dom: 0,   ready: function () {      zeditor.post_dom = '.post';      if (zeditor.version == 'punbb') {         zeditor.message_dom = '.zeditor-message';         zeditor.preview_dom = '.entry-content';         zeditor.button_dom = '.post-options'      }      if (zeditor.version == 'phpbb3') {         zeditor.preview_dom = zeditor.message_dom = '.content';         zeditor.button_dom = '.profile-icons'      }      if (zeditor.version == 'invision') {         zeditor.preview_dom = zeditor.message_dom = '.post-entry';         zeditor.button_dom = '.posting-icons'      }      $('.h3:contains("Quick reply:")').remove();      zeditor.textarea = document.getElementById('editor-textarea');      zeditor.mode = document.getElementById('editor-mode');      zeditor.editor = document.getElementById('ze-editor');      zeditor.button(zeditor.button_dom);      for (var a = $(zeditor.message_dom), i = 0, l = a.length; i < l; i++) {         a[i].innerHTML = zeditor.replace(a[i].innerHTML)      }   },   quote: function (a) {      zeditor.loading('on');      zeditor.url = $('a[href^="/post?t="]').first().attr("href");      $('#ze-edit').load(a.href + ' #text_editor_textarea', function () {         zeditor.textarea.value = document.getElementById('ze-edit').firstChild.value.replace(/]/, '][link="' + location.pathname + '#' + a.href.match(/[0-9]+/) + '"]');         zeditor.textarea.focus();         zeditor.loading('off')      });   },   edit: function (a) {      zeditor.loading('on');      zeditor.url = a.href;      $('#ze-edit').load(a.href + ' #text_editor_textarea', function () {         zeditor.textarea.value = document.getElementById('ze-edit').firstChild.value;         zeditor.textarea.focus();         zeditor.loading('off')      });   },   button: function (where) {      $(where).each(function () {         $(this).find('a[href*="quote"]').attr('onclick', 'zeditor.start(\'quote\', this); return false').before('<a class="pbutton" href="#reply" onclick="zeditor.start(\'reply\', this)">' + zeditor.lang.reply_button + '</a><a class="pbutton" href="#pm" onclick="zeditor.start(\'pm\', this)">' + zeditor.lang.pm_button + '</a>');         $(this).find('a[href*="editpost"]').attr('onclick', 'zeditor.start(\'edit\', this); return false')      });   },   start: function (a, dom) {      $(zeditor.editor).appendTo($(dom).parents(zeditor.post_dom).find('.zeditor'));      zeditor.editor.style.display = 'block';      switch (a) {      case "reply":         zeditor.url = $('a[href^="/post?t="]').first().attr("href");         zeditor.mode.innerHTML = zeditor.lang.reply;         break;      case "quote":         zeditor.quote(dom);         zeditor.mode.innerHTML = zeditor.lang.quote;         break;      case "edit":         zeditor.edit(dom);         zeditor.mode.innerHTML = zeditor.lang.edit;         break;      case "pm":         zeditor.url = !1;         zeditor.mode.innerHTML = zeditor.lang.pm;         break;      }   },   add: function (x, y) {      zeditor.textarea.focus();      if (typeof (zeditor.textarea) != "undefined") {         var longueur = parseInt(zeditor.textarea.value.length);         var selStart = zeditor.textarea.selectionStart;         var selEnd = zeditor.textarea.selectionEnd;         zeditor.textarea.value = zeditor.textarea.value.substring(0, selStart) + x + zeditor.textarea.value.substring(selStart, selEnd) + y + zeditor.textarea.value.substring(selEnd, longueur)      } else zeditor.textarea.value += x + y;      zeditor.textarea.focus()   },   preview: function (a) {      preview = document.getElementById('ze-preview');      if (preview.style.display == 'block') {         preview.style.display = 'none';         document.getElementById('editor-top').setAttribute('style', 'height:38px; transform: scaleY(1);-webkit-transform: scaleY(1)');         a.innerHTML = zeditor.lang.preview_button      } else {         a.innerHTML = zeditor.lang.close_button;         document.getElementById('editor-top').setAttribute('style', 'height:3px; transform: scaleY(0);-webkit-transform: scaleY(0)');         $.post(zeditor.url, {            "message": zeditor.textarea.value,            "preview": "Preview",         }, function (data) {            preview.style.display = 'block';            preview.innerHTML = zeditor.replace($(data).find(zeditor.preview_dom).html())         })      }   },   closePreview: function (a) {      $(a).hide();      document.getElementById('editor-preview-button').innerHTML = zeditor.lang.preview_button;      document.getElementById('editor-top').setAttribute('style', 'height:38px; transform: scaleY(1);-webkit-transform:scaleY(1)');   },   post: function (a) {      if (zeditor.url) {         $.post(zeditor.url, {            'post': 'Send',            'message': zeditor.textarea.value         }, function (data) {            var en = "Your message has been entered successfully";            vi = "Bài của bạn đã được chuyển";            b = (data.indexOf(en) < 0) ? vi : en;            index = data.indexOf(b);            if (data.indexOf("Flood control") > 0) {               alert(zeditor.lang.flood_message)            } else if (data.indexOf('A new message') > 0) {               $.post('/post', $(data).find("form[name='post']").serialize() + '&post=1', function (c) {                  (index < 0) ? alert(zeditor.lang.error_message) : zeditor.newPost($(c).find('p:contains("' + b + '") a:first').attr('href'))               })            } else {               (index < 0) ? alert(zeditor.lang.error_message) : zeditor.newPost($(data).find('p:contains("' + b + '") a:first').attr('href'))            }         })      } else {         zeditor.pm(a)      }   },   newPost: function (a) {      var b = a.split('#')[1];      zeditor.editor.style.display = 'none';      if (zeditor.mode.innerHTML == zeditor.lang.reply || zeditor.mode.innerHTML == zeditor.lang.quote) {         $.get(a, function (data) {            $('<div class="zeditor-new">' + zeditor.replace($(data).find("#p" + b).html()) + '</div>').insertAfter(zeditor.post_dom + ':last');            zeditor.button('.zeditor-new ' + zeditor.button_dom + ':last');            $('html,body').animate({               scrollTop: $('.zeditor-new:last').offset().top            }, 600);         });      }      if (zeditor.mode.innerHTML == zeditor.lang.edit) {         dom = $(zeditor.editor).parents(zeditor.post_dom).find(zeditor.message_dom);         $.get(a, function (data) {            $(dom).html(zeditor.replace($(data).find('#p' + b + ' ' + zeditor.message_dom).html()));            $(dom).hide().fadeIn('slow');            zeditor.button('.zeditor-new ' + zeditor.button_dom + ':last')         })      }      zeditor.textarea.value = '';   },   popup: function (a, b) {      $('#' + b).siblings().hide();      $('#' + b).toggle();      zeditor.textarea.focus();      y = document.getElementById('editor-button-active');      y == null ? (a.id = 'editor-button-active') : ($('.editor-button-outer').removeAttr('id'), (a.id = 'editor-button-active') ? (a.removeAttribute('id')) : (a.id = 'editor-button-active'));      switch (b) {      case "ze-color":         zeditor.createColor();         break;      case "ze-smiley":         smiley = document.getElementById('ze-smiley');         if (smiley.innerHTML == '') {            $(smiley).load('/smilies.forum?mode=smilies_frame', function () {               this.innerHTML = this.innerHTML.replace(/alt=\"(.*?)\"/g, 'onclick="zeditor.smiley(\'$1\')"')            })         }         break;      }   },   createColor: function () {      if (!document.getElementById('ze-color-inner')) {         var c = '<table cellspacing="0" id="ze-color-inner">';         var colors = new Array('00', '33', '66', '99', 'CC', 'FF');         for (i = 5; i >= 0; i--) {            c = c + '<tr>';            for (j = 5; j >= 0; j--) {               for (k = 5; k >= 0; k--) {                  var col = colors[j] + colors[i] + colors[k];                  c = c + '<td style="background: #' + col + '" title="#' + col + '"><div style="background:#' + col + '" onclick="zeditor.add(\'[color=#' + col + ']\', \'[/color]\');zeditor.hideColor()"></div></td>'               }            }            c = c + '</tr>'         }         document.getElementById('ze-color').innerHTML = c + '</table><div id="ze-color-info"><div class="ze-color-input"><div>#</div><input id="ze-color-hex" maxlength="6" onkeypress="zeditor.convertHex(this)" placeholder="000000"></div><div class="ze-color-input"><div>R</div><input id="ze-color-r" maxlength="3" onkeypress="zeditor.convertRGB()" placeholder="000"></div><div class="ze-color-input"><div>G</div><input id="ze-color-g" maxlength="3" onkeypress="zeditor.convertRGB()" placeholder="000"></div><div class="ze-color-input"><div>B</div><input id="ze-color-b" maxlength="3" onkeypress="zeditor.convertRGB()" placeholder="000"></div><div id="ze-color-submit" onclick="zeditor.submitColor()">OK</div></div>';      }   },   hideColor: function () {      document.getElementById('ze-color').setAttribute('style', 'display:none')   },   submitColor: function () {      if (document.getElementById('ze-color-hex').value !== '') {         zeditor.add('[color=#' + document.getElementById('ze-color-hex').value + ']', '[/color]');      } else {         zeditor.add('[color=#000000]', '[/color]');      }      zeditor.hideColor();   },   convertHex: function (a) {      var a = a.value,         result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);      result ? (document.getElementById('ze-color-r').value = parseInt(result[1], 16), document.getElementById('ze-color-g').value = parseInt(result[2], 16), document.getElementById('ze-color-b').value = parseInt(result[3], 16)) : null   },   convertRGB: function () {      var r = document.getElementById('ze-color-r').value,         g = document.getElementById('ze-color-g').value,         b = document.getElementById('ze-color-b').value,         rgb = b | (g << 8) | (r << 16);      document.getElementById('ze-color-hex').value = (0x1000000 + rgb).toString(16).slice(1);   },   smiley: function (a) {      zeditor.textarea.value += a;      zeditor.textarea.focus();      document.getElementById('ze-smiley').style.display = 'none'   },   tag: function (a) {      var e = $(a).parents(zeditor.post_dom).find('a[href^="/u"]').eq(1).text();      zeditor.textarea.value += '[tag]' + e + '[/tag]';      if (e.length > 0) {         if (confirm(zeditor.lang.notify_message + ' ' + e + '?')) {            zeditor.post_pm(e, zeditor.lang.tag_message_title + ' "' + document.title + '"', zeditor.textarea.value);         }      } else {         alert(zeditor.lang.tag_message_error)      }   },   pm: function (a) {      var e = $(a).parents(zeditor.post_dom).find('a[href^="/u"]').eq(1).text();      if (e.length > 0) {         zeditor.post_pm(e, zeditor.lang.pm_message_title + ' "' + document.title + '"', zeditor.textarea.value);      } else {         alert(zeditor.lang.pm_message_error)      }      zeditor.textarea.value = '';   },   post_pm: function (name, subject, message) {      $.post('/privmsg?mode=post&post=1', {         'username[]': name,         'subject': subject,         'message': message,         'post': 'Send',         'folder': 'inbox'      }, function () {         alert('Sent');      });   },   replace: function (a) {      return a.replace(/\[tag\](.*?)\[\/tag\]/g, function (a, b) {         return '<a href="/profile?mode=viewprofile&u=' + b.replace(/ /g, "+") + '">@' + b + '</a>'      }).replace(/:<\/cite>\[link="(\S+)"\]/gi, function (a, b) {         return ' ' + zeditor.lang.quote_message + ' <a href="' + b + '"> ' + b.split("#")[1] + '</a></cite>'      })   },   copyright: function () {      if (confirm("zEditor 1.6 by Zero. Click OK to visit my thread for updates\nzEditor 1.6 bởi Zero. Bấm OK để xem thêm thông tin")) {         window.open('http://devs.forumvi.com/t88-topic');      }   },   loading: function (a) {      b = document.getElementById('editor-loading');      a == 'on' ? (b.style.display = '') : (b.style.display = 'none')   },   advance: function () {      location.href = $('a[href^="/post?t="]').first().attr("href");   }};document.write('<div id="ze-editor" style="display:none"><div id="ze-edit" style="display:none"></div><form id="ze-editor-form" name="ze-editor" method="post" action="/post"><div id="editor-top"><div id="editor-tool"><span onclick="zeditor.add(\'[b]\',\'[/b]\')" class="editor-button-outer">' + zeditor.lang.bold_button + '</span><span onclick="zeditor.add(\'[i]\',\'[/i]\')"  class="editor-button-outer">' + zeditor.lang.italic_button + '</span><span onclick="zeditor.add(\'[u]\',\'[/u]\')"  class="editor-button-outer">' + zeditor.lang.underline_button + '</span><span onclick="zeditor.add(\'[strike]\',\'[/strike]\')"  class="editor-button-outer">' + zeditor.lang.strike_button + '</span><span class="editor-button-outer" onclick="zeditor.popup(this, \'ze-color\')">' + zeditor.lang.color_button + '</span><span class="editor-button-outer" onclick="zeditor.popup(this, \'ze-smiley\')">' + zeditor.lang.smiley_button + '</span><span class="editor-button-outer" onclick="zeditor.popup(this, \'ze-upload\')">' + zeditor.lang.upload_button + '</span><span class="editor-button-outer" onclick="zeditor.tag(this)">' + zeditor.lang.tag_button + '</span><span class="editor-button-outer" onclick="zeditor.copyright()">?</span></div></div><div id="ze-popups"><div id="ze-color"></div><div id="ze-smiley"></div><div id="ze-upload"><iframe src="http://imageshack.us/syndicate/widget.php" frameborder="0" scrolling="no"></iframe></div></div><div id="outer-preview"><div id="ze-preview" ondblclick="zeditor.closePreview(this)"></div><div id="editor-loading" style="display: none"><img src="http://i11.servimg.com/u/f11/16/80/27/29/ajax-l10.gif" /><br>' + zeditor.lang.loading + '</div><textarea name="message" id="editor-textarea"></textarea></div><div id="editor-data"><input type="hidden" value="reply" name="mode"><input type="hidden" value="1" name="notify"></div><div id="editor-post-tool"><div id="editor-post-button"><span  id="editor-send-button" onclick="zeditor.post(this)">Send</span><span onclick="zeditor.preview(this)" id="editor-preview-button">' + zeditor.lang.preview_button + '</span><span onclick="zeditor.advance()">' + zeditor.lang.advance_button + '</span></div><div id="editor-mode"></div></div></form></div>');$(function () {   zeditor.ready()});

https://choivnz.forumvi.com

2Vit-Vn Post Sun Dec 29, 2013 2:20 pm

Vit-Vn
Vit-Vn
۩•.Ąðmįņ.•۩
  • Xóa bài viết
  • Sửa bài viết
[2] Script ở trên mới cho vào, tìm chỗ version = 'punbb';, đổi punbb thành phiên bản forum bạn đang xài
[3] Vào CSS, cho cái bên dưới vào, Optimize your CSS: No (Không) 

Code:

 /* ---------------zEditor-------------------- */#ze-color-info, #ze-editor {    -moz-user-select: none;    -webkit-user-select: none;} #ze-editor {    background: linear-gradient(#F5F5F5, #CFD1CF);    border: 1px solid #B6B6B6;    border-radius: 5px;    box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);    font-family: Verdana;    margin: 20px auto;    padding: 5px 10px;    width: 65%;} #editor-top {    height: 38px;    display: inline-block;    position: relative;    transition: 1s;    margin-top: 4px;    width: 100%;} #outer-preview {    position: relative;    height: 200px;    width: 100%;} #editor-mode, #editor-post-button {    display: inline-block;} #editor-mode {    float: right;    font-weight: bold;    color: #4C4C4C;    text-shadow: 0 1px 0 #FFFFFF;    line-height: 28px    } #ze-preview {    background-color: #F8F8F8;    border: 1px solid #CCCCCC;    cursor: pointer;    height: 100%;    overflow: auto;    padding: 0 4px;    position: absolute;    width: calc(100% - 8px);    z-index: 9;    display: none;} #editor-post-tool {    margin-top: 10px;} #editor-textarea {    border: 1px solid #B6B6B6;    height: 100%;    position: relative;    resize: none;    width: 100%;} .editor-button {    margin-top: 1px;    display: block;} #ze-smiley, #ze-color, #ze-upload {    background-color: #F7F7F7;    border: 1px solid #CCCCCC;    margin: 25px 0 0 20px;    max-height: 125px;    max-width: 500px;    padding: 10px;    position: absolute;    z-index: 999;  display: none;}#ze-smiley {  overflow: auto} #ze-smiley {    margin-left: 130px;} #ze-color-info {    margin-top: 10px}#ze-color-inner div {    height: 12px;    width: 12px;    cursor: pointer;}.ze-color-input, #ze-color-submit {    background: 0 0 #F3F3F3;    border: 1px solid #BDBDBD;    border-radius: 3px;    color: #B8B8B8;    font-size: 12px;    height: 20px;    margin-right: 10px;    position: relative;    width: 60px;    float: left;    text-transform: uppercase;}#ze-color-submit {    float: right;    text-align: center;    color: #000;    cursor: pointer}.ze-color-input input {    border: medium none;    color: #555555;    font-family: Arial,Helvetica,sans-serif;    font-size: 12px;    height: 20px;    line-height: 20px;    outline: medium none;    text-align: right;    width: 43px;    right: 0;    position: absolute}.ze-color-input div {    background: #EFEFEF;    border-right: 1px solid #BDBDBD;    color: #777777;    font-weight: bold;    height: 20px;    line-height: 20px;    padding-left: 4px;    position: absolute;    width: 12px;    left: 0}.editor-button-outer, #editor-post-button span {    background: linear-gradient(#FFFFFF, #E4E4E4);    border: 1px solid #A6A6A6;    border-radius: 4px;    box-shadow: 0 10px 15px #FFFFFF inset;    color: #504F4F !important;    cursor: pointer;    display: block;    float: left;    margin: 4px;    padding: 4px;    text-shadow: 0 2px 0 #E9E9E9;} .editor-button-outer:hover, #editor-post-button span:hover {    background: -moz-linear-gradient(center top , #F2F2F2, #CCCCCC) repeat scroll 0 0 #CCCCCC;    box-shadow: 0 0 1px rgba(0, 0, 0, 0.3) inset;} #quick_reply {    display: none !important;} #editor-loading {    background: #DCE1DE;    border-radius: 4px;    color: #FFFFFF;    font-weight: bold;    left: 50%;    margin-left: -40px;    margin-top: 50px;    padding: 5px 15px;    position: absolute;    text-align: center;    text-shadow: -1px -1px 0 #B6B6B6, 1px -1px 0 #B6B6B6, -1px 1px 0 #B6B6B6, 1px 1px 0 #B6B6B6;    z-index: 10;    border: 1px solid #B6B6B6;}

https://choivnz.forumvi.com

3Vit-Vn Post Sun Dec 29, 2013 2:21 pm

Vit-Vn
Vit-Vn
۩•.Ąðmįņ.•۩
  • Xóa bài viết
  • Sửa bài viết
[4] Thế là xong cho invision và phpbb, ai dùng punbb thì xem thêm bên dưới để chỉnh sửa template
Lưu ý: Tất cả những hướng dẫn dành cho punbb ở dưới được dựa vào template mặc định của punbb. Mấy bạn nên backup viewtopic_body trước khi thực hiện.
[5.0] Vào viewtopic_body tìm {postrow.displayed.MESSAGE}, thay thành 

Code:

<span class="zeditor-message"><span>{postrow.displayed.MESSAGE}</span></span>

[5.1] Tìm tiếp <!-- BEGIN displayed -->, bên dưới có 1 dòng như thế này <div class="post post--{postrow.displayed.U_POST_ID}"{postrow.displayed.THANK_BGCOLOR} style="{postrow.displayed.DISPLAYABLE_STATE}">, thay thành 

Code:



[color=#1e347b][font=monospace, serif]<div[/font][/color][color=#48484c][font=monospace, serif] [/font][/color][color=teal][font=monospace, serif]class[/font][/color][color=#93a1a1][font=monospace, serif]=[/font][/color][color=#dd1144][font=monospace, serif]"post post--{postrow.displayed.U_POST_ID}"[/font][/color][color=#48484c][font=monospace, serif]{[/font][/color][color=teal][font=monospace, serif]postrow[/font][/color][color=#48484c][font=monospace, serif].[/font][/color][color=teal][font=monospace, serif]displayed[/font][/color][color=#48484c][font=monospace, serif].[/font][/color][color=teal][font=monospace, serif]THANK_BGCOLOR[/font][/color][color=#48484c][font=monospace, serif]} [/font][/color][color=teal][font=monospace, serif]style[/font][/color][color=#93a1a1][font=monospace, serif]=[/font][/color][color=#dd1144][font=monospace, serif]"[/font][/color][color=#93a1a1][font=monospace, serif]{[/font][/color][color=#48484c][font=monospace, serif]postrow[/font][/color][color=#93a1a1][font=monospace, serif].[/font][/color][color=#48484c][font=monospace, serif]displayed[/font][/color][color=#93a1a1][font=monospace, serif].[/font][/color][color=#48484c][font=monospace, serif]DISPLAYABLE_STATE[/font][/color][color=#93a1a1][font=monospace, serif]}[/font][/color][color=#dd1144][font=monospace, serif]"[/font][/color][color=#48484c][font=monospace, serif] [/font][/color][color=teal][font=monospace, serif]id[/font][/color][color=#93a1a1][font=monospace, serif]=[/font][/color][color=#dd1144][font=monospace, serif]"p{postrow.displayed.U_POST_ID}"[/font][/color][color=#1e347b][font=monospace, serif]>[/font][/color]


[5.2] Nếu không có dòng đó thì bạn tìm cái thành phần đầu tiên của 1 post (của mình là <div class="post"), rồi thêm id="p{postrow.displayed.U_POST_ID}" vào thành phần đó, rồi cho dòng này id="p{postrow.displayed.U_POST_ID}" vào khung search. Search nếu ra kết quả nhiều hơn 1 thì xoá mấy cái dư dư (trong template mặc định nó nằm trong<div class="posthead"{postrow.displayed.THANK_BGCOLOR} và trong <a name="{postrow.displayed.U_POST_ID}")
[5.3] Tìm <!-- BEGIN switch_signature -->, trên dòng đó có dòng </div>, cho code dưới đây ở trên dòng đó 

Code:

<div class="zeditor"></div>


[5.4] Dòng code ở trên là định hướng nơi editor sẽ hiện ra, mấy bạn thích bỏ ở đâu thì bỏ. Mình thích nó nằm dưới nội dung bài viết nên mình cho nó nằm dưới thành phần <div class="post-entry">
[5.5] Đảm bảo mấy buttons của bài viết ({postrow.displayed.THANK_IMG} {postrow.displayed.MULTIQUOTE_IMG} {postrow.displayed.QUOTE_IMG} {postrow.displayed.EDIT_IMG} {postrow.displayed.DELETE_IMG} {postrow.displayed.IP_IMG} {postrow.displayed.REPORT_IMG}) nằm trong <div class="post-options"

TIP:
lang chứa những từ được sử dụng trong zeditor, bạn chỉ cần đổi giá trị của nó thành từ mà bạn muốn hoặc ảnh. Ví dụ, mình muốn đổi nút Smilies thành nút có ảnh vá có tên "Hình vui" thì mình sẽ đổi smiley_button: "Smilies"; thành smiley_button: "<img src='https://2img.net/i/fa/i/smiles/icon_biggrin.png' title='Hình vui' />";

https://choivnz.forumvi.com

4Sponsored content Post


Sponsored content
  • Xóa bài viết
  • Sửa bài viết

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

Diễn đàn được tối ưu cho trình duyệt: