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:
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
**Replace 'http://www.xenforo.com' with your domain!**
Now add this to footer.css
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!
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!
Bài viết liên quan
Bài viết mới