How to tighten up mini Profile

Started by faliro, February 24, 2017, 06:56:36 PM

Previous topic - Next topic

Dzonny

faliro, you attached index.php, while we need Themes/your-theme/Index.template.php file. Please re-check that and upload that file :)

faliro

Quote from: Dzonny on February 26, 2017, 07:46:20 PM
faliro, you attached index.php, while we need Themes/your-theme/Index.template.php file. Please re-check that and upload that file :)

Appologies: Here we go. Hope this is the one!

Dzonny

Great, let's try to replace it with this one and see how it goes. Please let us know what happen.

faliro

Just tried it with a clean cache.
Nothing changed:


Dzonny

Oh, gotcha, seems like that br code is from the show_alerts() function, so can't really remove it from this file itself.

What you may be able to do though is to just trick the thing with css, open Themes/yourtheme/index.css file, and add this at the very end of the file:
.greeting br {
    display: none;
}

br360

Actually it looks like you have the alerts mods code in the wrong place and that could be the issue you are having. Back up your index.template.php first and then try this-

Find-

<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>

Replace with-

<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>', function_exists('show_alerts') && show_alerts(), '

Then Find-

<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span> ', function_exists('show_alerts') && show_alerts(), '</li>

Replace with-

<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>

Once agin; back up your file first, just in case

faliro

Quote from: br360 on February 26, 2017, 11:47:04 PM
Actually it looks like you have the alerts mods code in the wrong place and that could be the issue you are having. Back up your index.template.php first and then try this-

Find-

<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>

Replace with-

<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>', function_exists('show_alerts') && show_alerts(), '

Then Find-

<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span> ', function_exists('show_alerts') && show_alerts(), '</li>

Replace with-

<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>

Once agin; back up your file first, just in case

Before I try this - wont this just move the alerts away from the profile name. The mod salesman (for want of a better phrase) stated the mod can only go two places - either behind the header or after the user name.  :o

faliro

Quote from: Dzonny on February 26, 2017, 09:05:21 PM
Oh, gotcha, seems like that br code is from the show_alerts() function, so can't really remove it from this file itself.

What you may be able to do though is to just trick the thing with css, open Themes/yourtheme/index.css file, and add this at the very end of the file:
.greeting br {
    display: none;
}


To the very end of everything - last thing typed?

Dzonny

Quote from: faliro on February 27, 2017, 05:03:29 PM
Quote from: Dzonny on February 26, 2017, 09:05:21 PM
Oh, gotcha, seems like that br code is from the show_alerts() function, so can't really remove it from this file itself.

What you may be able to do though is to just trick the thing with css, open Themes/yourtheme/index.css file, and add this at the very end of the file:
.greeting br {
    display: none;
}


To the very end of everything - last thing typed?
Yes :)

faliro

Quote from: Dzonny on February 27, 2017, 06:11:32 PM
Quote from: faliro on February 27, 2017, 05:03:29 PM
Quote from: Dzonny on February 26, 2017, 09:05:21 PM
Oh, gotcha, seems like that br code is from the show_alerts() function, so can't really remove it from this file itself.

What you may be able to do though is to just trick the thing with css, open Themes/yourtheme/index.css file, and add this at the very end of the file:
.greeting br {
    display: none;
}


To the very end of everything - last thing typed?
Yes :)

Hahaha. It worked!

You knew this one would work didn't you!  :laugh:

Dzonny


Advertisement: