View Full Version : [Ý tưởng] Ẩn hiện Profile thành viên
t8mclub
19-06-2011, 02:48 PM
Có bạn nào ẩn hiện được profile thành viên không nhỉ.
Chủ yếu của cái này là để trang web gọn hơn khi bài viết quá ngắn.
PhucSD
19-06-2011, 05:08 PM
Cài này em nhớ hình như có mod hay templete gì đó, chả nhớ nữa
Thảo Nguyên
19-06-2011, 05:10 PM
có cái này thì hay:MatCuoi (1):
t8mclub
19-06-2011, 05:49 PM
Cài này em nhớ hình như có mod hay templete gì đó, chả nhớ nữa
Cố nhớ thử em...
:MatCuoi (1):
thevinh97
11-08-2011, 10:36 PM
http://www.congdongpro.com/@forum/f144/dong-khung-thong-tin-thanh-vien-n-hien-1726/#post15483
Có share rồi mà bác \m/
Lúc trước mình củng có ý tưởng này nhưng tìm mãi không thấy ai share nên tự ngồi code luôn :D :MatCuoi (9):
Tiểu Bá Vương 1404
11-08-2011, 11:08 PM
Sử dụng chức năng collapse có sẵn của vBulletin để thu gọn.
---
Có thể sử dụng DBTech - Postbit Tabs.
HTT.itvn
12-08-2011, 12:10 AM
Code này chính là code HTML Ẩn/Hiện thôi . Code có dạng như thế này :
<div style="margin:0px 0px 0px 0px"> <input type="button" value="Thông tin thành viên" style="width:100%;font-size:10px;margin:0px;padding:5px;background-color:#fff;color:red;
border:1px solid green; "
onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '')
{
this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = '';
this.innerText = ''; this.value = 'Ẩn thông tin thành viên';
}
else
{
this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none';
this.innerText = '';
this.value = 'Hiện thông tin thành viên'; }">
<div style="margin: 0px; padding: 0px; border: 0px inset;">
<div style="display: none;">
{ CODE THÔNG TIN THÀNH VIÊN Ở ĐÂY }
</div>
</div>
</div>
Anh hướng dẫn chèn vào thông qua style mặc định nhé .
Vào AdminCP >> Styles & Templates >> Style Manager >> Chọn style >> Edit Templates >> Postbit Tempaltes >> postbit_legacy , tìm code thông tin thành viên :
<dl class="userinfo_extra"> <vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if>
<vb:if condition="$post['field2']"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></vb:if>
<vb:if condition="$post['age']"><dt>{vb:rawphrase age}</dt> <dd>{vb:raw post.age}</dd></vb:if>
<dt>{vb:rawphrase 'posts'}</dt> <dd>{vb:raw post.posts}</dd>
{vb:raw template_hook.postbit_userinfo_right_after_posts}
</dl>
Các bạn chèn code Ẩn / Hiện như sau :
<dl class="userinfo_extra">
<div style="margin:0px 0px 0px 0px"> <input type="button" value="Thông tin thành viên" style="width:100%;font-size:10px;margin:0px;padding:5px;background-color:#fff;color:red;border:1px solid green; "
onclick="if (this.parentNode.parentNode.getElementsByTagName(' div')[1].getElementsByTagName('div')[0].style.display != '')
{
this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = '';
this.innerText = ''; this.value = 'Ẩn thông tin thành viên';
}
else
{
this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none';
this.innerText = '';
this.value = 'Hiện thông tin thành viên'; }">
<div style="margin: 0px; padding: 0px; border: 0px inset;">
<div style="display: none;">
<vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if>
<vb:if condition="$post['field2']"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></vb:if>
<vb:if condition="$post['age']"><dt>{vb:rawphrase age}</dt> <dd>{vb:raw post.age}</dd></vb:if>
<dt>{vb:rawphrase 'posts'}</dt> <dd>{vb:raw post.posts}</dd>
</div>
</div>
</div>
{vb:raw template_hook.postbit_userinfo_right_after_posts}
</dl>
Dòng đỏ đậm là code CSS , các bạn có thể tùy chỉnh cho phù hợp với forum nhé .
Chú ý : Demo trên là demo cho style mặc định , mỗi forum có thông tin thành viên khác nhau , các bạn chú ý linh động với dòng màu xanh nhé .
t8mclub
13-08-2011, 02:51 AM
Quá ngon, em đã thành công. Cảm ơn anh.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.