Nét Đẹp Việt Nam

 Quên mật khẩu
 Register
Xem: 3419|Trả lời: 0
In Chủ đề trước Tiếp theo

[Dz 7.0] Hiển thị postrank trong bài viết

[Lấy địa chỉ]
Nhảy đến trang chỉ định
1#
Source: http://www.discuz.net/viewthread.php?tid=1221908
Demo

File cần sửa: 02 (viewthread.php ; templates/default/viewthread_note.htm)
#01: mở file viewthread.php
tìm
  1. if($_DCACHE['usergroups'][$post['groupid']]['userstatusby'] == 1) {
  2. $post['authortitle'] = $_DCACHE['usergroups'][$post['groupid']]['grouptitle'];
  3. $post['stars'] = $_DCACHE['usergroups'][$post['groupid']]['stars'];
  4. } elseif($_DCACHE['usergroups'][$post['groupid']]['userstatusby'] == 2) {
  5. foreach($_DCACHE['ranks'] as $rank) {
  6. if($post['posts'] > $rank['postshigher']) {
  7. $post['authortitle'] = $rank['ranktitle'];
  8. $post['stars'] = $rank['stars'];
  9. break;
  10. }
  11. }
  12. }
Sao chép mã
Thay bằng
  1. //Start display Post-rank edited (c) Vic.0
  2. $post['authortitle'] = $_DCACHE['usergroups'][$post['groupid']]['grouptitle'];
  3. $post['stars'] = $_DCACHE['usergroups'][$post['groupid']]['stars'];
  4. foreach($_DCACHE['ranks'] as $rank)
  5. {
  6. if($post['posts'] > $rank['postshigher'])
  7. {
  8. $post['authortitle'] = $rank['ranktitle'];
  9. $post['stars'] = $rank['stars'];
  10. break;
  11. }
  12. }
  13. //end Post-rank (c) Vic.0
Sao chép mã
#02: Mở file templates/default/viewthread_note.htm
Tìm
  1. <p><em>$post[authortitle]</em></p>
Sao chép mã
Thêm ngay bên dưới
  1. <!--Start Show PostRank(c) Vic.0 @netdepviet.org !-->  
  2. <p><em>$post[authortitle1]</em></p>
  3. <p>{eval showstars($post['stars1']);}</p>
  4. <!--End Show PostRank(c) Vic.0 @netdepviet.org !-->
Sao chép mã
03. Update Cache & Done
Bạn phải đăng nhập mới được đăng bài Đăng nhập | Register

Quy tắc điểm

Phòng tối|iPhone|Archiver|G+|Youtube|Facebook|Twitter|Contact| Netdepviet.org

GMT+7, 20-4-2024 09:01 PM , Processed in 0.014176 second(s), 16 queries .

Powered by Discuz! X3.2

© 2006 Made with in Hanoi,Vietnam and Contents are published by all members

Trả lời nhanh Lên trên Trở lại danh sách