MyBB-Plugins Forums

Full Version: Number of Points in Shop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I searched already, and yes, I read you can't add the variable to show the number of NewPoints on header, etc. But I'm trying to add text to the shop page where you purchase items that will show the number of points the user has before buying an item. I'm confused as to why this isn't there already since a lot of people would like to know how many points they have before buying something, and if they can't remember or didn't look they'll have to go back a few pages to check.

So is there any way to do this on the shop page, and if so, how? Thanks.
It can be done the same way it is done in the header Smile
I thought it couldn't be done in the header?
It can, do a bit of search please, it's been posted numerous times.
Okay, my apologies, I thought you said it wasn't possible elsewhere but I was mistaken.

<a href="{$mybb->settings['bburl']}/newpoints.php">{$mybb->settings['newpoints_main_curprefix']}{$mybb->user['newpoints']}{$mybb->settings['newpoints_main_cursuffix']}</</a>

That worked fine. Perhaps you should create a sticky for the solution since it is asked often. It's just a real shame there's no simple way to remove the decimals from the points or convert it to an integer. But it isn't a major problem I guess! I also notice it displays the amount of money properly in Game Section but I assume this is something to do with "hooks".
In the Game Section, if you're using the NP GS plugin I made then yes it's because of the hook.

And yes you're right about the sticky. I should make a F.A.Q. thread.