XF 1.4 How to remove this link?

imthebest

Well-known member
link.webp

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?
 
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>';
 
  • Like
Reactions: Cao
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.
 
@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.
 
Back
Top Bottom