Hello everyone ;
I am having a big problem about understanding how can i display information in miniprofile.
(https://i.hizliresim.com/XXXXDk.png)
// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';
// Show counter data. (just copy paste )
if (!isset($context['disabled_fields']['counter']))
echo '
<li class="countercount">', $txt['member_countercount'], ': ', $message['member']['counter'], '</li>';
I need to know where should i go and edit neccesary variable like $context['disabled_fields']['counter']
i have my data in smf_members, counter . what should i do to use ['member']['counter'] ? something big is missing.
Please help me about this
Ummm.... what is the counter and how does it get populated?
Are you sure it is in the members database table?
You would have to edit more than just the template, since the databases information is pulled into the arrays in the sources files... and context, in this case, is only filled with the board/forum options/settings and the current user data... not the poster's data... that's a very different variable array and is filled in different source files, depending on how, where, when, it is used...
Here is my variable Kindrey
(https://i.hizliresim.com/Lnn8YZ.png)
Quote from: Kindred on July 08, 2017, 10:39:37 AM
You would have to edit more than just the template, since the databases information is pulled into the arrays in the sources files... and context, in this case, is only filled with the board/forum options/settings and the current user data... not the poster's data...
Could you simply guide me about neccessary steps please?
Edit: I need to achive something like this...
$message['member']['counter'],
We are already using it for posts as
Quote$message['member']['posts']
,
and both values are declared in smf_members
I can access that variable in php block just like this:
$sql = "SELECT 'sayac' FROM `smf_members` WHERE`smf_members`.`id_member` =$id";