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]

#1Sun Sep 09, 2012 9:27 am

TuanAnh

TuanAnh



»†ổñg Quån «

Ý Tưởng Mới
Thường thì để thay đổi trạng thái (status):


Thì phải vào profile rồi chỉnh sửa

Để đơn giản hơn thì có thể sử dụng Tip này để làm công việc đó nhanh chóng.

Vào ACP-->Modules-->Forum widgets management-->Tạo một widget:

  • Use a table type : không(No)
    Widget source



Code:
<style>#navigationMenu li {
  list-style:none;
  height:39px;
  padding:2px;
  width:40px;
}
#navigationMenu span {
  /* Container properties */
  width:0;
  left:38px;
  padding:0;
  position:absolute;
  overflow:hidden;
  /* Text properties */
  font-family:'Myriad Pro', Arial, Helvetica, sans-serif;
  font-size:18px;
  font-weight:bold;
  letter-spacing:0.6px;
  white-space:nowrap;
  line-height:39px;
  /* CSS3 Transition: */
  -webkit-transition: 0.25s;
  /* Future proofing (these do not work yet): */
  -moz-transition: 0.25s;
  transition: 0.25s;
}
#navigationMenu a {
  background:url('http://i1202.photobucket.com/albums/bb362/tnpu_ilusm/Untitled-1-1.jpg') no-repeat;
  height:39px;
  width:38px;
  display:block;
  position:relative;
}
/* General hover styles */

#navigationMenu a:hover span {
  width:auto;
  padding:0 20px;
  overflow:visible;
}
#navigationMenu a:hover {
  text-decoration:none;
  /* CSS outer glow with the box-shadow property */
  -moz-box-shadow:0 0 5px #9ddff5;
  -webkit-box-shadow:0 0 5px #9ddff5;
  box-shadow:0 0 5px #9ddff5;
}
/* Blue Button */

#navigationMenu .about {
  background-position:-38px 0;
}
#navigationMenu .about:hover {
  background-position:-38px -39px;
}
#navigationMenu .about span {
  background-color:#1e8bb4;
  color:#223a44;
  text-shadow:1px 1px 0 #44a8d0;
}
/* The styles below are only needed for the demo page */

#main {
  margin:200px auto;
  position:fixed;
left:0px;
bottom:0px;
  width:40px;
}
</style><div id="main">
  <ul id="navigationMenu">
    <li> <a class="about" href="#status" onmouseover="saraaoi();showtip('Cập nhật Status ở đây một cách nhanh chóng.')" onmouseout="hidetip();"> <span>Status : <input size="20" id="mariaozawa" onfocus='fito();' onblur='fito();'/> <input type="button"  value="OK" class="mainoption" onclick="mariaozawa();" /><i id='luti' style="display:none;"'>  Waiting</i></div><div style="display:none;" id="anglea"></div></span> </a> </li>
  </ul>
</div>
<script>
var time = 1;

function saraaoi() {
  if (time <= 1) {
      jQuery.ajax({
        url: '/profile?mode=editprofile',
        success: function(ajax) {
            status = jQuery('#profile_field_13_-8', ajax).val();
            jQuery('#mariaozawa').val(status);
        }
      });
      time = time + 1;
      fito();
  };
};

function fito() {
  if (jQuery('#mariaozawa').val() == status) {
      jQuery('#mariaozawa').val('');
  }
  else if (jQuery('#mariaozawa').val() == '') {
      jQuery('#mariaozawa').val(status);
  };
};

function mariaozawa() {
  jQuery(document).ready(function() {
      jQuery('<span/>').load('/profile?mode=editprofile .page', function() {
        jQuery(this).appendTo('#anglea');
        jQuery('#profile_field_13_-8').val(jQuery('#mariaozawa').val());
        jQuery("#register .mainoption").click();
        jQuery('#luti').fadeIn(1500);
        jQuery('#luti').html('  Cập nhật thành công !')
        jQuery('#luti').fadeOut(1000);
        time = 1;
        jQuery('#anglea').empty();
      });
  });
}

</script>
<iframe name="register" height="0" width="0" frameborder="0"></iframe>

+Kiểm tra xem đã add widget chưa:

-Tìm id của status, nếu bạn đã biết rồi thì có thể click chuột phải vào cái ô bên chứa nội dung status thì có thể xem được id của nó, còn nếu bạn chưa biết thì làm như sau:
+Bạn cũng tạo 1 widget.
+Widget source:
Nếu bạn dùng phpbb2:

Code:
doctorThanh=jQuery("td:contains('Status')").next().children().attr("name");
prompt('Copy cái id bên dưới lại nhé', doctorThanh);

Nếu bạn dùng punbb:

Code:
doctorThanh=jQuery("dt:contains('Status')").next().children().attr("name");
prompt('Copy cái id bên dưới lại nhé', doctorThanh);

+Lưu widget lại rồi kiểm tra xem đã add widget chưa nhé.
Tìm trong widget tạo đầu tiên:
Code:
profile_field_13_-8

Thay tất cả lại bằng cái mà bạn vừa nhận được lúc nảy từ Bảng thông báo của trình duyệt. Xong

Trả lời trích dẫnTrả lời

#2Tue Mar 26, 2013 9:56 am

shinra123456

shinra123456



» Thàñh Vïêñ Mới

Ý Tưởng Mới
mình không làm được bạn à...không có chỗ đặt tên cho wiget

Trả lời trích dẫnTrả lời

#3Tue Mar 26, 2013 9:57 am

shinra123456

shinra123456



» Thàñh Vïêñ Mới

Ý Tưởng Mới
làm được rồi

Trả lời trích dẫnTrả lời

#4Tue Mar 26, 2013 2:24 pm

Dem0n

Dem0n



» Thàñh Vïêñ Mới

Ý Tưởng Mới
xem

Trả lời trích dẫnTrả lời

Sponsored content




Ý Tưởng Mới

Trả lời trích dẫnTrả lời

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]

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