Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Diego Andrés on November 29, 2014, 12:51:18 AM

Title: Is this link correct?
Post by: Diego Andrés on November 29, 2014, 12:51:18 AM
I noticed in index.template, for alerts we have this code

// Thirdly, alerts
echo '
<li>
<a href="', $scripturl, '?action=alerts"', !empty($context['self_alerts']) ? ' class="active"' : '', ' id="alerts_menu_top">', $txt['alerts'], !empty($context['user']['alerts']) ? ' <span class="amt">' . $context['user']['alerts'] . '</span>' : '', '</a>
<div id="alerts_menu" class="top_menu scrollable"></div>
</li>';


But action=alerts does... nothing. I think the correct link should be action=profile;area=showalerts?

Just asking, maybe I'm wrong  :P
Title: Re: Is this link correct?
Post by: Dragooon on November 29, 2014, 05:11:07 AM
Quote from: Diego Andrés on November 29, 2014, 12:51:18 AM
I noticed in index.template, for alerts we have this code

// Thirdly, alerts
echo '
<li>
<a href="', $scripturl, '?action=alerts"', !empty($context['self_alerts']) ? ' class="active"' : '', ' id="alerts_menu_top">', $txt['alerts'], !empty($context['user']['alerts']) ? ' <span class="amt">' . $context['user']['alerts'] . '</span>' : '', '</a>
<div id="alerts_menu" class="top_menu scrollable"></div>
</li>';


But action=alerts does... nothing. I think the correct link should be action=profile;area=showalerts?

Just asking, maybe I'm wrong  :P
Yeah you're right, Alerts are handled via AJAX which has the correct link so it doesn't appear wrong but if JS is disabled it wouldn't work. Can you track this on GitHub? I'll fix it later
Title: Re: Is this link correct?
Post by: Arantor on November 29, 2014, 08:56:47 AM
Yeah, when I first threw that in, I hadn't worked out if the full list of alerts should be in the profile or not, then forgot to change it.
Title: Re: Is this link correct?
Post by: Diego Andrés on November 29, 2014, 09:31:36 AM
And what about the profile button (and alerts), will show both buttons active because they are in profile
Title: Re: Is this link correct?
Post by: Arantor on November 29, 2014, 09:34:24 AM
If this is already flagged on Github, probably best to add it to the report there.

Or even... submit a pull request with a fix in it.
Title: Re: Is this link correct?
Post by: Diego Andrés on November 29, 2014, 06:46:15 PM
PR sent, I'll mark this as solved