• 0
  • 3 RepliesReplies
  • 3800 ReadTimes Read
  • 6 PointsPoints

Topic: Sexy Elegant Menu

no avatar
Usuario: Zoom
Rango: Friend de SMFSimple
Mensajes: 384
Points: 13
Mi web: http://www.portalzone.net
Perfil: View Profile
Pais:
mx
Sexy Elegant Menu
January 09, 2014 - 02:05 14:05
Elegant Menu

Resultado final:


Abrimos nuestro index.template.php buscamos:

Code: [Select]
// Here comes the JavaScript bits!
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?fin20"></script>

Remplazamos por:
Code: [Select]
// main menu jquery
echo '
    <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/css/menu.css" />';

// Here comes the JavaScript bits!
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/script.js?fin20"></script>
<script type="text/javascript">
$(function() {
$("#lbutton1,#lbutton2,#lbutton3,#lbutton4,#lbutton5").tipsy({gravity: "s"});
});
</script>
<script type="text/javascript" src="', $settings['theme_url'], '/scripts/jquery.js"></script>
    <script type="text/javascript" src="', $settings['theme_url'], '/scripts/jquery_menu.js"></script>

Buscamos:
Code: [Select]
// 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']))
{
echo '
<ul>';

foreach ($button['sub_buttons'] as $childbutton)
{
echo '
<li>
<a href="', $childbutton['href'], '"', isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '>
<span', isset($childbutton['is_last']) ? ' class="last"' : '', '>', $childbutton['title'], !empty($childbutton['sub_buttons']) ? '...' : '', '</span>
</a>';
// 3rd level menus :)
if (!empty($childbutton['sub_buttons']))
{
echo '
<ul>';

foreach ($childbutton['sub_buttons'] as $grandchildbutton)
echo '
<li>
<a href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>
<span', isset($grandchildbutton['is_last']) ? ' class="last"' : '', '>', $grandchildbutton['title'], '</span>
</a>
</li>';

echo '
</ul>';
}

echo '
</li>';
}
echo '
</ul>';
}
echo '
</li>';
}

echo '
</ul>
</div>';
}

Remplazamos por:

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

   echo '
     
         <ul class="topnav">';

   foreach ($context['menu_buttons'] as $act => $button)
   {
      echo '
            <li>
               <a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
                  <div>', $button['title'], '</div>
               </a>';
      if (!empty($button['sub_buttons']))
      {
         echo '
               <ul class="subnav">';

         foreach ($button['sub_buttons'] as $childbutton)
         {
            echo '
                  <li>
                     <a href="', $childbutton['href'], '"', isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '>
                        <div>', $childbutton['title'], !empty($childbutton['sub_buttons']) ? '...' : '', '</div>
                     </a>';
            // 3rd level menus
            if (!empty($childbutton['sub_buttons']))
            {
               echo '
                     <ul class="subnav">';

               foreach ($childbutton['sub_buttons'] as $grandchildbutton)
                  echo '
                        <li>
                           <a', $grandchildbutton['active_button'] ? ' class="active"' : '', ' href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>
                              <div>', $grandchildbutton['title'], '</div>
                           </a>
                        </li>';

               echo '
                  </ul>';
            }

            echo '
                  </li>';
         }
         echo '
               </ul>';
      }
      echo '
            </li>';
   }

   echo '
         </ul>';
}

Ahora solo descargar los archivos adjuntos y lo suben a su respectivo directorio.

Imagenes_menu.rar lo descomprimimos y subimos las imagenes a Tutheme/images/theme

menu.css lo subimos a Tutheme/css

jquery.rar lo descomprimimos y subismos los 2 archivos .js a Tutheme/scripts
Haciendo de lo simple lo ESPECTACULAR
You do not have permission to give points
point 6 Points

Users who gave points in this topic » 4kstore (3 Pts) » Papá distante (3 Pts) 

Usuario: 4kstore
Rango: Moderador Global
Mensajes: 4916
Points: 8111
Mi web: http://www.smfsimple.com
Perfil: View Profile
Pais:
ar
Re:Sexy Elegant Menu
Reply #1 January 09, 2014 - 07:50 19:50
Muy buen tutorial, gracias por compartir

Usuario: Papá distante
Rango: Moderador Global
Mensajes: 3504
Points: 168
Perfil: View Profile
Pais:
de
Re:Sexy Elegant Menu
Reply #2 January 09, 2014 - 09:03 21:03
Gracias por el tuto!

Usuario: Losox
Rango: Excelente User
Mensajes: 874
Points: 109
Perfil: View Profile
Pais:
mx
Re:Sexy Elegant Menu
Reply #3 February 05, 2014 - 04:56 16:56
Se ve lindo y bueno, excelente modificación.

 

TAGS



top

Smfsimple.com es un sitio destinado a brindar un servicio de soporte y herramientas para foros realizados con el sistema de foros gratuito simplemachines.org. Contamos con un selecto equipo de desarrolladores y conocedores del sistema, sus foros estaran en buenas manos.
This site is not affiliated with or endorsed by Simple Machines