News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Is this link correct?

Started by Diego Andrés, November 29, 2014, 12:51:18 AM

Previous topic - Next topic

Diego Andrés

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

SMF Tricks - Free & Premium Responsive Themes for SMF.

Dragooon

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

Arantor

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.

Diego Andrés

And what about the profile button (and alerts), will show both buttons active because they are in profile

SMF Tricks - Free & Premium Responsive Themes for SMF.

Arantor

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.

Diego Andrés

PR sent, I'll mark this as solved

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: