SMF code - Is it just me or they are nuts over there?
Posted: Sun Oct 01, 2006 1:58 am
Here is some of the SMF code:
Now here is my question:
Is there a reasonable reason as to why each time they print a link, they check $settings['use_image_buttons'] instead of checking it only once and then print the data accordingly?
I don't know, maybe there is some good reason that the ones who are more familiar with SMF aware of. Otherwise, I would have to say that the SMF programmers are nuts
Edit: I hope this is the right forum
Code: Select all
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];
.
.
.
}Is there a reasonable reason as to why each time they print a link, they check $settings['use_image_buttons'] instead of checking it only once and then print the data accordingly?
I don't know, maybe there is some good reason that the ones who are more familiar with SMF aware of. Otherwise, I would have to say that the SMF programmers are nuts
Edit: I hope this is the right forum