SMFHacks.com

Downloads System Pro => Support => Topic started by: pasqualino77 on July 13, 2015, 03:20:08 pm

Title: Show credit in profile member
Post by: pasqualino77 on July 13, 2015, 03:20:08 pm
I don't see a credit in profile member
Title: Re: Show credit in profile member
Post by: SMFHacks on July 13, 2015, 03:31:55 pm
Credits are not shown in a members profile.
Title: Re: Show credit in profile member
Post by: pasqualino77 on July 13, 2015, 03:50:18 pm
it's not possible?
Title: Re: Show credit in profile member
Post by: SMFHacks on July 13, 2015, 04:11:40 pm
Possible but would need to be hand coded.
Title: Re: Show credit in profile member
Post by: pasqualino77 on July 14, 2015, 04:26:49 am
ok but i have 13 000 user

i can't serch for a single user.

How do I know the credtis that has a user ? Through phpmyadmi ?
Title: Re: Show credit in profile member
Post by: pasqualino77 on July 14, 2015, 02:07:10 pm
ok tell me

write the correct procedure
Title: Re: Show credit in profile member
Post by: pasqualino77 on July 15, 2015, 12:37:59 pm
please it's very important
Title: Re: Show credit in profile member
Post by: SMFHacks on July 15, 2015, 01:52:21 pm
You would need to search though phpadmin at the moment by their memberid or username.
Title: Re: Show credit in profile member
Post by: pasqualino77 on July 16, 2015, 03:07:25 am
I have 14,000 users and 30 moderators. We can not use phpmyadmin. I can use phpmyadmin but only me.

I can give user and password (phpmyadmin) at 30 user.

I see the template ...

are this the code?

<td align="center">', $txt['download_current_credits'],(Downloads_IsUnlimitedCreditsMember() == true ? $txt['downloads_txt_unlimited_credits']  : Downloads_getMembersCredits($user_info['id'])), '</td>

Title: Re: Show credit in profile member
Post by: Diego Andrés on July 16, 2015, 10:17:42 am
Just add the code to Load.php and it will become available to use it.
Code: (Find) [Select]
'last_login' => empty($user_settings['last_login']) ? 0 : $user_settings['last_login'],
Code: (Add after) [Select]
'downpro_credits' => empty($user_settings['downpro_credits']) ? 0 : $user_settings['downpro_credits'],
This step you'll have to do it three times
Code: (Find) [Select]
mem.posts, mem.last_login,
Code: (Replace) [Select]
mem.posts, mem.last_login, mem.downpro_credits,
Code: (Find) [Select]
'last_login_timestamp' => empty($profile['last_login']) ? 0 : forum_time(0, $profile['last_login']),
Code: (Add after) [Select]
'downpro_credits' => $profile['downpro_credits'],
And done!

Now you can use it in profile page. (Profile.template.php
e.g.
Code: (Find) [Select]
if (!empty($context['member']['blurb']))
echo '
<dt>', $txt['personal_text'], ': </dt>
<dd>', $context['member']['blurb'], '</dd>';
Code: (Add After) [Select]
echo '
<dt>Credits: </dt>
<dd>', $context['member']['downpro_credits'], '</dd>';

You can show them in posts also, if you want...

Regards  ;)
Title: Re: Show credit in profile member
Post by: Diego Andrés on July 16, 2015, 10:18:44 am
Also, on credits system page, you have a users list and you can order it by name, credits, etc.
Title: Re: Show credit in profile member
Post by: pasqualino77 on July 16, 2015, 11:18:54 am
wow ... beautiful reply :-)

very very good .. thanks