[TUTs] Chatbox VHG 3.0

  Bài viết hay nhất1
First topic message reminder :

I. Giới thiệu.







Chatbox này do mình phát triển dựa trên chatbox 8 mặc định của fm. Với giao diện đơn giản và các chức năng được tối ưu đem đến cho các bạn một chatbox vừa gọn nhẹ vừa đa năng.






[You must be registered and logged in to see this image.]


[You must be registered and logged in to see this image.]



Demo trực tiếp: Chatbox


II. Chức năng



  1. Đăng nhập tự động. Ngay cả khi dissconect cũng sẽ tự đăng nhập lại.
  2. Sử dụng bộ font emoticont thay thế cho emoticont bằng hình ảnh sẵn có của fm để giảm thời gian tải ảnh.
  3. Hỗ trợ Buzz như yahoo.
  4. Hỗ trợ các khung chèn link, chèn ảnh và chèn youtube.
  5. Xem video youtube bằng popup.
  6. Hỗ trợ chat riêng. Với nội dung chat riêng được mã hóa. Cho dù có xem trên link /chatbox cũng sẽ mã hóa. Giúp bảo vệ một ích riêng tư của thành viên. (Chức năng này hiện vẫn đang phát triển, có thể sẽ xảy ra một số lỗi nhỏ. Sẽ cố gắng khắc phục vào version kế.



III. Cài Đặt.


Vào Acp > Moduel > Chatbox > Cấu Hình 
Chọn:


  1. Activate the ChatBox : Có
  2. Display users avatars in the chatbox : Muốn bật avata thì chọn có, còn nếu không thì chọn không.
  3. Chatbox display: Do no display



Vào ACP > Moduel > HTML pages management > Tạo một html mới. Chép toàn bộ code này vào.

HTML:

Thêm vào code này vào index_body chỗ nào tùy thích.. Tốt nhất là đề sau {CHATBOX_TOP}:

Code:
<iframe scrolling="no" width="100%" height="340" src="{page}" frameborder="0" allowfullscreen=""></iframe>



Thay {page} thành địa chỉ trang html bạn tạo ở trên.


IV. Tống Kết


Vậy là xong rồi. Mọi thứ còn lại js sẽ tự động làm. Bạn không cần phải làm gì nữa. Mọi góp ý và thắc mắc vui lòng gửi tại topic này. Xin cám ơn.


Tags: [You must be registered and logged in to see this link.]
  Bài viết hay nhất51
[You must be registered and logged in to see this link.]
huongud wrote:[You must be registered and logged in to see this link.]
Yasuo wrote:Bật chatbox chưa
@@ t bật rồi, và đợi khoảng hơn tiếng thì chatbox vào được nhưng hiện disconnect và k chat đc :)) t cũng bó tay luôn

Không có link demo. Miễn hỗ trợ nhé.
  Bài viết hay nhất52
[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
@@ t bật rồi, và đợi khoảng hơn tiếng thì chatbox vào được nhưng hiện disconnect và k chat đc :)) t cũng bó tay luôn

Không có link demo. Miễn hỗ trợ nhé.[/quote]
Demo đây ^^!: [You must be registered and logged in to see this link.]
acc test: huongud
pass: 9xkma1234
  Bài viết hay nhất53
[You must be registered and logged in to see this link.]
huongud wrote:[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
@@ t bật rồi, và đợi khoảng hơn tiếng thì chatbox vào được nhưng hiện disconnect và k chat đc :)) t cũng bó tay luôn

Không có link demo. Miễn hỗ trợ nhé.
Demo đây ^^!: [You must be registered and logged in to see this link.]
acc test: huongud
pass: 9xkma1234[/quote]

Do một số ảnh avata bị lỗi. Nên nó ko tải dc đó. Tạm thời clear chatbox đi. Rồi vào acp tắt tính năng hiển thị avata. Lối này mình đã bik. Sẽ khắc phục trong bản cập nhật tới.
  Bài viết hay nhất54
Ẩn đối với khách sao bạn?
  Bài viết hay nhất55
[You must be registered and logged in to see this link.]
pluzvn wrote:Ẩn đối với khách sao bạn?

Nhúng cái frame vào cặp tag này.

Code:

<!-- BEGIN switch_user_logged_in -->
<iframe scrolling="no" width="100%" height="340" src="{page}" frameborder="0" allowfullscreen=""></iframe>
<!-- END switch_user_logged_in -->

Sửa lại {page} thành link trang chatbox.
  Bài viết hay nhất56
Cảm ơn bạn. Sẵn tiện cho mình hỏi là ẩn avatar với chỉnh font-size chat thế nào?
  Bài viết hay nhất57
