Change background image
LOVE quotion

Bắt đầu từ 4.53' thứ Hai ngày 17/10/2011


You are not connected. Please login or register

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down  Thông điệp [Trang 1 trong tổng số 1 trang]

Nuts
Nuts Tích cực

Cấp bậc: Tích cực

Bài viết : 300

Danh vọng : 648

Uy tín : 23

* Như thông tin trong những ngày gần đây thì host ảnh Imageshack đã bắt đầu chặn ip tại Việt Nam. Hiện tượng ếch ngồi trên màn hình xảy ra khá nhiều với các diễn đàn.
* Thủ thuật này giúp bạn thay thế frame upload ảnh sử dụng Imageshack mặc định của forum bằng frame của host khác.
* Trong bài viết mình hướng dẫn thay thế bằng ImagechipUpanh.com, các bạn có thể thay thế bằng host khác bằng cách thay iframe trong script.


  • Demo : click nút Chuyển host upload ảnh trong khung viết bài Picture_save tại khung viết bài hoặc trả lời nhanh ở Chuyển host upload ảnh trong khung viết bài 930734.
  • Cách làm : Chèn đoạn script sau vào overall_header trước thẻ </head> hoặc chèn vào Widget đối với invision hoặc phpbb3

    • Imageschip

      Code:
      <script type="text/javascript">
          function display_upload_imageshack(button) {
              var container = document.getElementById('servimg_upload_gui');
              if (!document.getElementById('obj_servimg')) {
                  container.innerHTML = '<p><iframe src="http://www.imageschip.com/if1.php" scrolling="no" allowtransparency="true" frameborder="0" width="500" height="132">Update your browser for Imageschip!</iframe></p>'
              }
              var div = document.getElementById('servimg_upload_gui');
              var visible = div.style.visibility;
              if (visible == 'hidden') {
                  var window_w = (document.body) ? document.body.clientWidth : window.innerWidth;
                  var cd = FindXY(button);
                  var h = button.offsetHeight;
                  var i = 0;
                  while (i < selectId.length) {
                      if (document.getElementById(selectId[i])) {
                          document.getElementById(selectId[i]).style.visibility = 'hidden'
                      }
                      i++
                  }
                  var sub = ((window_w - cd['x']) < 555) ? (555 - window_w + cd['x']) : 0;
                  div.style.visibility = 'visible';
                  div.style.width = 'auto';
                  div.style.left = (cd['x'] - sub) + 'px';
                  div.style.top = (cd['y'] + h) + 'px'
              } else {
                  div.style.visibility = 'hidden'
              }
          }
      </script>

    • Upanh.com

      Code:
      <script type="text/javascript">
          function display_upload_imageshack(button) {
              var container = document.getElementById('servimg_upload_gui');
              if (!document.getElementById('obj_servimg')) {
                  container.innerHTML = '<p><iframe src="http://www.upanh.com/iframe2.php?skin=green" width="440" height="120" target="_ifrupload" name ="_ifrupload" style="overflow-x: hidden;overflow-y: hidden;" frameborder="0"><p>Your browser does not support iframes.</p></iframe></p>'
              }
              var div = document.getElementById('servimg_upload_gui');
              var visible = div.style.visibility;
              if (visible == 'hidden') {
                  var window_w = (document.body) ? document.body.clientWidth : window.innerWidth;
                  var cd = FindXY(button);
                  var h = button.offsetHeight;
                  var i = 0;
                  while (i < selectId.length) {
                      if (document.getElementById(selectId[i])) {
                          document.getElementById(selectId[i]).style.visibility = 'hidden'
                      }
                      i++
                  }
                  var sub = ((window_w - cd['x']) < 555) ? (555 - window_w + cd['x']) : 0;
                  div.style.visibility = 'visible';
                  div.style.width = 'auto';
                  div.style.left = (cd['x'] - sub) + 'px';
                  div.style.top = (cd['y'] + h) + 'px'
              } else {
                  div.style.visibility = 'hidden'
              }
          }
      </script>

      (host Upanh sẽ bật 1 cửa số mới để lấy link chứ không lấy link trực tiếp trong frame được như Imageschip. Và theo kinh nghiệm sử dụng thì Upanh làm mất khá nhiều ảnh của người dùng, trong đó có mình)


