MyBB Community Forums

Full Version: Newpoints
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,Is there a way so i can show number of newpoints on index?
i use this but nothing show up
{$points}
$lang->newpoints_richest_users}
if you want to display logged in user's newpoints then you can use {$user['newpoints']}

for the richest users, try using {$richest_users}
Dont work too.
I want to make a small user profile on index and show his avatar,name, reputation and newpoints
^ check if this works --> {$mybb->user['newpoints']}
that works. i will let you know when i finish my user bar

so i made this
<!-- BEGIN USEERBOX -->

<style>.mini-avatar { float:right; width:25px; height:25px; border-radius:100%; margin-left:5px; background: url('images/default_avatar.png') no-repeat; background-size: 100% auto; }
.mini-avatar img { width:25px; height:25px; border-radius:100%; }
.mini-avatar img[src=""] { display: none; }</style>


<table width="100%" cellpadding="5" cellspacing="0" class="tborder">
<tbody><tr>
<td class="trow1 no_bottom_border" style="background-color:#202020 !Important;" colspan="3">
<img class="head-avatar-new" src="{$mybb->user['avatar']}" alt="avatar" title="{$mybb->user['username']}" style="width: 55px; height: 55px; vertical-align: middle; margin: -2px 10px 0 0; border-radius: 4px;">
<span class="largetext"> <span><a data-uid="649171" data-class="profile_url" data-link="profilecard.php?action=profilecard&amp;uid=649171" href="member.php?action=profile&amp;uid={$mybb->user['uid']}" data-hasqtip="0"> {$mybb->user['username']}</a>
</span><span class="float_right latest-replies credits"><i class="fas fa-coins credit_icon"></i> {$mybb->user['newpoints']}</span>
<br>
</span></td>
</tr>
<tr>
<td class="trow1 no_bottom_border" width="33%" valign="middle" align="center"><span class=" largetext">NUM</span><br><span class="x-smalltext">Reputation</span></td>
<td class="trow1 no_bottom_border" width="33%" valign="middle" align="center"><span class=" largetext">{$mybb->user['threadnum']}</span><br><span class="x-smalltext">Threads</span></td>
<td class="trow1 no_bottom_border" width="33%" valign="middle" align="center"><span class=" largetext">{$mybb->user['postnum']}</span><br><span class="x-smalltext">Posts</span></td>
</tr>


</tbody></table>
	</div>
<!-- END USEERBOX -->

i have two problem
1)how to show number of repuptation on index
1) how to hide it from guest
logged in user's reputation --> {$mybb->user['reputation']}

if you do not want to display content to guests then
generally followed method is to use template conditional

after installing template conditionals plugin you can wrap the content with
<if $mybb->user['usergroup'] != 1 then> at the beginning of the content
AND
</if> at the end of the content
thank you Smile that how it looks like now
[Image: 68747470733a2f2f616e6f6e73686172652e6575...706e67.png]
(2020-02-16, 01:02 PM)Mastersly Wrote: [ -> ]thank you Smile that how it looks like now
[Image: 68747470733a2f2f616e6f6e73686172652e6575...706e67.png]

Hi bro,

can you please provide a link of new working NewPoints 2.0 in this 2020 ?
^ NewPoints plugin's latest available version is 2.1.1.
this latest version & previous versions available here => Link
(2020-02-15, 03:03 PM).m. Wrote: [ -> ]^ check if this works --> {$mybb->user['newpoints']}
It work well but I would like to display {$richest_users} at newpoints_home and how can I do?