1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

account upgrade link receives error

Discussion in 'Troubleshooting and Problems' started by Diana, Oct 20, 2011.

  1. Diana

    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.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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/
     
  3. Diana

    Diana Active Member

    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.
     
  4. Diana

    Diana Active Member

    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?
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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>
    
     
  6. Diana

    Diana Active Member

    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.
     
  7. Diana

    Diana Active Member

    ok, got it right, misplaced it.

    Forgot to ask, can I do the same for registered members?
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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>
    
     
  9. Diana

    Diana Active Member

    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>
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.
     
  11. Diana

    Diana Active Member

    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.
     
  12. Diana

    Diana Active Member

    hmm "edit" doesn't work.
     
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  14. Diana

    Diana Active Member

    I see. No, won't be selling forum access.

    Once again, thank you for your help.

    :)
     

Share This Page