I wonder if it was possible to move a button to the other side of a navigation bar? Instead of being on the left that one single button would be on the right while the rest would stay put... Look at the picture below... Thanks
Ok, this is an awful hack (hope Antechinus doesn't see it), but it werks gud!
In
index.template.php find this:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">';
foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li id="button_', $act, '">
<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
</a>';
if (!empty($button['sub_buttons']))
Change it to this:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">';
foreach ($context['menu_buttons'] as $act => $button)
{
/// echo ' button = ' . $act . '<br>';
if ($act == 'mlist')
echo '
<li id="button_', $act, '" style="float: right;">
<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
</a>';
else
echo '
<li id="button_', $act, '">
<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
</a>';
if (!empty($button['sub_buttons']))
Substitute the action of the button you want to move right in
if($act == 'mlist'). If you don't know the action, use the triple-slashed line to echo the values.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Fhide.gif&hash=a8313815f262206ac1725e7e09e0c772224937db)
Lainaus käyttäjältä: Krash. - marraskuu 23, 2011, 07:54:47 IP
......(hope Antechinus doesn't see it)......
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.dzinerstudio.com%2FSmileys%2Fnew%2Frofl.gif&hash=06c15178d0f796ccc280eba333b8f0fbca78faa8)
Is it illegal to do or something? Lol.
Lol it works but.... it took out the look of the navigation... Look...
IF you need my original index.template its also below. :)
Of course it's not, he just didn't want Antechinus to see it because of it's possibly hackish method.
Lainaus käyttäjältä: Surf3rDud3 - marraskuu 24, 2011, 11:04:08 AP
Is it illegal to do or something? Lol.
This should do it. I knocked that off in default theme between pizza & beer and folding my underwear. Remember to substitute your action in if ($act == 'mlist').
Gotta run - the css police are after me. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Fcop.gif&hash=6bb2ef0a259624a0a98af863b25c6476d82c4423) (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Ftoilet.gif&hash=da04d5df49c051ed87c06dfca9be8e33637b04f2)
It just moves it to the last button and not to the other side... :/
Which theme are you using?
Modified MysticJade_20
A favorite theme. Took a quick look - it's in index.css. Have to toddle off into the realworld, but I'll get to it later.
Just don't tell anyone where you got this -
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<ul id="topnav" style="width: 99%;">';
foreach ($context['menu_buttons'] as $act => $button)
{
if ($act == 'mlist')
echo '
<li id="button_', $act, '" style="float: right; margin: 0 8px 0 0;">
<img src="Themes/MysticJade/images/custom/toolbar-div.png" style="float: left;">
<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
</a>';
else
echo '
<li id="button_', $act, '">
<a class="', $button['active_button'] ? 'active ' : '', '" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '><span>', $button['title'], '</span></a>';
Lainaus käyttäjältä: Krash. - marraskuu 25, 2011, 01:55:00 IP
A favorite theme. Took a quick look - it's in index.css. Have to toddle off into the realworld, but I'll get to it later.
Don't you mean index.template.php? ;)
If I did it the right way, it would be index.css. Couldn't get the toolbar-divs where I wanted 'em, so I hacked it the old fashioned way. Would be interesting to see someone do this with just css.
Lainaus käyttäjältä: Krash. - marraskuu 25, 2011, 11:31:02 IP
If I did it the right way, it would be index.css. Couldn't get the toolbar-divs where I wanted 'em, so I hacked it the old fashioned way. Would be interesting to see someone do this with just css.
I don't think that it could be done purely with css. My opinion is that since the menu runs from Subs.php, a separate menu item to the right would need to also be coded in separately along with a separate addition in index.css for that specific menu item.
Too much code work for my knowledge.
;D
Whoa thanks so much... sorry this was a hassle all for just button... i did have a problem with the image source for the toolbar_div but i fixed... But once again thanks :)