MyBB Community Forums

Full Version: Trying to get newpoints to show on postbit.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello and thank you for taking the time to lend a hand! Your help is very much appreciated! Smile

The problem:
We're experiencing a problem with Newpoints displaying items in the postbit. What we want is for items to appear below the "marks" line that is displayed by hovering over the avatar, however this is not working.

Live example of the problem: https://errocanta.soul-bound.com/showthr...109#pid109

Things we have tried so far to fix the problem:
1. Deactivate and reactivate the Newpoints plugin.
2. Cross-referenced our variables with other MyBB sites where the inventory is being correctly displayed to make sure that the correct variables were being used.
3. Checked on the default theme vs. the Broken Spells theme, to see if it might have been an issue related only to one theme; however, the inventory is not displayed on the default theme, either.
4. Tried reconstruct templates in the Newpoints maintenance panel.

None of these things have worked.

What we think the problem is:
After trying all of these things, it seems that the {$post['newpoints_shop_items']} variable in the newpoints_postbit template is not functioning correctly. When the corresponding template is edited even with just plain text inserted, nothing appears. Using inspect element, we can see which templates the HTML is being called up from- however there is no sign of the newpoints_shop_postbit template there. It would seem as though something is missing- the {$post['newpoints_shop_items']} variable is not calling up the content of the corresponding template. If this is the case, then we don't know how to fix it.

You can see images illustrating the problem here: http://imgur.com/a/HsGMl

Our codes:
newpoints_postbit template
<div class="mp-field">
	{$points}
	<div class="mp-field-title">
		Marks
	</div>
</div>

{$post['newpoints_shop_items']}

newpoints_shop_postbit template
{$shop_items}
HEY HEY YOU YOU
(The 'HEY HEY YOU YOU' is what I mentioned above- the plain text just to see if even that would show up, which it doesn't.)

postbit_classic & postbit templates
{$ignore_bit}{$deleted_bit}
<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
<div class="post classic {$unapproved_shade}" style="{$post_visibility}" id="post_{$post['pid']}">
	
	<table width="100%" cellspacing="0" cellpadding="0">
		<tr>
			<td valign="top" width="220">
				
				<div class="mp-container" style="background:url({$useravatar['image']});">
					<div class="mp-content">
						<h1>Quick Info.
							<a href="{$post['fid15']}" title="Application" alt="Application">
								<i class="material-icons mp-header-icons">account_circle</i>
							</a>
							<a href="{$post['fid14']}" title="Tracker" alt="Tracker">
								<i class="material-icons mp-header-icons">explore</i>
							</a>
						</h1>
						<div class="mp-holder">
							<div class="mp-field">
								{$post['fid5']}
								<div class="mp-field-title">
									clan
								</div>
							</div>
							<div class="mp-field">
								{$post['fid6']} years old
								<div class="mp-field-title">
									age
								</div>
							</div>
							<div class="mp-field">
								{$post['fid7']}
								<div class="mp-field-title">
									Dragon
								</div>
							</div>
							<div class="mp-field">
								{$post['postnum']}
								<div class="mp-field-title">
									posts
								</div>
							</div>
							<div class="mp-field" style="border-bottom: 0px; padding-bottom: 0px;">
								{$post['fid13']}
							<div class="mp-field-title">
								player
								</div>
							</div>
						</div>
						
						<h1>Items.
							<a href="{$mybb->settings['bburl']}/newpoints.php" title="Donate to user" alt="Donate to user">
								<i class="material-icons mp-header-icons">redeem</i>
							</a>
							<a href="{$mybb->settings['bburl']}/newpoints.php?action=shop&amp;shop_action=myitems&amp;uid={$post['uid']}" title="View all items" alt="View all items">
								<i class="material-icons mp-header-icons">shopping_basket</i>
							</a>
						</h1>
						<div class="mp-holder mp-scroll">
							{$post['newpoints_postbit']}
						</div>
					</div>
				</div>
				<div class="mp-username">
					{$post['profilelink']}
				</div>
			</td>
			<td valign="top">
				<div class="post_content">
					<div class="post_head">
						{$post['posturl']}
						{$post['icon']}
						<span class="post_date">{$post['postdate']} <span class="post_edit" id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></span>
					{$post['subject_extra']}
					</div>
					<div class="post_controls">
					<div class="postbit_buttons author_buttons float_left">
						{$post['button_pm']}{$post['button_find']}
					</div>
					<div class="postbit_buttons post_management_buttons float_right">
						{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quickrestore']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_purgespammer']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
					</div>
				</div>
					<div class="post_body scaleimages" id="pid_{$post['pid']}">
						{$post['message']}
					</div>
					{$post['attachments']}
					{$post['signature']}
					<div class="post_meta" id="post_meta_{$post['pid']}">
						{$post['iplogged']}
					</div>
				</div>
				
			</td>
		</tr>
	</table>
	
</div>

Thank you again for taking the time to look our issue over! Smile Does anyone have any ideas on how to fix it?
test user account is required so that someone can check referred live example url.
{note : I might not be able to check it right now. some other helper might check it}

moreover, given forum url is different from the screenshot's forum url.
Test account:

Testaccount
Password is Errocanta

The screenshot has my forum previewed beneath the example. A link to my site is included on the editor's box just above the red information text.

Origin is merely used as an example as I staff the site, and I did not feel like using a different site that I was not a part of as an example as to where I've seen it elsewhere.