View: 3906|Reply: 0

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

[Copy link]
Posted on 21-2-2009 22:54:51 | Show all floors |Reading mode
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. }
Copy code
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
Copy code
#02: Mở file templates/default/viewthread_note.htm
Tìm
  1. <p><em>$post[authortitle]</em></p>
Copy code
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 !-->
Copy code
03. Update Cache & Done
You need to log in to reply. Login | Register

Points Rules for This Section

Theo dõi bản tin
Archiver|Mobile|Facebook|Contact|Netdepviet.org

Giữ gìn bản sắc dân tộc · Trân trọng quá khứ, hướng tới tương lai。

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

InThis boardPost
Kết nối Zalo
Back to top