Nét Đẹp Việt Nam

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

[Req] Hiển thị post rank cùng dòng Usergroup (done)

[Lấy địa chỉ]
Nhảy đến trang chỉ định
1#
Mình đang dùng bản discuz 7.0, mình muốn hiển thị dòng post rank ra ngoài giống như User Group

chỉ mình với, thanks

Admin

UID    1
Thread    94
Danh vọng    432  
Tiền    432  
Joined    18-2-2009


Thành
Admin
Bước Chân Giang Hồ
UID    1
Thread    94
Danh vọng    432  
Tiền    432  
Joined    18-2-2009


Demo : http://cafenang.com

[ Bài viết này được ncp001 chỉnh sửa vào lúc 2009-2-21 05:13 PM  ]
2#
Đăng lúc 21-2-2009 22:36:48 | Chỉ xem của tác giả

Hiển thị Rank cùng vởi Group

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
----------------
P/S:
các bạn muốn hỏi gì thì cứ gửi bài yêu cầu,nếu làm được sẽ reply lại ngay ko được thì :D
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 08:29 AM , Processed in 0.012901 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