account upgrade link receives error

Diana

Active member
Ever since I moved my test site I'm encountering some glitches.

The "account upgrade" link in the navbar returns an error page.

forum/account/upgrades

Also, unregistered users get a "sign up" page.
 
I have your forum URL from a previous PM. I just had a look. I see two problems:

1) The Account Upgrades tab in the navbar links to index.php?login/ for guests. This is probably in your navigation template.

2) When logged in the link is correct, but it uses a friendly URL while the rest of the forum does not. The link must be hard-coded in the navigation template. You should use xen:link to create the hyperlink, that way it obeys the friendly URL setting in the options. This thread provides exact code for an Account Upgrades link in the navbar:

http://xenforo.com/community/threads/how-to-add-a-new-tab-in-the-navbar.7781/
 
Thanks Jake for going to the trouble of checking this out. Not sure I grasp what a "friendly URL" is or how this changed
from moving the forum from the test site, but I'll try to follow the directions in the link you gave.
 
Code:
<li class="navTab upgrade PopupClosed">
                <a href="{xen:link account/upgrades}" class="navLink">{xen:phrase account_upgrades}</a>
            </li>

That works. All it needed was the xen:link and brackets. Brilliant! ;)

Couple of remaining question:
  1. What would "No account upgrades can be purchased at this time. Please check back later" mean to registered members who are not xenforo customers?
  2. And can the "upgrade" link be disabled for unregistered users since that just takes them to a "sign up" page?
 
1) That means no upgrades are available for purchase. That will be the case if no upgrades have been created in the Admin CP.

2) Surround the link with this condition:

Code:
<xen:if is="{$visitor.user_id}">
	FOR LOGGED IN USERS
</xen:if>
 
like so?

Code:
<li class="navTab upgrade PopupClosed">
              <xen:if is="{$visitor.user_id}"><a href="{xen:link account/upgrades}" class="navLink">{xen:phrase account_upgrades}</a></xen:if>
            </li>

I have must have this wrong. Doesn't work.
 
This condition will hide something for registered users:

Code:
<xen:if is="!{$visitor.user_id}">
	FOR GUESTS
</xen:if>

Or combined:

Code:
<xen:if is="{$visitor.user_id}">
	FOR LOGGED IN USERS
<xen:else />
	FOR GUESTS
</xen:if>
 
I've been trying this a number of ways. None of them work. I'm sure I'm just not placing it correctly.

Would you tell me where I need to insert the code?

Code:
<!-- Account Upgrades -->
        <xen:if is="{$visitor.user_id}">
            <li class="navTab upgrade PopupClosed">
            <a href="{xen:link account/upgrades}" class="navLink">{xen:phrase account_upgrades}</a>
            </li>

        <xen:else />
            <li class="navTab upgrade PopupClosed">
            <xen:if is="{$visitor.user_id}"><a href="{xen:link login}" class="navLink">{xen:phrase account_upgrades}</a></xen:if></xen:if>
                        </li>
 
This will create an Account Upgrades link for registered users only:

Code:
<xen:if is="{$visitor.user_id}">
	<!-- mytab -->
	<li class="navTab PopupClosed"><a href="{xen:link account/upgrades}" class="navLink">{xen:phrase account_upgrades}</a></li>
</xen:if>

There is no reason to show that link for guests since they cannot purchase upgrades without an account.
 
Thanks, I have already removed upgrades for guests.

I was hoping to remove the upgrade link for registered users as well since there are no upgrades for them either.

I should ask, what exactly are these upgrades. I thought they were for xenforo customer alerts for upgrades on the software.
 
Top Bottom