Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: lordrene on January 12, 2015, 09:11:04 PM

Title: Remove Topic Starter Username Profile Link on Message Index?
Post by: lordrene on January 12, 2015, 09:11:04 PM
Is there a mod or code that can remove the by "Administrator" link, as you can see the username is in bold and links you to the user's profile, is it possible to make it just text just like "by" is?
(http://i.imgur.com/vwX3txQ.png)

Like this:
by Administrator

not this:
by Administrator
Title: Re: Remove Topic Starter Username Profile Link on Board Index?
Post by: Arantor on January 12, 2015, 09:22:59 PM
I would have thought it was useful to have...
Title: Re: Remove Topic Starter Username Profile Link on Board Index?
Post by: lordrene on January 12, 2015, 09:32:34 PM
It is pretty useful, but the bold text is more noticeable than the topic title (imo)
Title: Re: Remove Topic Starter Username Profile Link on Board Index?
Post by: Antechinus on January 12, 2015, 09:32:56 PM
It's easy to do. I've often done it myself as I can't see the point of the link there (have rarely, if ever, actually used it), and it's a right PITA when doing responsive and trying to stack things tightly while leaving room for fingers to hit links.

In BoardIndex.template.php look for code like this:

<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />

Change ['member']['link'] to ['member']['name']

Your code will probably have bold tags around the name, like this:

<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' <b>', $board['last_post']['member']['link'] , '</b><br />

In which case you'd just remove those.
Title: Re: Remove Topic Starter Username Profile Link on Board Index?
Post by: lordrene on January 12, 2015, 09:43:45 PM
Quote from: Antechinus on January 12, 2015, 09:32:56 PM

This is my code
<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', (!empty($board['last_post']['member']['group_image']) && empty($modSettings['disable_image_on_left']) && empty($modSettings['disable_on_last_post_bi']) ?  '<img src="' . $settings['images_url'] . '/group_images/' . $board['last_post']['member']['group_image'] . '" alt="" />' : ''), $board['last_post']['member']['bold_username_start'], $board['last_post']['member']['link'], $board['last_post']['member']['bold_username_end'], (!empty($board['last_post']['member']['group_image']) && empty($modSettings['disable_image_on_right']) && empty($modSettings['disable_on_last_post_bi']) ?  '<img src="' . $settings['images_url'] . '/group_images/' . $board['last_post']['member']['group_image'] . '" alt="" />' : ''), '<br />

<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', (!empty($board['last_post']['member']['group_image']) && empty($modSettings['disable_image_on_left']) && empty($modSettings['disable_on_last_post_bi']) ?  '<img src="' . $settings['images_url'] . '/group_images/' . $board['last_post']['member']['group_image'] . '" alt="" />' : ''), $board['last_post']['member']['bold_username_start'], $board['last_post']['member']['link'], $board['last_post']['member']['bold_username_end'], (!empty($board['last_post']['member']['group_image']) && empty($modSettings['disable_image_on_right']) && empty($modSettings['disable_on_last_post_bi']) ?  '<img src="' . $settings['images_url'] . '/group_images/' . $board['last_post']['member']['group_image'] . '" alt="" />' : ''), '<br />

Can't seem to find that line, hmm
Title: Re: Remove Topic Starter Username Profile Link on Board Index?
Post by: Arantor on January 12, 2015, 09:44:11 PM
Um, Ant, he's talking about the message index, not the board index...
Title: Re: Remove Topic Starter Username Profile Link on Board Index?
Post by: lordrene on January 13, 2015, 01:26:10 AM
Thank you but talking about Message Index!
Title: Re: Remove Topic Starter Username Profile Link on Message Index?
Post by: Antechinus on January 13, 2015, 02:57:58 AM
Oh ok, missed that.

Weird code you have there. Where the hell is this defined?

$board['last_post']['member']['bold_username_start'],

Looks like it's hard coded somewhere outside the template, which would be a nuisance. Better ask the bloke who wrote it.