sao forum của em lúc chat được lúc thì cứ "chờ chút nhé bạn..." vậy anh ??
  Bài viết hay nhất58
mình làm hoài nó hok hiện ta..có cách nào giúp mình với
forum mình là toilait.forumvi.com
  Bài viết hay nhất59
[You must be registered and logged in to see this link.]
tommy_phan wrote:mình làm hoài nó hok hiện ta..có cách nào giúp mình với
forum mình là toilait.forumvi.com

acc test của bạn đâu

-tiện thể cho mình hỏi có chatbox 9 chưa nhỉ
  Bài viết hay nhất60
[You must be registered and logged in to see this link.]
kingofgame wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:mình làm hoài nó hok hiện ta..có cách nào giúp mình với
forum mình là toilait.forumvi.com

acc test của bạn đâu

-tiện thể cho mình hỏi có chatbox 9 chưa nhỉ
đây bạn
user: demo
pass: demo123456

và toàn bộ code body của mình

Code:
<div class="trairum" style=" float: left; width: 70%; ">
   <div id="left">
      <div id="pun-info" class="boxFMvi main">
         <div class="main-head">
            <div class="page-title">
               <h2>Tình hình diễn đàn</h2>
            </div>
         </div>
         <div class="main-content" style="height:32em; border-radius:0">
            <!-- BEGIN giefmod_index1 -->
             {giefmod_index1.MODVAR}
            <!-- END giefmod_index1 -->
         </div>
      </div>
   </div>
   <script type="text/javascript">
    function searchtopic(nguonF, soF, dichF) {
        $("#proLastLoad").show();
        $.ajax({
            url: nguonF,
            success: function (data) {
                $("#proLastLoad").hide();
                $("#recentnew .latest_topics").empty();
                $(data).find(".topic-title:not('.topic-title:contains(\'»\')'):lt(" + soF + ")").find(".topictitle, .tooltipFMvi").appendTo(dichF);
                $(dichF + ' .topictitle').wrap("<li></li>");
                var ti;
                for (ti = 0; ti < soF; ti++) {
                    var it = $(dichF + ' a.topictitle:eq(' + ti + ')');
                    var lastUx = it.parent().next().find('p:eq(6)>strong').html();
                    var popupUx = it.parent().next().find(".lastlink-FMvi a").attr("href");
                    var trangthai = it.parent().next().find('p:eq(3)>font').text();
                    if (langEV()) {
                        var dabikhoa = "This topic is locked";
                        var dacomoi = "New posts"
                    } else {
                        var dabikhoa = "Chủ đề này đã bị khóa";
                        var dacomoi = "Bài viết mới"
                    }
                    if (trangthai.search(dabikhoa) != -1) {
                        var imgUx = 'http://i48.servimg.com/u/f48/16/58/89/73/locked10.png';
                    } else if (trangthai.search(dacomoi) != -1) {
                        var imgUx = 'http://i48.servimg.com/u/f48/16/58/89/73/post_n10.gif';
                    } else {
                        var imgUx = 'http://i48.servimg.com/u/f48/16/58/89/73/post_o10.png';
                    };
                    it.replaceWith('<span onmouseover="show_tooltip(this, $(this).parent().next().html(), \'FMvi.Org\')" class="leftrecent"><a href="' + it.attr("href") + '" class="topictitle">' + it.text() + '</a></span><span class="imgstatus"><img width="10px" src="' + imgUx + '" /><a class="firstTopic" href="' + popupUx + '"><span style="line-height: 18px; font-size: 9px;"> ▼</span></a></span><span onmouseover="show_tooltip(this, \'Click để xem thông tin thành viên này\', \'FMvi.Org\')" class="rightrecent">' + lastUx + '</span>');
                }
            },
            error: function (jqXHR, textStatus, errorThrown) {
                $(dichF).html('<p><font face="Courier New"><font color="red">Có lỗi xảy ra trong quá trình tải dữ liệu.</font></font></p>');
            }
        });
    }
    function searchuser(nguonU, soU, dichU) {
        $("#loaUser").show();
        $.ajax({
            url: nguonU,
            success: function (data) {
                $("#loaUser").hide();
                $("#top_posters .latest_topics").empty();
                $(data).find(".dataUserFmvi:lt(" + soU + ")").appendTo(dichU);
                $(dichU + ' .dataUserFmvi').wrap("<li></li>");
                var g;
                for (g = 0; g < 20; g++) {
                    var ggg = $(dichU + " .dataUserFmvi:eq(" + g + ")>span:first");
                    ggg.replaceWith("<span onmouseover=\"show_tooltip(this, $(this).next().html(), 'FMvi.Org')\" style=\"position: absolute; left: 0pt;\">" + ggg.html() + "</span>")
                }
            },
            error: function (jqXHR, textStatus, errorThrown) {
                $(dichU).html('<p><font face="Courier New"><font color="red">Có lỗi xảy ra trong quá trình tải dữ liệu.</font></font></p>');
            }
        });
    }
    searchuser('/memberlist?mode=overall_posters', '12', '#top_posters ul');
    $("#left").fadeIn(1000);
