时间:2021-07-01 10:21:17 帮助过:36人阅读
\source\module\forum\forum_index.php
在这个页面中添加如下代码,在模板 discuz.htm 中直接调用就可以了
//威望,金钱 之类的可直接调用echo "";print_r($_G['setting']['extcredits']);echo "";//当前用户的 主题信息列表$threadList = C::t('forum_thread')->fetch_all_by_authorid_displayorder($_G['uid']);echo "";print_r($threadList);echo "";
\source\module\forum\forum_index.php
在这个页面中添加如下代码,在模板 discuz.htm 中直接调用就可以了
//威望,金钱 之类的可直接调用echo "";print_r($_G['setting']['extcredits']);echo "";//当前用户的 主题信息列表$threadList = C::t('forum_thread')->fetch_all_by_authorid_displayorder($_G['uid']);echo "";print_r($threadList);echo "";
怎么不行
怎么不行
//威望,金钱 之类的可直接调用foreach($_G['setting']['extcredits'] as $extcreditid=>$v){ //num 就是你要显示的值 $_G['setting']['extcredits'][$extcreditid]['num'] = getuserprofile('extcredits'.$extcreditid);}print_r($_G['setting']['extcredits']);
//威望,金钱 之类的可直接调用foreach($_G['setting']['extcredits'] as $extcreditid=>$v){ //num 就是你要显示的值 $_G['setting']['extcredits'][$extcreditid]['num'] = getuserprofile('extcredits'.$extcreditid);}print_r($_G['setting']['extcredits']);
数据都显示出来了,你循环啊
$extcredits['title'] - $extcredits['num']
威望 - 0
金钱 - 25
贡献 - 0
数据都显示出来了,你循环啊
$extcredits['title'] - $extcredits['num']
威望 - 0
金钱 - 25
贡献 - 0
数据都显示出来了,你循环啊
$extcredits['title'] - $extcredits['num']
威望 - 0
金钱 - 25
贡献 - 0
$_G['setting']['extcredits'][1]['num']
$_G['setting']['extcredits'][2]['num']
...
$_G['setting']['extcredits'][1]['num']
$_G['setting']['extcredits'][2]['num']
...
那你就把输出的地方去掉,print_r
你该多看看手册
你该多看看手册