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

XF 1.4 How to remove this link?

imthebest

Formerly Super120
#1
link.png

I want to keep showing "Glasgow, UK" but without the link. How I can do that? I tried looking for the code at the member_view template but it isn't there. Any ideas?
 

Brogan

XenForo moderator
Staff member
#2
It's handled in PHP so it's not something you can change in the template.

PHP:
$location = '<a href="'
    . XenForo_Link::buildPublicLink('misc/location-info', '', array('location' => $user['locationCensored']))
    . '" class="concealed" target="_blank" rel="nofollow">'
    . htmlspecialchars($user['locationCensored'])
    . '</a>';
 

Amaury

Well-known member
#3
It's handled in PHP so it's not something you can change in the template.

PHP:
$location = '<a href="'
    . XenForo_Link::buildPublicLink('misc/location-info', '', array('location' => $user['locationCensored']))
    . '" class="concealed" target="_blank" rel="nofollow">'
    . htmlspecialchars($user['locationCensored'])
    . '</a>';
Wouldn't you just find every instance of this in the member_view template (and other templates with the location):

Code:
<xen:if is="{$user.location}">
                    <dl><dt>{xen:phrase location}:</dt>
                        <dd><a href="{xen:link misc/location-info, '', 'location={xen:string censor, $user.location, 'x'}'}" rel="nofollow" target="_blank" itemprop="address">{xen:string censor, $user.location}</a></dd></dl>
                </xen:if>
And change it to this:

Code:
<xen:if is="{$user.location}">
                    <dl><dt>{xen:phrase location}:</dt>
                        <dd>{$user.location}</dd></dl>
                </xen:if>
I just tested it, and doing the above made the location plain text in the block below the Following and Followers blocks.
 

imthebest

Formerly Super120
#4
@Amaury I already did that however as I said on my original message that specific link isn't on the member_view template.

Anyone can confirm what @Brogan said? i.e. that it isn't editable in the templates and needs direct code manipulation.

Thanks.