$(function(){
    $("#changeFMvi").html($("#jumboxFMvi select").html());
});
 var versionMinor = parseFloat(navigator.appVersion);
var versionMajor = parseInt(versionMinor);
var IE = document.all && !window.opera && versionMajor < 7;
var IE7 = document.all && !window.opera && versionMajor >= 7;
var OP = window.opera;
var FF = document.getElementById;
var NS = document.layers;
function move_tooltip(e) {
  var curX = (!IE) ? e.pageX : event.clientX + real_body.scrollLeft;
  var curY = (!IE) ? e.pageY : event.clientY + real_body.scrollTop;
  var rightedge = IE && !window.opera ? real_body.clientWidth - event.clientX - offsetxpoint : window.innerWidth - e.clientX - offsetxpoint - 20;
  var bottomedge = IE && !window.opera ? real_body.clientHeight - event.clientY - offsetypoint : window.innerHeight - e.clientY - offsetypoint - 20;
  var leftedge = (offsetxpoint < 0) ? offsetxpoint * (-1) : -1000;
  current_tooltip = get_item('tooltip');
  if (rightedge < current_tooltip.offsetWidth) current_tooltip.style.left = IE ? real_body.scrollLeft + event.clientX - current_tooltip.offsetWidth + "px" : window.pageXOffset + e.clientX - current_tooltip.offsetWidth + "px";
  else if (curX < leftedge) current_tooltip.style.left = "5px";
  else current_tooltip.style.left = curX + offsetxpoint + "px";
  if (bottomedge < current_tooltip.offsetHeight) current_tooltip.style.top = IE ? real_body.scrollTop + event.clientY - current_tooltip.offsetHeight - offsetypoint + "px" : window.pageYOffset + e.clientY - current_tooltip.offsetHeight - offsetypoint + "px";
  else current_tooltip.style.top = curY + offsetypoint + "px"
}
function get_item(name, opener) {
  if (IE) {
      return (opener) ? window.opener.document.all[name] : document.all[name]
  } else if (FF) {
      return (opener) ? window.opener.document.getElementById(name) : document.getElementById(name)
  } else if (NS) {
      return (opener) ? window.opener.document.layers[name] : document.layers[name]
  }
}
function change_display(name, value, opener) {
  if (IE) {
      element = (opener == true) ? window.opener.document.all[name].style : document.all[name].style
  } else if (FF) {
      element = (opener == true) ? window.opener.document.getElementById(name).style : document.getElementById(name).style
  } else if (NS) {
      element = (opener == true) ? window.opener.document.layers[name] : document.layers[name]
  }
  element.display = value
}
function reverse_display(name, opener) {
  element = get_item(name);
  if (!element) {
      return false
  }
  var display = (element.style.display != 'block') ? 'block' : 'none';
  change_display(name, display, opener)
}
var current_tooltip;
function show_tooltip(caller, content, content_title) {
  var current_tooltip = get_item('tooltip');
  if (!current_tooltip) {
      var current_tooltip = document.createElement('div');
      current_tooltip.setAttribute('id', 'tooltip');
      document.body.appendChild(current_tooltip)
  }
  current_tooltip.style.zIndex = 100;
  current_tooltip.style.position = 'absolute';
  if (content_title) {
      content = '<p class="header">' + content_title + '</p><p>' + content + '</p>'
  } else {
      content = '<p>' + content + '</p>'
  }
  current_tooltip.innerHTML = content;
  current_tooltip.style.visibility = 'visible';
  caller.onmousemove = move_tooltip;
  caller.onmouseout = function () {
      current_tooltip.style.visibility = "hidden"
  };
  caller.title = ''
}
var offsetxpoint = -60;
var offsetypoint = 20;
var real_body = (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body;
real_body = (document.documentElement) ? document.documentElement : document.body;
   </script>
    {JAVASCRIPT}
   <style>
.headerbar {
color: #444;
background: rgb(56, 57, 61);
margin-bottom: -30px!important;
  }
   </style>
   <br>
   <div class="welcome_message">
      <div class="message_icon" style=" background: #fff7e8 url(http://r16.imgfast.net/users/1617/51/25/46/smiles/2523012317.gif) center center no-repeat; ">
   
  Bài viết hay nhất61
[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
kingofgame wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:mình làm hoài nó hok hiện ta..có cách nào giúp mình với
forum mình là toilait.forumvi.com

acc test của bạn đâu

-tiện thể cho mình hỏi có chatbox 9 chưa nhỉ
đây bạn
user: demo
pass: demo123456

và toàn bộ code body của mình


Không đọc kỹ hướng dẫn. Làm ko được là phải. Chưa nhúng cái iframe chứa trang chatbox vào thì lấy cái gì mà nó hiển thị.
  Bài viết hay nhất62
[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
kingofgame wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:mình làm hoài nó hok hiện ta..có cách nào giúp mình với
forum mình là toilait.forumvi.com

acc test của bạn đâu

-tiện thể cho mình hỏi có chatbox 9 chưa nhỉ
đây bạn
user: demo
pass: demo123456

và toàn bộ code body của mình


Không đọc kỹ hướng dẫn. Làm ko được là phải. Chưa nhúng cái iframe chứa trang chatbox vào thì lấy cái gì mà nó hiển thị.

mình biết nhưng mình không thấy {CHATBOX_TOP}: nó nằm ở chổ nào hết bạn giúp mình xem nó ở đâu nha code index body mình có up ở trên

số thứ tự HTML của mình là: h37
  Bài viết hay nhất63
[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
kingofgame wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:mình làm hoài nó hok hiện ta..có cách nào giúp mình với
forum mình là toilait.forumvi.com

acc test của bạn đâu

-tiện thể cho mình hỏi có chatbox 9 chưa nhỉ
đây bạn
user: demo
pass: demo123456

và toàn bộ code body của mình


Không đọc kỹ hướng dẫn. Làm ko được là phải. Chưa nhúng cái iframe chứa trang chatbox vào thì lấy cái gì mà nó hiển thị.

mình biết nhưng mình không thấy {CHATBOX_TOP}: nó nằm ở chổ nào hết bạn giúp mình xem nó ở đâu nha code index body mình có up ở trên

số thứ  tự HTML của mình là: h37

Để sau biến {JAVASCRIPT} là được. Vì nó là iframe do đó bạn có thể nơi nào bạn thấy ổn là được rồi.
  Bài viết hay nhất64
ok mình sẽ thử thank bạn nha
  Bài viết hay nhất65
[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
kingofgame wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:mình làm hoài nó hok hiện ta..có cách nào giúp mình với
forum mình là toilait.forumvi.com

acc test của bạn đâu

-tiện thể cho mình hỏi có chatbox 9 chưa nhỉ
đây bạn
user: demo
pass: demo123456

và toàn bộ code body của mình


Không đọc kỹ hướng dẫn. Làm ko được là phải. Chưa nhúng cái iframe chứa trang chatbox vào thì lấy cái gì mà nó hiển thị.

mình biết nhưng mình không thấy {CHATBOX_TOP}: nó nằm ở chổ nào hết bạn giúp mình xem nó ở đâu nha code index body mình có up ở trên

số thứ  tự HTML của mình là: h37

Để sau biến {JAVASCRIPT} là được. Vì nó là iframe do đó bạn có thể nơi nào bạn thấy ổn là được rồi.
vẫn không được bạn ơi nó vẫn bị lỗi...hiện thêm 1 cái index nữa
bạn vào xem chỉ giúp mình nha [You must be registered and logged in to see this link.]
nick test
user: demo
pass: demo123456
  Bài viết hay nhất66
[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
kingofgame wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:mình làm hoài nó hok hiện ta..có cách nào giúp mình với
forum mình là toilait.forumvi.com

acc test của bạn đâu

-tiện thể cho mình hỏi có chatbox 9 chưa nhỉ
đây bạn
user: demo
pass: demo123456

và toàn bộ code body của mình


Không đọc kỹ hướng dẫn. Làm ko được là phải. Chưa nhúng cái iframe chứa trang chatbox vào thì lấy cái gì mà nó hiển thị.

mình biết nhưng mình không thấy {CHATBOX_TOP}: nó nằm ở chổ nào hết bạn giúp mình xem nó ở đâu nha code index body mình có up ở trên

số thứ  tự HTML của mình là: h37

Để sau biến {JAVASCRIPT} là được. Vì nó là iframe do đó bạn có thể nơi nào bạn thấy ổn là được rồi.
vẫn không được bạn ơi nó vẫn bị lỗi...hiện thêm 1 cái index nữa
bạn vào xem chỉ giúp mình nha [You must be registered and logged in to see this link.]
nick test
user: demo
pass: demo123456

Nản chú quá. Đưa nick test cũng là nick không xài được. Vào đăng ký 1 nick thì thấy đang xài chatbox mặc định. Chẳng biết chú chèn cái iframe chatbox của tui ở đâu hết.

Chèn cái code này ở phía sau biến {JAVASCRIPT} của tamplate index_body.

Code:

<!-- BEGIN switch_user_logged_in -->
<iframe scrolling="no" width="100%" height="340" src="/h37-" frameborder="0" allowfullscreen=""></iframe>
<!-- END switch_user_logged_in -->

Tìm và xóa cái frame chatbox cũ đi.

Code:
<iframe frameborder="0" width="100%" height="250px" onerror="firstchatfmvi()" src="/chatbox/index.forum?archives=1" onload="firstchatfmvi()" id="chatfmvi"></iframe>
  Bài viết hay nhất67
[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
markai30 wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:[You must be registered and logged in to see this link.]
kingofgame wrote:[You must be registered and logged in to see this link.]
tommy_phan wrote:mình làm hoài nó hok hiện ta..có cách nào giúp mình với
forum mình là toilait.forumvi.com

acc test của bạn đâu

-tiện thể cho mình hỏi có chatbox 9 chưa nhỉ
đây bạn
user: demo
pass: demo123456

và toàn bộ code body của mình


Không đọc kỹ hướng dẫn. Làm ko được là phải. Chưa nhúng cái iframe chứa trang chatbox vào thì lấy cái gì mà nó hiển thị.

mình biết nhưng mình không thấy {CHATBOX_TOP}: nó nằm ở chổ nào hết bạn giúp mình xem nó ở đâu nha code index body mình có up ở trên

số thứ  tự HTML của mình là: h37

Để sau biến {JAVASCRIPT} là được. Vì nó là iframe do đó bạn có thể nơi nào bạn thấy ổn là được rồi.
vẫn không được bạn ơi nó vẫn bị lỗi...hiện thêm 1 cái index nữa
bạn vào xem chỉ giúp mình nha [You must be registered and logged in to see this link.]
nick test
user: demo
pass: demo123456

Nản chú quá. Đưa nick test cũng là nick không xài được. Vào đăng ký 1 nick thì thấy đang xài chatbox mặc định. Chẳng biết chú chèn cái iframe chatbox của tui ở đâu hết.

Chèn cái code này ở phía sau biến {JAVASCRIPT} của tamplate index_body.

Code:

<!-- BEGIN switch_user_logged_in -->
<iframe scrolling="no" width="100%" height="340" src="/h37-" frameborder="0" allowfullscreen=""></iframe>
<!-- END switch_user_logged_in -->

Tìm và xóa cái frame chatbox cũ đi.

Code:
<iframe frameborder="0" width="100%" height="250px" onerror="firstchatfmvi()" src="/chatbox/index.forum?archives=1" onload="firstchatfmvi()" id="chatfmvi"></iframe>
ok than bạn nha mình làm được rồi...tại lúc nãy mình làm mà bị lỗi nên mình trả về trạng thái bạn đầu thank bạn hi vọng chạt box sẽ sống lâu...không bị lỗi
ah mà chatbox của mình nó không hiện AVATA bạn ơi
và nó bị mất 1 góc bên phải chatbox hiển thị không hết chatbox..mong bạn giúp mình nha..mình không rành mấy cái vụ code này
  Bài viết hay nhất68
Hi vọng ở phiên bản kế tiếp sẽ có thời gian gửi tin nhắn, như vậy sẽ thuận tiện hơn khi muốn kiểm tra spam :)
  Bài viết hay nhất69
bác ơi giúp mình với
  Bài viết hay nhất70
up cho ai giúp mình
  Bài viết hay nhất71
nếu bạn thích thì vào chatbox mặc định sẽ thấy thôi :))
  Bài viết hay nhất72
Của e bị gì nó cứ Xoay Login mãi nhưng không vào đc ChatBox ạ :(
  Bài viết hay nhất73
[You must be registered and logged in to see this link.]
moncute wrote:Của e bị gì nó cứ Xoay Login mãi nhưng không vào đc ChatBox ạ :(
đưa đề mố đi bác :v
  Bài viết hay nhất74
[You must be registered and logged in to see this link.]
moncute wrote:Của e bị gì nó cứ Xoay Login mãi nhưng không vào đc ChatBox ạ :(

Chatbox cũ rồi. Nên có 1 số lỗi xảy ra. Chờ bản cập nhật mới nhé.
The author of this message was banned from the forum - See the message
  Bài viết hay nhất76
You cannot reply to topics in this forum