• 3
  • 12 RepliesReplies
  • 17770 ReadTimes Read
  • 17 PointsPoints

Topic: Como agregar botones al menu

Usuario: Niell
Rango: Nuevo Usuario
Mensajes: 235
Points: 24
Perfil: View Profile
Como agregar botones al menu
June 07, 2011 - 11:56 23:56
Hola a todos, en este tutorial les enseñare como agregar mas botones al menu.

Primero vamos a nuestra carpeta Sources y abrimos el archivo Subs.php :

Buscamos :
Code: [Select]
   // All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
Apartir de esta linea estan los botones del menu, como inicio, ayuda, busca, etc.

Tomaremos como ejemplo del boton Home, veremos la estructura del boton para hacer el nuestro.

Code: [Select]
'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
         ),

'home' => array( : Key por el cual reconocemos el boton )

'title' => $txt['home'], : Titulo del boton ( Puede ser Blog, Chat, etc.)

'href' => $scripturl,
: el enlace del boton (Puede ser 'http://www.tuforo.com' )

'show' => true, : Key para indicar si se va a mostrar el boton o no.

  • true (Mostrar)
  • false (no mostrar)
  • $context['allow_admin'],  (Solo mostrar para Administradores)
  • $user_info['is_guest'],      (Mostrar Para visitantes)
  • !$user_info['is_guest'],    (Mostrar Para Usuarios)
  • array_intersect($user_info['groups'], array(1,2,3,4)       (Para ciertos grupos, poner id de cada grupo separado por coma.
'sub_buttons' => array( : Esta sirve para agregar sub-menus.)

Devemos agregar justo debajo de este linea en 'sub_buttons'

Code: [Select]
'Blog' => array(
            'title' => $txt['Blog'],
            'href' => 'http://tuforo/blog
            'show' => true,
            'sub_buttons' => array(



'is_last' => $context['right_to_left'], : agrega la clase last, a los botones

Con eso nuestro boton quedaria algo asi :

Code: [Select]
'boton' => array(
            'title' => $txt['boton'],
            'href' => 'http://tuforo.com',
            'show' => true,
            'sub_buttons' => array(
                         
                                   'Blog' => array(
                                             'title' => $txt['Blog'],
                                             'href' => 'http://tuforo.com/blog
                                             'show' => true,
                                              'sub_buttons' => array(
                                              ),

ahora solo falta agregar al index.spanish(latin,es,ect).php las variables que usamos :

Code: [Select]
$txt['boton'] = 'tuForo';
$txt['blog'] = 'tuBlog';

espero les sirva

Gracias a Zutzu
Fuente : Skinmod
Trabajando duro o durando en el trabajo?
You do not have permission to give points
point 17 Points

Users who gave points in this topic » jukxz (5 Pts) » Lol1 (3 Pts) » petisociete (3 Pts) » Maiin (3 Pts) 

Usuario: Lean
Rango: Fundador
Mensajes: 6782
Points: 236
Perfil: View Profile
Pais:
ar
Re:[Tutorial] Como agregar botones al menu
Reply #1 June 08, 2011 - 06:09 06:09
Muy buen tutorial, siempre es buscado.

no avatar
Usuario: JhonHyslow
Rango: Recién Llegado
Mensajes: 8
Points: 0
Perfil: View Profile
Re:[Tutorial] Como agregar botones al menu
Reply #2 June 18, 2011 - 11:06 23:06
Muy bueno, aunque se vería mejor explicado con imágenes.
Saludos y +1

no avatar
Usuario: iCako
Rango: Recién Llegado
Mensajes: 35
Points: 0
Mi web: www.habbomundo.us/foro
Perfil: View Profile
Re:[Tutorial] Como agregar botones al menu
Reply #3 August 16, 2012 - 08:53 08:53
Te recomiendo subir imagenes del resultado, ya que "perder el tiempo" haciendo algo que quizas no te guste no es nada bueno :p xD

no avatar
Usuario: jukxz
Rango: Excelente User
Mensajes: 104
Points: 184
Perfil: View Profile
Pais:
ar
Re:[Tutorial] Como agregar botones al menu
Reply #4 August 16, 2012 - 09:54 09:54
iCako. este tema tiene ya mas de 1 año.
Creo que revivirlo, por hay el usuario que hizo el post, ya no se conecte o no tenga la imagen que pides.
Fijate la fecha... para la proxima :)

no avatar
Usuario: Kelly
Rango: Nueva Usuaria
Mensajes: 3
Points: 20
Mi web: http://www.creacionesentreamigos.com
Perfil: View Profile
Re:[Tutorial] Como agregar botones al menu
Reply #5 August 21, 2012 - 09:00 09:00
Hola como ves soy nueva y me interesa saber sobre el temita

como no se mucho sobre donde buscar las carpetas ya que soy nueva

en todo hasta en mi foro gracias a Lean que me invito me podria decir donde consigo

la carpeta Sources por favor para yo seguir cada paso que esta en el tuto te lo agradesco muchas gracias

Usuario: Lean
Rango: Fundador
Mensajes: 6782
Points: 236
Perfil: View Profile
Pais:
ar
Re:[Tutorial] Como agregar botones al menu
Reply #6 August 21, 2012 - 09:14 09:14
La carpeta sources esta en el root del foro. Debes entrar al ftp y buscar la carpeta public_html y dentro de ella esta la carpeta sources.
Pero mucho cuidado porque modificar archivos base del sistema puede conllevar a estropear el foro en 1 segundo. Mucho cuidado y sigue los tutoriales paso a paso.
Saludos

no avatar
Usuario: Lol1
Rango: Nuevo Usuario
Mensajes: 4
Points: 21
Perfil: View Profile
Re:[Tutorial] Como agregar botones al menu
Reply #7 August 25, 2012 - 08:06 20:06
Gracias amigo hace mucho tiempo lo necesitaba!
Van +3 Por que soy nuevo

no avatar
Usuario: wangly
Rango: Nuevo Usuario
Mensajes: 1
Points: 20
Mi web: http://www.luckydressshop.com
Perfil: View Profile
Re:[Tutorial] Como agregar botones al menu
Reply #8 August 28, 2012 - 09:08 21:08
very good

no avatar
Usuario: tropperbuzz
Rango: Nuevo Usuario
Mensajes: 2
Points: 20
Mi web: http://www.torrentland.net/smf/index.php
Perfil: View Profile
Pais:
es
Re:[Tutorial] Como agregar botones al menu
Reply #9 September 25, 2012 - 01:55 13:55
no consigo que se vea el boton porque puede ser



Code: [Select]
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'boton' => array(
            'title' => $txt['Tracker'],
            'href' => 'http://www.33333333333333333.php',
            'show' => true,
            'sub_buttons' => array(
            ),
           
         ),

'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,

Usuario: 4kstore
Rango: Moderador Global
Mensajes: 4916
Points: 8111
Mi web: http://www.smfsimple.com
Perfil: View Profile
Pais:
ar
Re:[Tutorial] Como agregar botones al menu
Reply #10 September 25, 2012 - 08:59 20:59
Creaste esta variable en el archivo de lenguaje?
$txt['Tracker']

Saludos

no avatar
Usuario: tropperbuzz
Rango: Nuevo Usuario
Mensajes: 2
Points: 20
Mi web: http://www.torrentland.net/smf/index.php
Perfil: View Profile
Pais:
es
Re:[Tutorial] Como agregar botones al menu
Reply #11 October 14, 2012 - 03:06 03:06
solucionado, era eso, muchisimas gracias

no avatar
Usuario: Juan
Rango: Nuevo Usuario
Mensajes: 4
Points: 2
Perfil: View Profile
Re:[Tutorial] Como agregar botones al menu
Reply #12 January 20, 2013 - 02:39 14:39
Buen Post, Justo necesito algunos botones para mi foro, bien Explicado aunque le pueden faltar imagenes, pero esto es muy buscado e visto varios tutoriales pero algunos tienen fallos.

 

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