How to call the current user's subject, points and other information in Discuz discuz.htm
Currently known only: $_g[' member '][credits] is the current user's integral
Reply to discussion (solution)
\source\module\forum\forum_index.php
Add the following code to this page, which can be called directly in the template discuz.htm.
Prestige, money and the like can call Echo directly "";p Rint_r ($_g[' setting '] [' extcredits ']); echo"
";///Current user's topic information list $threadlist = C::t (' Forum_thread ')->fetch_all_by_authorid_displayorder ($_g[' uid ']); echo"";p Rint_r ($threadList); echo"
";
\source\module\forum\forum_index.php
Add the following code to this page, which can be called directly in the template discuz.htm.
Prestige, money and the like can call Echo directly "";p Rint_r ($_g[' setting '] [' extcredits ']); echo"
";///Current user's topic information list $threadlist = C::t (' Forum_thread ')->fetch_all_by_authorid_displayorder ($_g[' uid ']); echo"";p Rint_r ($threadList); echo"
";
I can't.
Why not?
Why not?
and the output value of the call variable output is empty.
Prestige, money, and the like. You can call foreach directly ($_g[' setting ' [' extcredits '] as $extcreditid = =) {//num is the value you want to display $_g[' setting '] [' Extcredits ' [$extcreditid] [' num '] = getuserprofile (' extcredits '. $extcreditid);} Print_r ($_g[' setting ' [' extcredits ']);
Array
(
[1] = = Array
(
[img] =
[Title] = Prestige
[Unit] =
[ratio] = 0
[Showinthread] =
[Allowexchangein] =
[Allowexchangeout] =
[num] = 0
)
[2] = = Array
(
[img] =
[Title] = Money
[Unit] =
[ratio] = 0
[Showinthread] =
[Allowexchangein] =
[Allowexchangeout] =
[num] = 25
)
[3] = = Array
(
[img] =
[Title] = contribution
[Unit] =
[ratio] = 0
[Showinthread] =
[Allowexchangein] =
[Allowexchangeout] =
[num] = 0
)
)
Prestige, money, and the like. You can call foreach directly ($_g[' setting ' [' extcredits '] as $extcreditid = =) {//num is the value you want to display $_g[' setting '] [' Extcredits ' [$extcreditid] [' num '] = getuserprofile (' extcredits '. $extcreditid);} Print_r ($_g[' setting ' [' extcredits ']);
Array
(
[1] = = Array
(
[img] =
[Title] = Prestige
[Unit] =
[ratio] = 0
[Showinthread] =
[Allowexchangein] =
[Allowexchangeout] =
[num] = 0
)
[2] = = Array
(
[img] =
[Title] = Money
[Unit] =
[ratio] = 0
[Showinthread] =
[Allowexchangein] =
[Allowexchangeout] =
[num] = 25
)
[3] = = Array
(
[img] =
[Title] = contribution
[Unit] =
[ratio] = 0
[Showinthread] =
[Allowexchangein] =
[Allowexchangeout] =
[num] = 0
)
)
What about the variables in that template? is $_g[' setting ' [' extcredits '][1]? Display value is empty
The data is showing, you loop.
$extcredits [' title ']-$extcredits [' Num ']
Prestige-0
Money-25
Contribution-0
The data is showing, you loop.
$extcredits [' title ']-$extcredits [' Num ']
Prestige-0
Money-25
Contribution-0
I want to call each item separately. Because there is a label for each item.
The data is showing, you loop.
$extcredits [' title ']-$extcredits [' Num ']
Prestige-0
Money-25
Contribution-0
And the code overflows, and the contents of the head tag are spilled into the body tag.
$_g[' Setting ' [' extcredits '][1][' num ']
$_g[' Setting ' [' extcredits '][2][' num ']
...
$_g[' Setting ' [' extcredits '][1][' num ']
$_g[' Setting ' [' extcredits '][2][' num ']
...
The call came out, but the code overflowed
Then you get rid of the output, Print_r.
You should read more manuals.
You should read more manuals.