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

Add-on Contact us to PC

Discussion in 'Custom Service/Development Requests' started by Joeychgo, Sep 1, 2015.

  1. Joeychgo

    Joeychgo Well-Known Member

    I had this on my vB forums and it worked out very well.

    When a logged in member clicks the Contact Us link, he's taken to a new PC page to send me a PC, instead of the normal Contact us (email)

    Can someone make this please?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    That's probably doable with a rather simple template conditional by editing the template to be fair.

    The link to start a conversation with a specific person is:

    https://xenforo.com/community/conversations/add?to=Joeychgo
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    upload_2015-9-1_14-40-12.png

    Unless you want it for logged in members only, in which case it would need to be a template edit and xen:if.
     
    Robru and Chris D like this.
  4. Joeychgo

    Joeychgo Well-Known Member

    In vb I had a conditional with an else statement. Yes, as I said, logged in members would be taken to a PC to me. Non logged in members would use the normal contact us
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Conditional statements are explained here: Conditional Statements

    How to identify templates and elements is all explained in this set of guides: How To...
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    This is it specifically.

    Find "footer" template:
    Code:
    <li><a href="{xen:link 'misc/contact'}" class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}">{xen:phrase contact_us}</a></li>
    Replace with:
    Code:
    <xen:if is="{$visitor.user_id}">
        <li><a href="{xen:link 'conversations/add', '', 'to=Joeychgo'}">{xen:phrase contact_us}</a></li>
    <xen:else />
        <li><a href="{xen:link 'misc/contact'}" class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}">{xen:phrase contact_us}</a></li>
    </xen:if>
     
  7. Joeychgo

    Joeychgo Well-Known Member

    Thanks @Chris D

    Code:
    <li><a href="{xen:link 'misc/contact'}" class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}">{xen:phrase contact_us}</a></li>
    Mine says:

    Code:
    <li><a href="{xen:link 'misc/contact'}" class="OverlayTrigger" data-overlayOptions="{&quot;fixed&quot;:false}"><xen:if is="@xb_footer_fa"><i class="fa fa-envelope-o fa-fw"></i> </xen:if><span>{xen:phrase contact_us}</span></a></li>
     
  8. Chris D

    Chris D XenForo Developer Staff Member

    Indeed - you may need to adjust it accordingly to match your style.

    Basically start with the same contact us list item in both the if and else statement, but for the if statement change the href accordingly and remove the class and data-overlayOptions.
     

Share This Page