(vui lòng ghi lại nguồn khi sử dụng bài viết này)
Việt K
      
DuyHung
DuyHung Xuất sắc

Cấp bậc: Xuất sắc

Giới tính : Nam

Bài viết : 1260

Danh vọng : 2272

Uy tín : 32

B1: Vào ACP >> Display >> Pictures and Colors >> Pics management >> mã mở rộng

B2 : Click Upload a picture, một cửa sổ hiện ra để upload ảnh.

B3 : View source cửa sổ mới mở đó (ctrl + U) , copy nguyên xi đoạn code

B4 : Vào Module Chuyển host upload ảnh trong khung viết bài 93149 Html Chuyển host upload ảnh trong khung viết bài 93149 tạo 1 cái mới và dán nguyên xi đoạn code vừa copy được.

Cuối cùng dùng y chang các bước ở post 1 nhưng thay khúc

Code:
http://www.imageschip.com/if1.php

trong

Code:
<script type="text/javascript">
    function display_upload_imageshack(button) {
        var container = document.getElementById('servimg_upload_gui');
        if (!document.getElementById('obj_servimg')) {
            container.innerHTML = '<p><iframe src="http://www.imageschip.com/if1.php" scrolling="no" allowtransparency="true" frameborder="0" width="500" height="132">Update your browser for Imageschip!</iframe></p>'
        }
        var div = document.getElementById('servimg_upload_gui');
        var visible = div.style.visibility;
        if (visible == 'hidden') {
            var window_w = (document.body) ? document.body.clientWidth : window.innerWidth;
            var cd = FindXY(button);
            var h = button.offsetHeight;
            var i = 0;
            while (i < selectId.length) {
                if (document.getElementById(selectId[i])) {
                    document.getElementById(selectId[i]).style.visibility = 'hidden'
                }
                i++
            }
            var sub = ((window_w - cd['x']) < 555) ? (555 - window_w + cd['x']) : 0;
            div.style.visibility = 'visible';
            div.style.width = 'auto';
            div.style.left = (cd['x'] - sub) + 'px';
            div.style.top = (cd['y'] + h) + 'px'
        } else {
            div.style.visibility = 'hidden'
        }
    }
</script>

Bằng cái link dẫn đến trang html vừa tạo. Ví dụ ilib.forumvi.com đã làm:

Code:
<script type="text/javascript">
    function display_upload_imageshack(button) {
        var container = document.getElementById('servimg_upload_gui');
        if (!document.getElementById('obj_servimg')) {
            container.innerHTML = '<p><iframe src="http://ilib.forumvi.com/h1-page" scrolling="no" allowtransparency="true" frameborder="0" width="500" height="300">Update your browser for ServImg!</iframe></p>'
        }
        var div = document.getElementById('servimg_upload_gui');
        var visible = div.style.visibility;
        if (visible == 'hidden') {
            var window_w = (document.body) ? document.body.clientWidth : window.innerWidth;
            var cd = FindXY(button);
            var h = button.offsetHeight;
            var i = 0;
            while (i < selectId.length) {
                if (document.getElementById(selectId[i])) {
                    document.getElementById(selectId[i]).style.visibility = 'hidden'
                }
                i++
            }
            var sub = ((window_w - cd['x']) < 555) ? (555 - window_w + cd['x']) : 0;
            div.style.visibility = 'visible';
            div.style.width = 'auto';
            div.style.left = (cd['x'] - sub) + 'px';
            div.style.top = (cd['y'] + h) + 'px'
        } else {
            div.style.visibility = 'hidden'
        }
    }
</script>
      

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang  Thông điệp [Trang 1 trong tổng số 1 trang]

Quyền hạn của bạn

Bạn không có quyền trả lời bài viết
free counters



  • Đoàn Ngọc Khánh

    mobile phone 098 376 5575


    Đỗ Quang Thảo

    mobile phone 090 301 9666


    Nguyễn Văn Của

    mobile phone 090 372 1401


    IP address signature
    Free forum | ©phpBB | Free forum support | Báo cáo lạm dụng | Thảo luận mới nhất