Styles 2x Thêm button yêu cầu Like để download Resource bằng code

thahtrung06

Moderator
Thành viên BQT
Tham gia
12/11/2019
Bài viết
1,095
Được Like
450
Hôm nay, mình giới thiệu với các bạn cách thêm button yêu cầu Like để download Resource bằng code ngắn và đơn giản.
Lưu ý:
1. Button này chỉ mang tính chất làm rõ hơn yêu cầu bạn muốn đưa ra đối với thành viên là phải Like để download Resource.
2. Button này chỉ hiển thị ở trang Tổng quan, ko hiển thị ở các trang còn lại.

Đầu tiên, các bạn mở mẫu xfrm_resource_view và tìm đến dòng <div class="block-outer"> và chèn đoạn mã sau:
Mã:
<!-- This is place to write the code for XFRM information-->
            <div align="center">
            <div class="button"><i class="fas fa-smile"></i> You must click like in order to download this resource.
            <div class="button"><i class="fas fa-download"></i> You can download 20 resources per day.
                </div></div></div>
            <!-- End of placement for code for XFRM Information -->
Sau đó, mở file Extra.less và thêm mã sau:
Mã:
.button {
  background-color: #008CBA; /* Light Blue */
  border-radius: 12px;
  border: none;
  color: white;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
}
Thu được kết quả sau:
button-like39a76884b3f0488c.png

Dưới đây là một tùy biến khác của mã trên:
Tùy biến 1:

button-1.png

Tùy biến 2:

button-2.png
 
Sửa lần cuối:

pakgoal

Private
Tham gia
30/12/2015
Bài viết
13
Được Like
6
Screenshot_7.png



i followed your directions you given above but give error disorder the fonts
 

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

XenForo 1 XenForo 2
Translate by PVS

Dịch vụ XenForo của VNXF

Mr. Tuấn

Mobile/Zalo: 0988 488 096

Telegram: bluekpro

Email: [email protected]

Nhà Tài Trợ

Mút Xốp Không Gian
pallet Thịnh Phát
Top Bottom