Blocweb

Welcome, Guest. Please login or register.

Author Topic: [ Impulse2 ] Right Align Menu Items  (Read 227 times)

Offline Krimm

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
[ Impulse2 ] Right Align Menu Items
« on: May 04, 2010, 05:58:55 PM »
Theme: Impulse 2
Version: RC3

Hey, just wanted to say I absolutely love the skin but I was wondering it it's possible to right align all of the menu items to the right side of the forum? I found a float function in the index.css and it moved it to the right...but it reversed the order o.o.

So it was:

Home Members Logout

And went to:

Logout Members Home

Thanks in advance~

Offline Bloc

  • Administrator
  • Sr. Member
  • *****
  • Posts: 264
    • View Profile
    • Blocweb
    • Email
Re: [ Impulse2 ] Right Align Menu Items
« Reply #1 on: May 05, 2010, 02:00:17 PM »
Yes, thats what happens. But if you keep the right float as it is now, this is what you can do to get the right order:

- open up index.template.php and find:
Code: [Select]
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

if(empty($settings['nomootools']))
echo '
<div id="menu_container">
<ul id="nav">';
else
echo '
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">';

the add this right after that:
Code: [Select]
// reverse the order
$newbuttons = array_reverse($context['menu_buttons'], true);
$context['menu_buttons'] = $newbuttons;


That should make them reversed, so floating right should be correct. Let me know if it works. :)

Offline Krimm

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: [ Impulse2 ] Right Align Menu Items
« Reply #2 on: May 05, 2010, 02:22:40 PM »
yes, it works perfectly, without a hitch!

Thank you so much! I also have one other question; should I jut ask it here or post another topic?

Offline Bloc

  • Administrator
  • Sr. Member
  • *****
  • Posts: 264
    • View Profile
    • Blocweb
    • Email
Re: [ Impulse2 ] Right Align Menu Items
« Reply #3 on: May 05, 2010, 02:54:29 PM »
If its not related to Impulse, start a new. Otherwise its fine. :)

Offline Krimm

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: [ Impulse2 ] Right Align Menu Items
« Reply #4 on: May 05, 2010, 02:58:12 PM »
Yes, it's the same theme XD

Alright, basically I'd like to add transparency to the drop-down menus for the theme. I love how the transparency looks here, and I noticed that the current menus have a slight transparency, but really not as much as I'd like.

Offline Bloc

  • Administrator
  • Sr. Member
  • *****
  • Posts: 264
    • View Profile
    • Blocweb
    • Email
Re: [ Impulse2 ] Right Align Menu Items
« Reply #5 on: May 06, 2010, 04:14:31 AM »
The drop-down menus..as in the part that "drops" lol?

That is a actually a setting for that Mootools based menu. You need to open index.template.php again and find this code:

Code: [Select]
if(empty($settings['nomootools']))
echo '<!-- Load the MenuMatic Class -->
<script src="'.$settings['theme_url'].'/js/MenuMatic_0.68.3.js" type="text/javascript" charset="utf-8"></script>

<!-- Create a MenuMatic Instance -->
<script type="text/javascript" >
window.addEvent(\'domready\', function() {
var myMenu = new MenuMatic({
duration:\'250\'
});
});
if(document.getElementById(\'admnav\'))
{
window.addEvent(\'domready\', function() {
var myMenu = new MenuMatic({
id:\'admnav\',
subMenusContainerId:\'admsubMenus\',
duration:\'250\'
});
});
}
  </script>';
then exchange it with:

Code: [Select]
if(empty($settings['nomootools']))
echo '<!-- Load the MenuMatic Class -->
<script src="'.$settings['theme_url'].'/js/MenuMatic_0.68.3.js" type="text/javascript" charset="utf-8"></script>

<!-- Create a MenuMatic Instance -->
<script type="text/javascript" >
window.addEvent(\'domready\', function() {
var myMenu = new MenuMatic({
duration:\'250\',
opacity:\'80\'
});
});
if(document.getElementById(\'admnav\'))
{
window.addEvent(\'domready\', function() {
var myMenu = new MenuMatic({
id:\'admnav\',
subMenusContainerId:\'admsubMenus\',
opacity:\'80\',
duration:\'250\'
});
});
}
  </script>';

The "opacity" value is what counts, 100 means no opacity. As you can see you can also set the "duration" for the dropmenu, set it lower(100 for example, used on this site) and it goes faster. Higher means slower.

Also note the second set of values is for admin menus only. Note also that this will ONLY work using the Mootools menu option, not the normal SMF menu.

Offline Krimm

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: [ Impulse2 ] Right Align Menu Items
« Reply #6 on: May 06, 2010, 04:36:00 AM »
Works again, without a hitch! I really appreciate your help!

Thanks for everything, I'm really impressed with the speed of response XD

 

Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.131 seconds with 20 queries.