Quên mật khẩu
 Register
Xem: 3646|Trả lời: 0

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

[Sao chép liên kết]
Đăng vào 21-2-2009 22:54:51 | Hiển thị tất cả tầng |Chế độ đọc
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 cần đăng nhập để trả lời Đăng nhập | Register

Quy tắc tích điểm trong diễn đàn này

Archiver|Mobile|Youtube|Facebook|Twitter|Contact|Netdepviet.org

GMT+7, 29-9-2024 08:07 AM , Processed in 0.018364 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team

Trả lời nhanh Lên đầu trang Quay lại danh sách