Display a Message to Guests : hiện thị 1 hộp thông báo nhỏ cuối góc phải

nttruong

MasterCorporal
Tham gia
25/02/2015
Bài viết
368
Được Like
614
Đại khái là như hình minh họa dưới cho dễ hiểu:

540d994a8c2be.jpg



Nguồn: https://xenforo.com/community/resources/display-a-message-to-guests.650/

Hey everyone. :)

Have you ever wanted a way to display to your guests that they are not signed in? Well, I bring you my first template change to XenForo. Its pretty simple, and effective.

It displays a little red box to the bottom right of you forum for guests, and you can change what it says. :)

Tutorial:

Add this to the bottom of footer

Mã:
<xen:if is="!{$visitor.user_id}">
<div id='stickymsg'>
<p class='bbc_center'>You're Not Signed In</p>
<p class='bbc_center'>You are currently not signed in. If you are already a registered user you can <a href='http://www.xenforo.com/index.php?login/'>login here</a>. If not, you can register and gain access to our wonderful forums, view topics, make posts, and more! So if
your not already a user, you can register by <a href='http://www.xenforo.com/index.php?register/'>clicking here</a>.</p>
</div>
</xen:if>

**Replace 'http://www.xenforo.com' with your domain!**

Now add this to footer.css

Mã:
#stickymsg{
position: fixed;
bottom: 10px;
line-height: 16px;
right: 10px;
z-index: 30000;
opacity: 0.8;
width: 260px;
height: auto;
background: #cf3737;
color: #fff;
text-shadow: rgba(0,0,0,0.3) 0px -1px 0px;
padding: 10px;
text-decoration: none;
font-size: 11px;
font-family: Tahoma;
border: 1px solid #771b1b;
box-shadow: rgba(0,0,0,0.3) 0px 1px 4px, inset #f66c6c 0px 1px 0px;
border-radius: 3px;
}
#stickymsg a{ color: #fff; font-weight:bold; text-decoration: none; }
#stickymsg:hover{ opacity: 1; }

Now after this, if you sign out and view your forum as a guest, you will see this in the bottom right corner:
And your done. If not, check the coding. :)

Hope you guys enjoy, this resource is brought to you by Fluttershy!
 
  • Like
Reactions: THB

Jindo_Katori

FirstSergeant
Tham gia
01/03/2015
Bài viết
1,454
Được Like
1,193
Bạn nào chưa biết thì sửa lại chỗ bôi đậm phù hợp với 4r của mình nhé

<xen:if is="!{$visitor.user_id}"> <div id='stickymsg'> <p class='bbc_center'>You're Not Signed In</p> <p class='bbc_center'>You are currently not signed in. If you are already a registered user you can <a href='http://www.xenforo.com/index.php?login/'>login here</a>. If not, you can register and gain access to our wonderful forums, view topics, make posts, and more! So if your not already a user, you can register by <a href='http://www.xenforo.com/index.php?register/'>clicking here</a>.</p> </div> </xen:if>

Tiếng việt thì sao nhỉ?
hướng dẫn làm cái popup luôn đi anh.
Em cũng đang hóng cái popup này nè
 
  • Like
Reactions: THB

Jindo_Katori

FirstSergeant
Tham gia
01/03/2015
Bài viết
1,454
Được Like
1,193
Còn bạn có thông báo mới như fb thì sao nhỉ
 
  • Like
Reactions: THB

Hướng dẫn sử dụng

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mobile/Zalo: 0906081284

Telegram: anhanhxf

Chỉ nhận web nội dung lành mạnh

Nhà Tài Trợ

Mút Xốp Không Gian
Mút Sofa Không Gian
Top Bottom