XF 1.3 Show author homepage link (too long)

audiokid

Active member
#1
Some people have really long url!

I'm wondering how to modify or is there an add-on to make a clean link for,
admin.php?styles/default-style.37/style-properties&group=message area?

Show author homepage link
Display a link to the homepage of the message author, if they have entered one.

A simple box that was easy for members to add in their url and website name would look much better on the forum.

Code:
<a href="http://www.yourlink.com/">your link</a>
 

Jake Bunce

XenForo moderator
Staff member
#2
Admin CP -> Appearance -> Templates -> message_user_info

This is the relevant code:

Code:
				<xen:if is="@messageShowHomepage AND {$user.homepage}">
					<dl class="pairsJustified">
						<dt>{xen:phrase home_page}:</dt>
						<dd><a href="{xen:string censor, $user.homepage, '-'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></dd>
					</dl>
				</xen:if>
 

audiokid

Active member
#3
Hi Jake, thanks for chiming in. Do I need to insert this in a particular order or location? Will the code I have be enough to create the needed box for users?
 

Jake Bunce

XenForo moderator
Staff member
#4
That code already exists in the default template. The HTML can be modified to create hyperlinked text instead of showing the entire URL as the text, which I believe is what you want.
 

audiokid

Active member
#5
Exactly, but I am wondering how I would include/ modify this in the current code? I'm suprized xenForo hasn't included this in there already stellar/ clean looking forum. I think this is an overlooked feature. So many people have long strings.
 

Brogan

XenForo moderator
Staff member
#6
Change it to this:
Rich (BB code):
<xen:if is="@messageShowHomepage AND {$user.homepage}">
    <dl class="pairsJustified">
        <dt>{xen:phrase home_page}:</dt>
        <dd><a href="{xen:string censor, $user.homepage, '-'}" rel="nofollow" target="_blank" itemprop="url">My Homepage</a></dd>
    </dl>
</xen:if>
Adjust "My Homepage" to suit.
 

audiokid

Active member
#7
Change it to this:
Rich (BB code):
<xen:if is="@messageShowHomepage AND {$user.homepage}">
    <dl class="pairsJustified">
        <dt>{xen:phrase home_page}:</dt>
        <dd><a href="{xen:string censor, $user.homepage, '-'}" rel="nofollow" target="_blank" itemprop="url">My Homepage</a></dd>
    </dl>
</xen:if>
Adjust "My Homepage" to suit.
Nice!
one more thing . "My Homepage" is on the right. To force it to the left would we just add ?
 
Top