News:

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

Main Menu

Change order of Quick Moderation icons

Started by Lukkie1998, October 24, 2014, 10:13:44 AM

Previous topic - Next topic

Lukkie1998

Hi guys,

I recently installed SMF 2.0.9, so I turned on the Quick Moderation Icons. They are showing like this:


But is there a way to show it like this?:


I can't seem to find the setting to change it.

Lukkie1998

kat



There's no setting, for that. I believe this bit of code, in MessageIndex.template.php, does all that. Thing is, not being a coder, I have no idea how to change the way they're arranged. :( Being naive, I was expecting a <br> tag, or three. But, there doesn't seem to be anything, like that.

Looks like we'll have to wait for someone who knows about such things to drop by... :(

// Check permissions on each and show only the ones they are allowed to use.
if ($topic['quick_mod']['remove'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=remove;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_remove.gif" width="16" alt="', $txt['remove_topic'], '" title="', $txt['remove_topic'], '" /></a>';:if ($topic['quick_mod']['lock'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=lock;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_lock.gif" width="16" alt="', $txt['set_lock'], '" title="', $txt['set_lock'], '" /></a>';

if ($topic['quick_mod']['lock'] || $topic['quick_mod']['remove'])
echo '<br />';

if ($topic['quick_mod']['sticky'])
echo '<a href="', $scripturl, '?action=quickmod;board=', $context['current_board'], '.', $context['start'], ';actions[', $topic['id'], ']=sticky;', $context['session_var'], '=', $context['session_id'], '" onclick="return confirm(\'', $txt['quickmod_confirm'], '\');"><img src="', $settings['images_url'], '/icons/quick_sticky.gif" width="16" alt="', $txt['set_sticky'], '" title="', $txt['set_sticky'], '" /></a>';

if ($topic['quick_mod']['move'])
echo '<a href="', $scripturl, '?action=movetopic;board=', $context['current_board'], '.', $context['start'], ';topic=', $topic['id'], '.0"><img src="', $settings['images_url'], '/icons/quick_move.gif" width="16" alt="', $txt['move_topic'], '" title="', $txt['move_topic'], '" /></a>';
}

Lukkie1998

Thanks for the reply! I'll try some things out. If I manage to get it right, I'll respond back. Until then, there's nothing else to do, than wait.

Lukkie1998

Antechinus

Yeah I've done that before. I'll grab a coffee and dig out the code.


Antechinus

Ok, they do display the way you want them to, if your screen is wide enough. If they're stacking vertically it's due to the width of your screen. The way around that is to set a minimum width on the relevant table cell. This should work, with a bit of tweaking (not tested live).

.moderation {min-width: 40px;}

Lukkie1998

Quote from: Antechinus on October 24, 2014, 04:17:24 PM
Ok, they do display the way you want them to, if your screen is wide enough. If they're stacking vertically it's due to the width of your screen. The way around that is to set a minimum width on the relevant table cell. This should work, with a bit of tweaking (not tested live).

.moderation {min-width: 40px;}

Ok, this maybe sound like a noob question, but where do I change that? Not very long into SMF, so I don't know where to put it...
Thanks for the Help!

Lukkie1998

Antechinus

Just throw it on the end of index.css and see how it goes. Do a hard refresh before testing (Ctrl+F5 on Windoze).

Lukkie1998

Quote from: Antechinus on October 24, 2014, 04:46:48 PM
Just throw it on the end of index.css and see how it goes. Do a hard refresh before testing (Ctrl+F5 on Windoze).
Thanks for the reply! I'm currently having some problems with my connection to the server, so I can't try it out now. As soon as my PC is back up, I'll let you know if it helped!

Lukkie1998

Lukkie1998

Ok, I tried it out. 40px didn't do the job, but 41px did. Thanks!

Lukkie1998

Advertisement: