• 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

Joeychgo

Well-known member
#1
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?
 

Chris D

XenForo developer
Staff member
#2
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
 

Joeychgo

Well-known member
#4
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
 

Chris D

XenForo developer
Staff member
#6
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>
 

Joeychgo

Well-known member
#7
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>
 

Chris D

XenForo developer
Staff member
#8
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.