CoiThienThai.com - The Largest Vietnamese Entertainment Network

Buy Sex Toy Sex! Do choi danh cho nguoi lon! Click here!

Xem phim phá trinh! Hấp dẫn tuyệt vời - Click here!

Bạn đã có bảo hiểm nhân thọ (life insurance) chưa? www.HaPhanInsurance.com !

ThanhHaFlower.com - Mua hoa, gửi quà về Việt Nam ! Giá rẻ nhất!

Official websites: www.CoiThienThai.com || www.CoiThienThai.net

GÂY QUỸ CÕI THIÊN THAI - MEMBERS V.I.P Đăng ký thành viên: Members Log in || » Members Sign up « || » Cancel Membership «

Bạn có biết ? CõiThiênThai.com là nơi phổ biến Truyện Người Lớn miễn phí đầu tiên? CõiThiênThai.com có kho tàng truyện người lớn lớn nhất?

  • facebook
  • google plus
  • twitter
  • youtube
  • linkedin
Page 1 of 3 123 LastLast
Results 1 to 10 of 30
  1. #1

    Default Nên là thêm bộ gõ vietuni

    Các bác admin ơi, theo em các bác nên cài thêm bộ gõ vietuni cho forum để bà con vào viết cho tiện.
    Chứ em thấy bà con mình ngại bật vietkey (hoặc là ko biết dùng), cứ viết ko dấu với VIQR khó đọc lắm.

  2. #2

    Default

    Let's sometimes to improve this board . We will put the Unicode into forum format .

    DrHate,

  3. #3

    Default

    U*`a

    He^'t nhe't ....... Unicode dzo^ .... dda^y dda^'y ho*?
    I Thought I Saw A Pussy...Cat

  4. #4
    Join Date
    Mar 2003
    Location
    Viet Nam
    Posts
    5

    Default

    Tui thay xai VietUni tien hon a' . Co luon bo go len forum .
    http://www.host-vn.com/forums/vietuni.js <--- VietUni moi nhat tui da edit 1 so thu de ca`i dat de da`ng .
    Chi ga`n 1 doan code goi. file do' ra o? header va` 1 doan code o? body la` co bo go cho toa`n forum , ho tro 3 kieu go Telex , VNI va` VIQR.
    Dac biet luu cookie cua bo go luon de do~ phai cho.n lai kieu go~ la`n sau.

  5. #5
    Join Date
    Mar 2003
    Location
    Cõi Thiên Thai
    Posts
    19,302

    Default Công tử chưa biết set up kiểu này

    Hi Ryu ơi, Công tử chưa biết set up kiểu này!

    Mến,
    Công tử

    Em nào chồng bỏ, chồng chê
    Anh dzớt 1 quẻ, chồng mê.. ụa lộn ... em mê tới già

  6. #6

    Default

    Hà, cái này cài dễ thôi mà CT:
    Thế này nhé:
    Đầu tiên CT down cái file vietuni mà Ryu giới thiệu về. Up lên host (đâu đó cũng được)
    Rồi vô forum này là theo hướng dẫn sau ha:
    Code:
    ############################################### 
    # 
    # Mở file \templates\subSilver\posting_body.tpl để nhúng bộ gỏ vào cửa sổ soạn thảo thông điệp 
    # 
    ############################################## 
    # 
    # Để gõ được tiếng Việt trong phần Tiêu đề. Tìm đến 
    # 
    
    <input type="text" name="subject" size="45" maxlength="60" style="width&#58;450px" tabindex="2" class="post" value="&#123;SUBJECT&#125;" /> 
    
    # Thay bằng 
    
    <input type="text" name="subject" size="45" maxlength="60" style="width&#58;450px" tabindex="2" class="post" value="&#123;SUBJECT&#125;" onkeyup="initTyper&#40;this&#41;;" /> 
    
    # 
    # Để gõ được tiếng Việt trong phần Nội dung. Tìm đến 
    # 
    
    <textarea name="message" rows="15" cols="35" wrap="virtual" style="width&#58;450px" tabindex="3" class="post" onselect="storeCaret&#40;this&#41;;" onclick="storeCaret&#40;this&#41;;" onkeyup="storeCaret&#40;this&#41;;">&#123;MESSAGE&#125;</textarea> 
    
    # Thay bằng 
    
    <script language="JavaScript1.2" src="vietuni.js" type='text/javascript'></script> 
    <textarea name="message" rows="15" cols="35" wrap="virtual" style="width&#58;450px" tabindex="3" class="post" onselect="storeCaret&#40;this&#41;;" onclick="storeCaret&#40;this&#41;;" onkeyup="initTyper&#40;this&#41;;">&#123;MESSAGE&#125;</textarea> 
    
     
    <input type=radio name="switcher" value="OFF" checked onfocus="setTypingMode&#40;0&#41;"> Tắt bộ g& 
    <input type=radio name="switcher" value="TELEX" onfocus="setTypingMode&#40;1&#41;"> Telex 
    <input type=radio name="switcher" value="VNI" onfocus="setTypingMode&#40;2&#41;"> VNI 
    <input type=radio name="switcher" value="VIQR" onfocus="setTypingMode&#40;3&#41;"> VIQR 
    <input type=radio name="switcher" value="ALL" onfocus="setTypingMode&#40;4&#41;"> Tuỳ & &#40;cả 3 kiểu&#41; 
    
     
    <span class="gensmall">Ch& &&#58;
    * Diễn đ&n sử dụng bộ g& VietUni v1.618 của [email protected] cho tất cả c&c mục, nếu chạy tr&nh g& ri&ng của m&y phải tắt bộ g& nầy &#40;mặc định&#41;.</span> 
    
    # Lưu file 
    ############################################### 
    
    ############################################### 
    # 
    # Mở file \templates\subSilver\posting_poll_body.tpl để nhúng bộ gõ vào Bảng bầu chọn 
    # 
    ############################################### 
    # 
    # Tìm đến 
    # 
    
    <input type="text" name="poll_title" size="50" maxlength="255" class="post" value="&#123;POLL_TITLE&#125;" /> 
    
    # Thay bằng 
    
    <script language="JavaScript1.2" src="vietuni.js" type='text/javascript'></script> 
    <input type="text" name="poll_title" size="50" maxlength="255" class="post" onkeyup="initTyper&#40;this&#41;;" value="&#123;POLL_TITLE&#125;" /> 
    
    # 
    # Tìm đến 
    # 
    
    <input type="text" name="poll_option_text&#91;&#123;poll_option_rows.S_POLL_OPTION_NUM&#125;&#93;" size="50" class="post" maxlength="255" value="&#123;poll_option_rows.POLL_OPTION&#125;" /> 
    
    # Thay bằng 
    
    <input type="text" name="poll_option_text&#91;&#123;poll_option_rows.S_POLL_OPTION_NUM&#125;&#93;" size="50" class="post" maxlength="255" value="&#123;poll_option_rows.POLL_OPTION&#125;" onkeyup="initTyper&#40;this&#41;;" /> 
    
    # 
    # Tìm đến 
    # 
    
    <input type="text" name="add_poll_option_text" size="50" maxlength="255" class="post" value="&#123;ADD_POLL_OPTION&#125;" /> 
    
    # Thay bằng 
    
    <input type="text" name="add_poll_option_text" size="50" maxlength="255" class="post" value="&#123;ADD_POLL_OPTION&#125;" onkeyup="initTyper&#40;this&#41;;" /> 
    
    # Lưu file 
    # 
    # Cập nhật cả 2 file lên server 
    ###############################################
    Bác chú đoạn
    Code:
    src="vietuni.js"
    , thay băng đường dẫn đến file vietuni.js của mình!
    Tuy nhiên thì cài nái này xong, nó sẽ gặp một số lỗi tranh chấp với Emoticons, nên cần hack thêm đoạn fix này nữa:

    Code:
    Mở file &#58; posting_body.tpl  &#40;cũng làm tương tự với posting_smilies.tpl &#41;
    # 
    #--------tìm------------- 
    # 
    
    function emoticon&#40;text&#41; 
    &#123; 
       text = ' ' + text + ' '; 
       if &#40;document.post.message.createTextRange && document.post.message.caretPos&#41; 
       &#123; 
          var caretPos = document.post.message.caretPos; 
          caretPos.text = caretPos.text.charAt&#40;caretPos.text.length - 1&#41; == ' ' ? text + ' ' &#58; text; 
          document.post.message.focus&#40;&#41;; 
       &#125; 
       else 
       &#123; 
       document.post.message.value  += text; 
       document.post.message.focus&#40;&#41;; 
       &#125; 
    &#125; 
    
    # 
    #-------Thay bằng------------ 
    # 
    
    function emoticon&#40;text&#41; 
    &#123; 
       text = ' ' + text + ' '; 
    //   if &#40;document.post.message.createTextRange && document.post.message.caretPos&#41; 
    //   &#123; 
    //      var caretPos = document.post.message.caretPos; 
    //      caretPos.text = caretPos.text.charAt&#40;caretPos.text.length - 1&#41; == ' ' ? text + ' ' &#58; text; 
    //      document.post.message.focus&#40;&#41;; 
    //   &#125; 
    //   else 
       &#123; 
       document.post.message.value  += text; 
       document.post.message.focus&#40;&#41;; 
       &#125; 
    &#125; 
    
    # 
    #--------Lưu file--------- 
    #
    Cái đoạn code này em lấy ở trang www.ktlehoan.com, bác CT có thể vô đó tìm thêm các MOD bổ sung về làmcho forum mình.

  7. #7

    Default

    theo tui thi` tam thoi cu go khong dau di, va` KHONG CHAP NHAN BO GO VIQR NUA, boi vi no cuc ky` kho doc.
    Jay_the_sniper,
    One shot, one kill...

  8. #8

    Default Good idea

    Dear Calvin,
    If possible please try to have uicode keyboard is installed in the forum, which will help members to post in Vietnamese easier. Thanks in advance.

  9. #9
    Join Date
    Mar 2003
    Location
    Viet Nam
    Posts
    5

    Default Re: Công tử chưa biết set up kiểu này

    Quote Originally Posted by Congtu
    Hi Ryu ơi, Công tử chưa biết set up kiểu này!

    Mến,
    Công tử
    -----------------------------
    VietUni.js
    -----------------------------
    Code:
    /*vietuni.js - V.1.618 - R.11.11.01 @QDJTGSLLA@P*Veni*Vidi*Vici*
    * by Tran Anh Tuan &#91;[email protected]&#93;
    * Copyright &#40;c&#41; 2001, 2002 AVYS e.V.. All Rights Reserved.
    *
    * Originally published and documented at http&#58;//www.avys.de/
    * You may use this code without fee on noncommercial web sites.
    * You may NOT alter the code and then call it another name and/or resell it.
    * The copyright notice must remain intact on srcipts.
    */
    /*Under prior consent of TRAN Anh Tuan, this copy of VietUni has been modified
    **by NGUYEN Ba Thanh &#91;[email protected]&#93; for use with DDTHForum&#58;&#58;TreXanhBB.
    **This modification of VietUni must be distibuted with DDTHForum&#58;&#58;TreXanhBB ONLY
    **Other uses of *this* modified VietUni outside DDTHForum&#58;&#58;TreXanhBB must have
    **permissions both from TRAN Anh Tuan &#40;yes, to use VietUni&#41;
    **and NGUYEN Ba Thanh &#40;to use the modifications&#41;.
    **
    */
    var timing = new Date&#40;&#41;; _startTime = timing.getTime&#40;&#41;;
    var supported = &#40;document.all || document.getElementById&#41;;
    var disabled = false;
    var charmapid = 1;
    var keymodeid = 0;
    var linebreak = 0;
    var theTyper = null;
    
    reset = function&#40;&#41;&#123;&#125;
    initTyper = telexingVietUC;
    
    function _displayKeymodeInfo&#40;&#41; &#123;
    	var keymode = 'Off';
    	switch &#40;keymodeid&#41; &#123;
    		case 1&#58; keymode = 'Telex'; break;
    		case 2&#58; keymode = 'VNI'; break;
    		case 3&#58; keymode = 'VIQR'; break;
    	&#125;
    	window.status = 'Nhan F9 de doi kieu go tieng Viet! Kieu go hien tai&#58; ' + keymode;
    &#125;
    
    function _switchKeymode&#40;&#41; &#123;
    	setTypingMode&#40;&#40;keymodeid+1&#41;%4&#41;;
    &#125;
    
    function setTypingMode&#40;mode&#41; &#123;
      keymodeid = mode;
      if &#40;theTyper&#41; theTyper.keymode= initKeys&#40;&#41;;
      if &#40;!supported && !disabled&#41; &#123;
        alert&#40;"Xin loi, trinh duyet web cua ban khong cho phep dung VietTyping.\n"&#41;;
        disabled = true;
      &#125;
      	_displayKeymodeInfo&#40;&#41;;
    	var e = new Date&#40;&#41;; e.setTime&#40;e.getTime&#40;&#41; + 24*3600*1000*365&#41;;
    	ddth_SetCookie&#40;ddth_vCOOKIE_PREFIX+'_VK', keymodeid, e&#41;;
    &#125;
    
    initCharMap = function&#40;&#41; &#123; return new CVietUniCodeMap&#40;&#41;; &#125;
    
    initKeys = function&#40;&#41; &#123;
      switch &#40;keymodeid&#41; &#123;
        case 1&#58; return new CTelexKeys&#40;&#41;;
        case 2&#58; return new CVniKeys&#40;&#41;;
        case 3&#58; return new CViqrKeys&#40;&#41;;
        case 4&#58; return new CAllKeys&#40;&#41;;
        default&#58; return new CVKOff&#40;&#41;;
      &#125;
    &#125;
    
    function telexingVietUC &#40;txtarea&#41; &#123;
      txtarea.vietarea= true;
      txtarea.onkeyup= null;
      if &#40;!supported&#41; return;
      txtarea.onkeypress= vietTyping;
      txtarea.getCurrentWord= getCurrentWord;
      txtarea.replaceWord= replaceWord;
      txtarea.onkeydown= onKeyDown;
      txtarea.onmousedown= onMouseDown;
      if&#40;!theTyper&#41; theTyper = new CVietString&#40;""&#41;;
    &#125;
    
    function getEvt&#40;evt, external&#41; &#123;
      if &#40;external&#41; return external.event.keyCode;
      if &#40;typeof&#40;evt&#41;=='string'&#41; return evt.charCodeAt&#40;0&#41;;
      return document.all? event.keyCode&#58; &#40;evt && evt.which&#41;? evt.which&#58; 0;
    &#125;
    
    function onKeyDown&#40;evt&#41; &#123;
      var c= getEvt&#40;evt, this.win&#41;;
      if &#40;&#40;c==10&#41; || &#40;c==13&#41;&#41; &#123; 
    	reset&#40;1&#41;; 
    	linebreak= 1; 
      &#125;
      else if &#40;&#40;c<49&#41; && &#40;c!=16&#41; && &#40;c!=20&#41;&#41; &#123; linebreak= 0; reset&#40;c==32&#41;; &#125;
      return true;
    &#125;
    
    function onMouseDown&#40;evt&#41; &#123; reset&#40;0&#41;; linebreak= 0; return true; &#125;
    
    function vietTyping&#40;evt&#41; &#123;
      var c= getEvt&#40;evt, this.win&#41;;
      theTyper.value= this.getCurrentWord&#40;&#41;;
      if &#40;linebreak && !this.form&#41; &#123;
        linebreak= 0;
    	if &#40;this.win && this.win.document.codeMode&#41;&#123; 
    		/*if &#40;this.win.event.shiftKey&#41; &#123;
    			this.win.document.execCommand&#40;'InsertParagraph'&#41;;
    			this.win.document.execCommand&#40;'Outdent'&#41;;
    		&#125;
    		else*/
    		//this.replaceWord&#40;theTyper.value+"\n"&#41;;
    		this.curword.text= theTyper.value+"\n "
    		return false;
    	&#125;
      &#125;
      var changed= &#40;&#40;c>32&#41; && theTyper.typing&#40;c&#41;&#41;;
      if &#40;changed&#41; this.replaceWord&#40;theTyper.value&#41;;
      return !changed;
    &#125;
    
    function getCurrentWord&#40;&#41; &#123;
      if&#40;!document.all&#41; return this.value;
      var caret= this.document.selection.createRange&#40;&#41;;
      if &#40;caret.text&#41; return null;
      var backward= -10;
      do &#123;
        var caret2= caret.duplicate&#40;&#41;;
        caret2.moveStart&#40;"character", backward&#41;;
        outside= /&#91;\x01-\x40&#93;&#40;&#91;^\x01-\x40&#93;+&#41;$/.exec&#40;caret2.text&#41;;
        if &#40;outside&#41; backward = -outside&#91;1&#93;.length;
      &#125; while &#40;outside && backward <0&#41;;
      this.curword= caret2.duplicate&#40;&#41;;
      return caret2.text;
    &#125;
    
    function replaceWord&#40;newword&#41; &#123;
      if&#40;!document.all&#41; &#123; this.value= newword; return; &#125;
      this.curword.text= newword;
      this.curword.collapse&#40;false&#41;;
    &#125;
    // end interface
    
    
    // "class"&#58; CVietString
    //
    function CVietString&#40;str&#41; &#123;
      this.value= str;
      this.keymode= initKeys&#40;&#41;;
      this.charmap= initCharMap&#40;&#41;;
      this.ctrlchar= '-';
      this.changed= 0;
    
      this.typing= typing;
      this.Compose= Compose;
      this.Correct= Correct;
      this.findCharToChange= findCharToChange;
      return this;
    &#125;
    
    function typing&#40;ctrl&#41; &#123;
      this.changed= 0;
      this.ctrlchar= String.fromCharCode&#40;ctrl&#41;;
      this.keymode.getAction&#40;this&#41;;
      this.Correct&#40;&#41;;
      return this.changed;
    &#125;
    
    function Compose&#40;type&#41; &#123;
      if&#40;!this.value&#41; return;
      var info= this.findCharToChange&#40;type&#41;;
      if &#40;!info || !info&#91;0&#93;&#41; return;
      var telex;
      if &#40;info&#91;0&#93;=='\\'&#41; telex= &#91;1,this.ctrlchar,1&#93;;
      else if &#40;type>6&#41; telex= this.charmap.getAEOWD&#40;info&#91;0&#93;, type, info&#91;3&#93;&#41;;
      else telex= this.charmap.getDau&#40;info&#91;0&#93;, type&#41;;
      if &#40;!&#40;this.changed = telex&#91;0&#93;&#41;&#41; return;
      this.value= this.value.replaceAt&#40;info&#91;1&#93;,telex&#91;1&#93;,info&#91;2&#93;&#41;;
      if &#40;!telex&#91;2&#93;&#41; &#123; spellerror= 1; this.value+= this.ctrlchar; &#125;
    &#125;
    
    function Correct&#40;&#41; &#123;
      if &#40;this.charmap.maxchrlen || !document.all&#41; return 0;
      var tmp= this.value;
      if &#40;'nNcC'.indexOf&#40;this.ctrlchar&#41;>=0&#41; tmp+= this.ctrlchar;
      var er= /&#91;^\x01-\x7f&#93;&#40;hn|hc|gn&#41;$/i.exec&#40;tmp&#41;;
      if &#40;er&#41; &#123;
        this.value= tmp.substring&#40;0,tmp.length-2&#41;+er&#91;1&#93;.charAt&#40;1&#41;+er&#91;1&#93;.charAt&#40;0&#41;;
        this.changed= 1;
      &#125;
      else if&#40;!this.changed&#41; return 0;
      er= /\w&#40;&#91;^\x01-\x7f&#93;&#41;&#40;\w*&#41;&#40;&#91;^\x01-\x7f&#93;&#41;\S*$/.exec&#40;this.value&#41;;
      if &#40;!er&#41; return 0;
      var i= this.charmap.isVowel&#40;er&#91;1&#93;&#41;;
      var ri= &#40;i-1&#41;%24 + 1, ci= &#40;i-ri&#41;/24;
      var i2= this.charmap.isVowel&#40;er&#91;3&#93;&#41;;
      if &#40;!ci || !i2&#41; return 0;
      var ri2= &#40;i2-1&#41;%24 + 1, ci2= &#40;i2-ri2&#41;/24;
      var nc= this.charmap.charAt&#40;ri&#41;+ er&#91;2&#93;+ this.charmap.charAt&#40;ci*24+ri2&#41;;
      this.value= this.value.replace&#40;new RegExp&#40;er&#91;1&#93;+er&#91;2&#93;+er&#91;3&#93;,'g'&#41;, nc&#41;;
    &#125;
    
    function findCharToChange&#40;type&#41; &#123;
      var lastchars= this.charmap.lastCharsOf&#40;this.value, 5&#41;;
      var i= 0, c=lastchars&#91;0&#93;&#91;0&#93;, chr=0;
      if &#40;c=='\\'&#41; return &#91;c,this.value.length-1,1&#93;;
      if &#40;type==15&#41; while &#40;!&#40;chr=this.charmap.isVD&#40;c&#41;&#41;&#41; &#123;
        if &#40;&#40;c < 'A'&#41; || &#40;i>=4&#41; || !&#40;c=lastchars&#91;++i&#93;&#91;0&#93;&#41;&#41; return null;
      &#125;
      else while&#40; "cghmnptCGHMNPT".indexOf&#40;c&#41;>=0&#41; &#123;
        if &#40;&#40;c < 'A'&#41; || &#40;i>=2&#41; || !&#40;c=lastchars&#91;++i&#93;&#91;0&#93;&#41;&#41; return null;
      &#125;
      c= lastchars&#91;0&#93;&#91;0&#93;.toLowerCase&#40;&#41;;
      var pc= lastchars&#91;1&#93;&#91;0&#93;.toLowerCase&#40;&#41;;
      var ppc= lastchars&#91;2&#93;&#91;0&#93;.toLowerCase&#40;&#41;;
      if &#40;i==0 && type!=15&#41; &#123;
        if &#40; &#40;chr=this.charmap.isVowel&#40;lastchars&#91;1&#93;&#91;0&#93;&#41;&#41;
          && &#40;"uyoia".indexOf&#40;c&#41;>=0&#41; && !this.charmap.isUO&#40;pc,c&#41;
          && !&#40;&#40;pc=='o' && c=='a'&#41; || &#40;pc=='u' && c=='y'&#41;&#41;
          && !&#40;&#40;ppc=='q' && pc=='u'&#41; || &#40;ppc=='g' && pc=='i'&#41;&#41; &#41; ++i;
        if &#40;c=='a' && &#40;type==9 || type==7&#41;&#41; i= 0;
      &#125;
      c= lastchars&#91;i&#93;&#91;0&#93;;
      if &#40;&#40;i==0 || chr==0&#41; && type!=15&#41; chr= this.charmap.isVowel&#40;c&#41;;
      if &#40;!chr&#41; return null;
      var clen= lastchars&#91;i&#93;&#91;1&#93;, isuo=0;
      if &#40;&#40;i>0&#41; && &#40;type==7 || type==8 || type==11&#41;&#41; &#123;
        isuo=this.charmap.isUO&#40;lastchars&#91;i+1&#93;&#91;0&#93;,c&#41;;
        if &#40;isuo&#41; &#123; chr=isuo; clen+=lastchars&#91;++i&#93;&#91;1&#93;; isuo=1; &#125;
      &#125;
      var pos= this.value.length;
      for &#40;var j=0; j<= i; j++&#41; pos -= lastchars&#91;j&#93;&#91;1&#93;;
      return &#91;chr, pos, clen, isuo&#93;;
    &#125;
    // end CVietString
    
    
    // character-map template
    //
    function CVietCharMap&#40;&#41;&#123;
      this.vietchars = null;
      this.length = 149;
      this.chr_cache = new Array&#40;20&#41;;
      this.ind_cache = new Array&#40;20&#41;;
      this.cptr = 0;
      this.caching= function&#40;chr, ind&#41; &#123;
        this.chr_cache&#91;this.cptr&#93; = chr;
        this.ind_cache&#91;this.cptr++&#93; = ind;
        this.cptr %= 20;
      &#125;
      return this;
    &#125;
    
    CVietCharMap.prototype.charAt= function&#40;ind&#41;&#123;
      var chrcode= this.vietchars&#91;ind&#93;;
      return chrcode ? String.fromCharCode&#40;chrcode&#41; &#58; null;
    &#125;
    
    CVietCharMap.prototype.isVowel= function&#40;chr&#41;&#123;
      var i= 0;
      while &#40;&#40;i<20&#41; && &#40;chr != this.chr_cache&#91;i&#93;&#41;&#41; ++i;
      if &#40;i<20&#41; return this.ind_cache&#91;i&#93;;
    
      i = this.length-5;
      while &#40;&#40;chr != this.charAt&#40;i&#41;&#41; && i&#41; --i;
      this.caching&#40;chr, i&#41;;
      return i;
    &#125;
    
    CVietCharMap.prototype.isVD= function &#40;chr&#41;&#123;
      var ind= this.length-5;
      while &#40;&#40;chr != this.charAt&#40;ind&#41;&#41; && &#40;ind < this.length&#41;&#41; ++ind;
      return &#40;ind<this.length&#41;? ind&#58; 0;
    &#125;
    
    CVietCharMap.prototype.isUO= function &#40;c1, c2&#41;&#123;
      if &#40;!c1 || !c2&#41; return 0;
      var ind1 = this.isVowel&#40;c1&#41;;
      var ci = &#40;ind1-1&#41;%12;
      if &#40;&#40;ci!=9&#41; && &#40;ci!=10&#41;&#41; return 0;
      var ind2 = this.isVowel&#40;c2&#41;;
      ci = &#40;ind2-1&#41;%12;
      if &#40;&#40;ci!=6&#41; && &#40;ci!=7&#41; && &#40;ci!=8&#41;&#41; return 0;
      return &#91;ind1,ind2&#93;;
    &#125;
    
    CVietCharMap.prototype.getDau= function &#40;ind, type&#41;&#123;
      var accented= &#40;ind < 25&#41;? 0&#58; 1;
      var ind_i= &#40;ind-1&#41; % 24 +1;
      var charset= &#40;type == 6&#41;? 0 &#58; type;
      if &#40;&#40;type== 6&#41; && !accented&#41; return &#91;0&#93;;
      var newind= charset*24 + ind_i;
      if &#40;newind == ind&#41; newind= ind_i;
      var chr= this.charAt&#40;newind&#41;;
      if &#40;!chr&#41; chr= this.lowerCaseOf&#40;0,newind&#41;;
      return &#91;1, chr, newind>24 || type==6&#93;;
    &#125;
    
    var map=&#91;
    &#91;7,7,7,8,8, 8,9,10,11,15&#93;,
    &#91;0,3,6,0,6, 9,0, 3, 6, 0&#93;,
    &#91;1,4,7,2,8,10,1, 4, 7, 1&#93;
    &#93;;
    CVietCharMap.prototype.getAEOWD= function&#40;ind, type, isuo&#41; &#123;
      var c=0, i1=isuo? ind&#91;0&#93;&#58; ind;
      var vc1= &#40;type==15&#41;? &#40;i1-1&#41;%2 &#58; &#40;i1-1&#41;%12;
      if &#40;isuo&#41; &#123;
        var base= ind&#91;1&#93;-&#40;ind&#91;1&#93;-1&#41;%12;
        if &#40;type==7 || type==11&#41; c= this.charAt&#40;i1-vc1+9&#41;+this.charAt&#40;base+7&#41;;
        else if &#40;type==8&#41; c= this.charAt&#40;i1-vc1+10&#41;+this.charAt&#40;base+8&#41;;
        return &#91;c!=0, c, 1&#93;;
      &#125;
      var i= -1, shift= 0, del= 0;
      while &#40;shift==0 && ++i<map&#91;0&#93;.length&#41; &#123;
        if &#40;map&#91;0&#93;&#91;i&#93;==type&#41; &#123;
          if&#40;map&#91;1&#93;&#91;i&#93;==vc1&#41; shift= map&#91;2&#93;&#91;i&#93;-vc1;
          else if&#40;map&#91;2&#93;&#91;i&#93;==vc1&#41; shift= map&#91;1&#93;&#91;i&#93;-vc1;
        &#125;
      &#125;
      if &#40;shift==0&#41; &#123;
        if &#40;type==7 && &#40;vc1==2 || vc1==8&#41;&#41; shift=-1;
        else if &#40;&#40;type==9 && vc1==2&#41; || &#40;type==11 && vc1==8&#41;&#41; shift=-1;
        else if &#40;type==8 && &#40;vc1==1 || vc1==7&#41;&#41; shift=1;
        del= 1;
      &#125; else del=&#40;shift>0&#41;;
      i1 += shift;
      var chr= this.charAt&#40;i1&#41;;
      if &#40;i1<145&#41; this.caching&#40;chr, i1&#41;;
      if &#40;!chr&#41; chr= this.lowerCaseOf&#40;0, i1&#41;;
      return &#91;shift!=0, chr, del&#93;;
    &#125;
    
    CVietCharMap.prototype.lastCharsOf= function&#40;str, num&#41;&#123;
      if &#40;!num&#41; return &#91;str.charAt&#40;str.length-1&#41;,1&#93;;
      var vchars = new Array&#40;num&#41;;
      for &#40;var i=0; i< num; i++&#41; &#123; vchars&#91;i&#93;= &#91;str.charAt&#40;str.length-i-1&#41;,1&#93;; &#125;
      return vchars;
    &#125;
    // end CVietCharMap prototype
    
    
    String.prototype.replaceAt= function&#40;i,newchr,clen&#41;&#123;
      return this.substring&#40;0,i&#41;+ newchr + this.substring&#40;i+clen&#41;;
    &#125;
    
    // output map&#58; class CVietUniCodeMap
    //
    function CVietUniCodeMap&#40;&#41;&#123; var map= new CVietCharMap&#40;&#41;;
    map.vietchars = new Array&#40;
    "UNICODE",
    97, 226, 259, 101, 234, 105, 111, 244, 417, 117, 432, 121,
    65, 194, 258, 69, 202, 73, 79, 212, 416, 85, 431, 89,
    225, 7845, 7855, 233, 7871, 237, 243, 7889, 7899, 250, 7913, 253,
    193, 7844, 7854, 201, 7870, 205, 211, 7888, 7898, 218, 7912, 221,
    224, 7847, 7857, 232, 7873, 236, 242, 7891, 7901, 249, 7915, 7923,
    192, 7846, 7856, 200, 7872, 204, 210, 7890, 7900, 217, 7914, 7922,
    7841, 7853, 7863, 7865, 7879, 7883, 7885, 7897, 7907, 7909, 7921, 7925,
    7840, 7852, 7862, 7864, 7878, 7882, 7884, 7896, 7906, 7908, 7920, 7924,
    7843, 7849, 7859, 7867, 7875, 7881, 7887, 7893, 7903, 7911, 7917, 7927,
    7842, 7848, 7858, 7866, 7874, 7880, 7886, 7892, 7902, 7910, 7916, 7926,
    227, 7851, 7861, 7869, 7877, 297, 245, 7895, 7905, 361, 7919, 7929,
    195, 7850, 7860, 7868, 7876, 296, 213, 7894, 7904, 360, 7918, 7928,
    100, 273, 68, 272&#41;;
    return map;
    &#125;
    
    // input methods&#58; class C...Keys
    function CVietKeys&#40;&#41; &#123;
      this.getAction= function&#40;typer&#41;&#123;
        var i= this.keys.indexOf&#40;typer.ctrlchar.toLowerCase&#40;&#41;&#41;;
        if&#40;i>=0&#41; typer.Compose&#40;this.actions&#91;i&#93;&#41;;
      &#125;
      return this;
    &#125;
    
    function CVKOff&#40;&#41; &#123;
      this.off = true;
      this.getAction= function&#40;&#41;&#123;&#125;;
      return this;
    &#125;
    
    function CTelexKeys&#40;&#41; &#123;
      var k= new CVietKeys&#40;&#41;;
      k.keys= "sfjrxzaeowd";
      k.actions= &#91;1,2,3,4,5,6,9,10,11,8,15&#93;;
      k.istelex= true;
      return k;
    &#125;
    
    function CVniKeys&#40;&#41; &#123;
      var k= new CVietKeys&#40;&#41;;
      k.keys= "0123456789";
      k.actions= &#91;6,1,2,4,5,3,7,8,8,15&#93;;
      return k;
    &#125;
    
    function CViqrKeys&#40;&#41; &#123;
      var k= new CVietKeys&#40;&#41;;
      k.keys= "\xB4/'\u2019`.?~-^&#40;*+d";
      k.actions= &#91;1,1,1,1,2,3,4,5,6,7,8,8,8,15&#93;;
      return k;
    &#125;
    
    function CAllKeys&#40;&#41; &#123;
      var k= new CVietKeys&#40;&#41;;
      k.keys= "sfjrxzaeowd0123456789\xB4/'`.?~-^&#40;*+d";
      k.actions= &#91;1,2,3,4,5,6,9,10,11,8,15,6,1,2,4,5,3,7,8,8,15,1,1,1,2,3,4,5,6,7,8,8,8,15&#93;;
      k.istelex= true;
      return k;
    &#125;
    
    // end vietuni.js
    var ddth_arrHookKeydown = null;
    	var ddth_arrHookPageload = null;
    	var ddth_arrHookMouseover = null;
    	var ddth_arrHookMouseout = null;
    	var ddth_arrHookMouseup = null;
    	var ddth_arrHookMousedown = null;
    
    	function ddth_HookKeydown&#40;funcHook&#41; &#123;
    		if &#40;ddth_arrHookKeydown == null&#41; &#123;
    			ddth_arrHookKeydown = new Object&#40;&#41;;
    			ddth_arrHookKeydown.next = null;
    			ddth_arrHookKeydown.func = funcHook;
    		&#125; else &#123;
    			var save = ddth_arrHookKeydown;
    			while &#40;ddth_arrHookKeydown.next != null&#41; &#123;ddth_arrHookKeydown = ddth_arrHookKeydown.next;&#125;
    			var p = new Object&#40;&#41;;
    			p.func = funcHook;
    			p.next = null;
    			ddth_arrHookKeydown.next = p;
    			ddth_arrHookKeydown = save;
    		&#125;
    	&#125;
    	function ddth_HookPageload&#40;funcHook&#41; &#123;
    		if &#40;ddth_arrHookPageload == null&#41; &#123;
    			ddth_arrHookPageload = new Object&#40;&#41;;
    			ddth_arrHookPageload.next = null;
    			ddth_arrHookPageload.func = funcHook;
    		&#125; else &#123;
    			var save = ddth_arrHookPageload;
    			while &#40;ddth_arrHookPageload.next != null&#41; &#123;ddth_arrHookPageload = ddth_arrHookPageload.next;&#125;
    			var p = new Object&#40;&#41;;
    			p.func = funcHook;
    			p.next = null;
    			ddth_arrHookPageload.next = p;
    			ddth_arrHookPageload = save;
    		&#125;
    	&#125;
    	function ddth_HookMouseover&#40;funcHook&#41; &#123;
    		if &#40;ddth_arrHookMouseover == null&#41; &#123;
    			ddth_arrHookMouseover = new Object&#40;&#41;;
    			ddth_arrHookMouseover.next = null;
    			ddth_arrHookMouseover.func = funcHook;
    		&#125; else &#123;
    			var save = ddth_arrHookMouseover;
    			while &#40;ddth_arrHookMouseover.next != null&#41; &#123;ddth_arrHookMouseover = ddth_arrHookMouseover.next;&#125;
    			var p = new Object&#40;&#41;;
    			p.func = funcHook;
    			p.next = null;
    			ddth_arrHookMouseover.next = p;
    			ddth_arrHookMouseover = save;
    		&#125;
    	&#125;
    	function ddth_HookMouseout&#40;funcHook&#41; &#123;
    		if &#40;ddth_arrHookMouseout == null&#41; &#123;
    			ddth_arrHookMouseout = new Object&#40;&#41;;
    			ddth_arrHookMouseout.next = null;
    			ddth_arrHookMouseout.func = funcHook;
    		&#125; else &#123;
    			var save = ddth_arrHookMouseout;
    			while &#40;ddth_arrHookMouseout.next != null&#41; &#123;ddth_arrHookMouseout = ddth_arrHookMouseout.next;&#125;
    			var p = new Object&#40;&#41;;
    			p.func = funcHook;
    			p.next = null;
    			ddth_arrHookMouseout.next = p;
    			ddth_arrHookMouseout = save;
    		&#125;
    	&#125;
    	function ddth_HookMouseup&#40;funcHook&#41; &#123;
    		if &#40;ddth_arrHookMouseup == null&#41; &#123;
    			ddth_arrHookMouseup = new Object&#40;&#41;;
    			ddth_arrHookMouseup.next = null;
    			ddth_arrHookMouseup.func = funcHook;
    		&#125; else &#123;
    			var save = ddth_arrHookMouseup;
    			while &#40;ddth_arrHookMouseup.next != null&#41; &#123;ddth_arrHookMouseup = ddth_arrHookMouseup.next;&#125;
    			var p = new Object&#40;&#41;;
    			p.func = funcHook;
    			p.next = null;
    			ddth_arrHookMouseup.next = p;
    			ddth_arrHookMouseup = save;
    		&#125;
    	&#125;
    	function ddth_HookMousedown&#40;funcHook&#41; &#123;
    		if &#40;ddth_arrHookMousedown == null&#41; &#123;
    			ddth_arrHookMousedown = new Object&#40;&#41;;
    			ddth_arrHookMousedown.next = null;
    			ddth_arrHookMousedown.func = funcHook;
    		&#125; else &#123;
    			var save = ddth_arrHookMousedown;
    			while &#40;ddth_arrHookMousedown.next != null&#41; &#123;ddth_arrHookMousedown = ddth_arrHookMousedown.next;&#125;
    			var p = new Object&#40;&#41;;
    			p.func = funcHook;
    			p.next = null;
    			ddth_arrHookMousedown.next = p;
    			ddth_arrHookMousedown = save;
    		&#125;
    	&#125;
    
    	/* function that hooks keydown event */
    	function ddth_keydown&#40;&#41; &#123;
    		var p = ddth_arrHookKeydown;
    		while &#40;p != null&#41; &#123;
    			if &#40;p.func&#40;&#41;&#41; &#123;return;&#125;
    			p = p.next;
    		&#125;
    	&#125;
    	/* function that hooks pageload event */
    	function ddth_pageload&#40;&#41; &#123;
    		var p = ddth_arrHookPageload;
    		while &#40;p != null&#41; &#123;
    			if &#40;p.func&#40;&#41;&#41; &#123;return;&#125;
    			p = p.next;
    		&#125;
    	&#125;
    	/* functions that hook mouse events */
    	function ddth_mouseover&#40;&#41; &#123;
    		var p = ddth_arrHookMouseover;
    		while &#40;p != null&#41; &#123;
    			if &#40;p.func&#40;&#41;&#41; &#123;return;&#125;
    			p = p.next;
    		&#125;
    	&#125;
    	function ddth_mouseout&#40;&#41; &#123;
    		var p = ddth_arrHookMouseout;
    		while &#40;p != null&#41; &#123;
    			if &#40;p.func&#40;&#41;&#41; &#123;return;&#125;
    			p = p.next;
    		&#125;
    	&#125;
    	function ddth_mouseup&#40;&#41; &#123;
    		var p = ddth_arrHookMouseout;
    		while &#40;p != null&#41; &#123;
    			if &#40;p.func&#40;&#41;&#41; &#123;return;&#125;
    			p = p.next;
    		&#125;
    	&#125;
    	function ddth_mousedown&#40;&#41; &#123;
    		var p = ddth_arrHookMouseout;
    		while &#40;p != null&#41; &#123;
    			if &#40;p.func&#40;&#41;&#41; &#123;return;&#125;
    			p = p.next;
    		&#125;
    	&#125;
    
    		function ddth_SetCookie&#40;name, value, expires&#41; &#123;
    		document.cookie = name + '=' + escape&#40;value&#41; + &#40;&#40;expires != null&#41; ? ';expires=' + expires.toGMTString&#40;&#41; &#58; ''&#41; + ';path=/';
    	&#125;
    	function ddth_GetCookie&#40;name&#41; &#123;
    		var cname = name + '=';
    		var dc = document.cookie;
    		if &#40;dc.length > 0&#41; &#123;
    			begin = dc.indexOf&#40;cname&#41;;
    			if &#40;begin != -1&#41; &#123;
    				begin += cname.length;
    				end = dc.indexOf&#40;';', begin&#41;;
    				if &#40;end == -1&#41; end = dc.length;
    				return unescape&#40;dc.substring&#40;begin, end&#41;&#41;;
    			&#125;
    		&#125;
    		return null;
    	&#125;
    
    	/* some handy variables */
    
    	ddth_vCOOKIE_PREFIX	= "ddth_";
    	
    document.write&#40;"<form name='_frm_VK'>"&#41;;
    document.write&#40;"<input type='hidden' class='cRadio' name='_vietkey_mode' value=0 onFocus='setTypingMode&#40;0&#41;;'>"&#41;;
    document.write&#40;"<input type='hidden' class='cRadio' name='_vietkey_mode' value=1 onFocus='setTypingMode&#40;1&#41;;'>"&#41;;
    document.write&#40;"<input type='hidden' class='cRadio' name='_vietkey_mode' value=2 onFocus='setTypingMode&#40;2&#41;;'>"&#41;;
    document.write&#40;"<input type='hidden' class='cRadio' name='_vietkey_mode' value=3 onFocus='setTypingMode&#40;3&#41;;'>"&#41;;
    document.write&#40;"</form>"&#41;;
    
    
    function _VK_updateVietkey&#40;&#41; &#123;
    	var vk = ddth_GetCookie&#40;ddth_vCOOKIE_PREFIX+'_VK'&#41;;
    	switch &#40;vk&#41; &#123;
    		case '1'&#58; document._frm_VK._vietkey_mode&#91;1&#93;.checked = true; break;
    		case '2'&#58; document._frm_VK._vietkey_mode&#91;2&#93;.checked = true; break;
    		case '3'&#58; document._frm_VK._vietkey_mode&#91;3&#93;.checked = true; break;
    		default&#58; document._frm_VK._vietkey_mode&#91;0&#93;.checked = true; break;
    	&#125;
    &#125;
    function _VK_key_press&#40;&#41; &#123;
    	var el=event.srcElement;
    	if &#40;event.keyCode == 120&#41; &#123;
    		/* F9&#58; change typing mode */
    		_switchKeymode&#40;&#41;;
    		_VK_updateVietkey&#40;&#41;;
    		return false;
    	&#125;
    	if&#40;el.type=='text'||el.type=='textarea'&#41; &#123;
    		telexingVietUC&#40;el, event.keyCode&#41;;
    		return true;
    	&#125; else &#123;
    		return false;
    	&#125;
    &#125;
    function _VK_page_load&#40;&#41; &#123;
    	var vk = ddth_GetCookie&#40;ddth_vCOOKIE_PREFIX+'_VK'&#41;;
    	switch &#40;vk&#41; &#123;
    		case '1'&#58; setTypingMode&#40;1&#41;; break;
    		case '2'&#58; setTypingMode&#40;2&#41;; break;
    		case '3'&#58; setTypingMode&#40;3&#41;; break;
    		default&#58; setTypingMode&#40;0&#41;; break;
    	&#125;
    	_VK_updateVietkey&#40;&#41;;
    	ddth_HookKeydown&#40;_VK_key_press&#41;;
    	return false;
    &#125;
    ddth_HookPageload&#40;_VK_page_load&#41;;
    Save doan code tren thanh file vietuni.js rui upload len thu muc root cua forum .
    Them doan code va`o truo'c tab <body>:
    Code:
    <SCRIPT language=javascript src="vietuni.js" type=text/javascript></SCRIPT>
    Trong tab <body> them doan code sau vao trong no' :
    Code:
    onmouseup=ddth_mouseup&#40;&#41; onmousedown=ddth_mouseout&#40;&#41; 
    onkeydown=ddth_keydown&#40;&#41; onmouseover=ddth_mouseover&#40;&#41; onmouseout=ddth_mouseout&#40;&#41; onload=ddth_pageload&#40;&#41;
    Lu'c do' tab body se co dang nhu sau:
    Code:
    <body onmouseup=ddth_mouseup&#40;&#41; onmousedown=ddth_mouseout&#40;&#41; 
    onkeydown=ddth_keydown&#40;&#41; onmouseover=ddth_mouseover&#40;&#41; onmouseout=ddth_mouseout&#40;&#41; onload=ddth_pageload&#40;&#41; >
    Vay la xong rui.
    Tui chua xa`i phpbb bao gio` cho nen ko biet edit o body la phai vao dau .
    Nhung day la cach nhanh nhat de cai bo go cho Website .
    Bo go~ VietUni co rat it bug .

  10. #10
    Join Date
    Mar 2003
    Location
    Cõi Thiên Thai
    Posts
    19,302

    Default Xin cám ơn anh Ryu hướng dẫn

    Cám ơn anh Ryu nhiều nhé, để Công tử xem nghiên cứu làm theo thử xem thế nào.

    Mến,
    Công tử

    Em nào chồng bỏ, chồng chê
    Anh dzớt 1 quẻ, chồng mê.. ụa lộn ... em mê tới già

Page 1 of 3 123 LastLast