Simple Machines Community Forum

SMF Support => Español (Spanish) => Language Specific Support => Tutoriales => Topic started by: mirahalo on February 16, 2009, 11:02:18 AM

Title: Agregar botones al menu en 2.0RC3, RC4
Post by: mirahalo on February 16, 2009, 11:02:18 AM
saludos, pues les dejo este pequeño tutorial para agregar botones al menu principal en 2.0 RC1 RC2, RC3 y RC4, como ya se sabe, en la version 1.xxx el menu se encontraba en index.template y si tenias un theme diferente tenias que hacer los cambios manualmente, esto se acabó con 2.0 RC1 en adelante, ahora el menu se encuentra en Subs.php dentro de la carpeta sources, de esta forma, ya no tenemos que preocuparnos por agregar botones de algun mod a nuestro theme personalizado.

primero lo primero, siempre hacer un backup de los archivos que vayamos a utilizar, en este caso Subs.php e index.tuidioma.php.

abrimos Subs.php y buscamos esto:



'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
         ),





despues agregamos la estructura básica del botón que queremos, sería algo como esto:


'boton' => array(
             'title' => $txt['boton'],
             'href' => 'http://www.tuenlace.com',
             'show' => true,
             'sub_buttons' => array(
        ),
   ),



cambia el "boton"  por lo que tu quieras, por ejem, chat, tracker, galeria, enlaces, lo que sea, de preferencia que no sean caracteres extraños o muy largos, cambia tambien el  'title' => $txt['boton'], por lo que quieras que aparezca, esto es, el titulo o nombre del boton, regularmente es la misma palabra para los dos.

'href' => 'http://www.tuenlace.com',    el enlace que quieras que tenga el boton.

'show' => true,  es el valor por defecto, lo podrán ver todos los usuarios, invitados y registrados.

ahora abre tu archivo index.tuidioma.php y busca:

$txt['home'] = 'Inicio';



agrega despues:

    $txt['boton'] = 'boton';


aqui cambia el boton por lo que pusiste en Subs.php, debe de ser igual o no aparecerá y por ultimo cambia el  'boton'  por lo que quieras que aparezca, y listo !!!!  ya tienes tu boton que servirá en todos los themes que tengas.
puedes agregar todos los botones que quieras siempre y cuando no se repitan los nombres que les des.


no olviden borrar su cache desde la administracion para poder ver los cambios:

Admin / mantenimiento / mantenimiento del foro / rutina / vaciar cache
Title: Re: Agregar botones al menu en 2.0RC1
Post by: varen sea on April 03, 2009, 01:36:44 PM
hola 130860, estoy siguiendo este manual y me encuentro con un pequeño problema, antes de nada aclarar que he seguido el manual como lo explicas.....
el problema es que el botón no se ve....

(http://img523.imageshack.us/img523/5388/botn.jpg)
bueno ya me diréis si falta algo y gracias.....
Salu2

Edit: solucionado todo perfecto, no se por que los cambios que voy realizando no se aplican al momento o casi al momento....

(http://img513.imageshack.us/img513/1927/botn1.jpg)

gracias 130860 muy buen manual.....
Salu2

Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 03, 2009, 09:56:57 PM
de nada,  gracias por contestar, ya me estaba empezando a preocupar de que a nadie le interesaba este tutorial...  jejejeje, que bueno que te sirvió ;)
Title: Re: Agregar botones al menu en 2.0RC1
Post by: ALLEN WALKER on April 07, 2009, 02:58:02 AM
oye hice lo que me dijiste tengo el SMF 2.0 RC1 y el tema Outline modificado
idioma Spanish
segui el tutorial y edite estos dos archivos
archivos (http://www.mediafire.com/download.php?ig4onmuyjib)
cuando lo hice dejo de salir el boton ayuda que es el que cambien por un boton de que te mande a un chat por favor podrias ayudarme
mi foro es este
animexz.com
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 07, 2009, 03:39:44 PM
dejame ver si entedi, lo que quieres es reemplazar el boton "ayuda" por uno que diga "Chat" y que te mande a la dirección que pusiste ??

bueno, edité los archivos, creo yo, que no tendrás problemas

si quieres volver a poner el boton de ayuda, solo ingresa este codigo en subs.php



'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),






Title: Re: Agregar botones al menu en 2.0RC1
Post by: ALLEN WALKER on April 09, 2009, 05:40:09 AM
ya los sustitui amigo y no paso nada desaparecio el boton ayuda pero no aparecio otro en su lugar dicen que tarda en reflejarce los cambios que hace uno entonces esperare y te digo que tal gracias de todas formas

mi foro es animexz.com
Title: Re: Agregar botones al menu en 2.0RC1
Post by: varen sea on April 09, 2009, 12:49:40 PM
Quote from: ALLEN WALKER on April 09, 2009, 05:40:09 AM
ya los sustitui amigo y no paso nada desaparecio el boton ayuda pero no aparecio otro en su lugar dicen que tarda en reflejarce los cambios que hace uno entonces esperare y te digo que tal gracias de todas formas

mi foro es animexz.com

hola ALLEN WALKER, comprueba este hilo: http://www.simplemachines.org/community/index.php?topic=303758.0
esto es lo que he realizado yo en este caso, en concreto al mod que hago referencia no afecta en nada a tu foro ya que no instala ningún botón en el editor BBC, nadie notara el cambio ya que para utilizar el mod tienes que escribir tu manualmente la etiqueta del mod , aparte de que se desinstala bien,
Salu2 
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 09, 2009, 08:26:23 PM
que raro, porque yo lo probé en local y si funcionó, hasta los probé por unos instantes en mi sitio y también funcionó, ya trataste de refrescar F5 y borrar el chaché de tu navegador ???
Title: Re: Agregar botones al menu en 2.0RC1
Post by: ALLEN WALKER on April 11, 2009, 06:35:44 PM
susutitui los archivos y depues de un rato me salio un error en mi foro no me dejo entrar me decia no se puede cargar plantilla eso fue la muerte gracias a dios que tenia una copia de seguriada de dos dias antes pero mis usuarios se molestaron es lo malo que no puedo probar cosas  asi no se que seria alomejor
hay un confilgto con el ezportal por que es el que tengo instalado no lo puedo desistalar  me marca un error que me recomiendas quiero usar unos botones
pero parece que no podre no sabes alguna forma de ponerlos en html o algo asi tengo un mod que se llama header nose que pero me da espacio para poner codigo y se ve en en cualquier parte del foro por favor si pudieras ayudarme gracias de ante mano
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Kiel D-04 on April 12, 2009, 12:46:42 PM
Jojojo funciona muy bien
muchas gracias por el tuto  :D
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 12, 2009, 06:43:03 PM
amigo ALLEN WALKER  te recomendaria que hicieras una limpieza profunda de tu foro, es malo el tener código de mods regados por todas partes, si no tienes muchos mods instalados puedes hacer lo que les comenté en este tema, de esta manera tendras un nuevo foro sin perder datos ni usuarios, despues empezar desde cero e ir instalando  los mod que necesites.

http://www.simplemachines.org/community/index.php?topic=303928.msg2010250#msg2010250

una vez que tengas un foro nuevo podras hacer los cambios de esye manual y no tendras problemas.


saludos !!!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: onlychriss on April 16, 2009, 07:43:38 PM
perdon pero abri subs y no encontre nada no se si me podrias ayudar
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 16, 2009, 09:46:58 PM
Quote from: onlychriss on April 16, 2009, 07:43:38 PM
perdon pero abri subs y no encontre nada no se si me podrias ayudar


claro, adjunta tu archivo subs.php


saludos !!!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: onlychriss on April 20, 2009, 11:24:18 PM
Quote from: 130860 on April 16, 2009, 09:46:58 PM
Quote from: onlychriss on April 16, 2009, 07:43:38 PM
perdon pero abri subs y no encontre nada no se si me podrias ayudar


claro, adjunta tu archivo subs.php


saludos !!!

Bueno segun yo lo modifique tomando en idea uno que ya estaba pero me sigue saliendo con la leyenda de AYUDA, mhh lo mas seguro es que lo modifique mal te dejo aqui el codigo

<?php
// Version: 1.1; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '1.1';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as oppossed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status seperate from topic icons? */
$settings['seperate_sticky_lock'] = true;

// Color changer
if(!$context['user']['is_guest'] && isset($_POST['options']['theme_color']))
{
include_once($GLOBALS['sourcedir'] . '/Profile.php');
makeThemeChanges($context['user']['id'], $settings['theme_id']);
$options['theme_color'] = $_POST['options']['theme_color'];
}
elseif ($context['user']['is_guest'])
{
if (isset($_POST['options']['theme_color']))
{
  $_SESSION['theme_color'] = $_POST['options']['theme_color'];
  $options['theme_color'] = $_SESSION['theme_color'];
}
elseif (isset($_SESSION['theme_color']))
  $options['theme_color'] = $_SESSION['theme_color'];
}
}

// The main sub template above the content.
function template_main_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''><head>
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title'], '" />', empty($context['robot_no_index']) ? '' '
<meta name="robots" content="noindex" />'
'
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";
// ]]></script>
<title>'
$context['page_title'], '</title>';

// Any color set by user?
if (isset($options['theme_color']))
$settings['theme_main_color'] = $options['theme_color'];

// If not set, or if not allowed to set
if(!isset($options['theme_color']) || (isset($settings['allow_color_change']) && $settings['allow_color_change'] == 'no'))
{
// Defaults.
$options['theme_color'] = isset($settings['theme_main_color']) ? $settings['theme_main_color'] : 'lightblue';
$settings['theme_main_color'] = $options['theme_color'];
}

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style_' $settings['theme_main_color'] , '.css?fin11" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?fin11" media="print" />';

/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/fonts-compat.css" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name'], ' - RSS" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="' 
$scripturl '?board=' $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = '
, empty($options['collapse_header']) ? 'false' 'true'';

function shrinkHeader(mode)
{'
;

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + '  
'"/'$settings['theme_main_color'] . '" + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>'
;

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = '
, empty($options['collapse_header_ic']) ? 'false' 'true'';

function shrinkHeaderIC(mode)
{'
;

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);'
;
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "'
$context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + '  
'"/'$settings['theme_main_color'] . '" + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
</head>
<body>'
;

echo '
<div class="maindiv" style="width: ' 
, (isset($settings['page_div_width']) && !empty($settings['page_div_width'])) ? $settings['page_div_width'] : '99%' ,  ';">
<div style="width: 100%;" class="topbar">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
<tr>
<td style="padding:0;" width="1" height="120">'
;

if(!($settings['logo_not_show']))
{
if (empty($settings['header_logo_url']))
echo '
<a href="'
$scripturl'"><img src="'$settings['images_url'] . '/'$settings['theme_main_color'], '/logo.jpg" style="margin: 0px;" alt="'$context['forum_name'], '" title="'$context['forum_name'], '"/></a>';
else
echo '
<a href="'
$scripturl'"><img src="'$settings['header_logo_url'], '" style="margin: 0px;" alt="'$context['forum_name'], '" /></a>';
}
echo '
</td>'
;

if (!empty($settings['show_name_near_logo']))
echo '
<td>
<span style="font-family: \'Trebuchet MS\', Verdana, sans-serif; font-size: 150%; color: white; padding-top: 30px; padding-left: 30px; white-space: normal;">'
$context['forum_name'], '</span>
</td>'
;
if (!empty($settings['top_right_html']))
echo '
<td valign="top" align="right">
<div style="color: white; padding-top: 10px; float:right;">'
$settings['top_right_html'], '</div>
</td>'
;

echo '
</tr>
</table>
</div>
<div style="width: 100%; padding-top: 4px;" class="topbar2">
<table border="0" cellspacing="0" cellpadding="0" style="width: 100%;">
<tr>'
;

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '

<td valign="middle" height="30" class="smalltext" style="padding-left:10px; padding-top:0px; padding-bottom:0px;">
<b>'
$txt[102], '</b>: '$context['random_news_line'], '
</td>
'
;
echo '
<td valign="middle" height="30" style="padding-top:0px; padding-bottom:0px; padding-right:20px;" class="middletext" align="right">
<form action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '" style="margin: 0px;">
<a href="'
$scripturl'?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0px;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="'
$txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '
</form>

</td>
</tr>
</table>
</div>
<div class="menubar">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>'
;
// Show the menu here, according to the menu sub template.
template_menu();
echo '
</tr>
</table>
</div>'
;

// Here we start the main page, after the menu bar.
// Unfortunately, IE 6 couldn't handle a div here with a CSS background property, no matter how much I tried. So we use a table for IE here. I love Firefox ^_^ visit getfirefox.com for more info.
// It is time for Microsoft to get rid of IE and make Firefox their primary browser :P
// Ok, Opera can also display the div properly. I love both FF & Opera :)

echo '
'
$context['browser']['is_ie'] ? '<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><td class="mainpage">' 
'<div class="mainpage">''
<a style="float:right;" href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="'
$settings['images_url'], '/'$settings['theme_main_color'], '/', empty($options['collapse_header']) ? 'collapse.gif' 'expand.gif''" alt="*" title="'$txt['upshrink_description'], '" align="bottom" style="margin: 0 1ex;" /></a>

<div class="memberbardiv">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="20">
</td>
<td class="memberbar">'
;

if($context['user']['is_logged'])
echo '
'
$txt['hello_member_ndt'], ' <b>'$context['user']['name'] , '</b>';
else
echo $txt['welcome_guest'];

echo '
</td>

<td class="middletext" align="right" valign="top" style="padding-right:10px; padding-left:10px;">
$context['current_time'], '
<br/>
</td>

</tr>

<tr id="upshrinkHeader"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td valign="middle" width="1" style="padding-right:10px; padding-left:10px;">'
, !empty($context['user']['avatar']) ? $context['user']['avatar']['image'] : '''</td>

<td class="memberbar">'
;

if($context['user']['is_logged'])
echo '
<br/>
<span class="middletext">'
$context['allow_pm'] ? '<b>' $txt[152] . ' <a href="' $scripturl '?action=pm">' $context['user']['messages'] . ' ' . ($context['user']['messages'] != $txt[153] : $txt[471]) . '</a>' $txt['newmessages4'] . ' ' $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == $txt['newmessages0'] : $txt['newmessages1']).'</b>' '<br/>''.<br/><br/>
> <a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a> <br />
> <a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a><br />

</span>'
;

echo '
</td>
<td class="middletext" align="right" valign="top" style="padding-right:10px; padding-left:10px;">
<br/>'
;
// Are they logged in?
if ($context['user']['is_logged'])
{
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
'
$txt['totalTimeLogged1'];

// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
}
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>'
$txt[616], '</b><br />';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '<br />';

}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo '
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/sha1.js"></script>

<form action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">'
$txt['smf53'], '</option>
<option value="1440">'
$txt['smf47'], '</option>
<option value="10080">'
$txt['smf48'], '</option>
<option value="43200">'
$txt['smf49'], '</option>
<option value="-1" selected="selected">'
$txt['smf50'], '</option>
</select>
<input type="submit" value="'
$txt[34], '" /><br />
<span class="middletext">'
$txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>
<br/><br/>'
;
}

echo '
</td>
</tr>
<tr id="upshrinkHeader2"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<td colspan="3" class="memberbardivbottom">'
;

// color selection box
if(isset($settings['allow_color_change']) && $settings['allow_color_change'] == 'box')
  echo '
  <div style="position: relative; bottom: 13px; right:15px; float:right; font-size:16px;">
<form action="'
$scripturl'" method="post">
<select name="options[theme_color]">
<option style="color:#6699CC;" value="lightblue" '
,$settings['theme_main_color'] == 'lightblue' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#5371AD;" value="lightnavy" '
,$settings['theme_main_color'] == 'lightnavy' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#6C7F93;" value="lightsilver" '
,$settings['theme_main_color'] == 'lightsilver' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#53ADAD;" value="lightturquoise" '
,$settings['theme_main_color'] == 'lightturquoise' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#4DB45D;" value="lightgreen" '
,$settings['theme_main_color'] == 'lightgreen' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#93A659;" value="lightolive" '
,$settings['theme_main_color'] == 'lightolive' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#D8A259;" value="lightgolden" '
,$settings['theme_main_color'] == 'lightgolden' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#a67259;" value="lightbrown" '
,$settings['theme_main_color'] == 'lightbrown' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#E15050;" value="lightred" '
,$settings['theme_main_color'] == 'lightred' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#D47BC5;" value="lightrose" '
,$settings['theme_main_color'] == 'lightrose' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#A185D6;" value="lightlilac" '
,$settings['theme_main_color'] == 'lightlilac' 'selected="selected"''''>&bull;&bull;&bull;</option>
<option style="color:#7F88B2;" value="lightviolet" '
,$settings['theme_main_color'] == 'lightviolet' 'selected="selected"''''>&bull;&bull;&bull;</option>
</select>
<input type="submit" name="submit" value="&raquo;&raquo;" style="width: 8ex;  font-size:12px;" />
</form>
</div>'
;
if(isset($settings['allow_color_change']) && $settings['allow_color_change'] == 'bars')
echo '
<div style="position: relative; bottom: 15px; right:15px; float:right; ">
<form action="'
$scripturl'" method="post" class="smalltext">
<input style="border: solid 2px #6699CC; background-color: #6699CC; color: #6699CC; width: 20px; font-size: 1px;" type="submit" value="lightblue" name="options[theme_color]"/>
<input style="border: solid 2px #5371AD; background-color: #5371AD; color: #5371AD; width: 20px; font-size: 1px;" type="submit" value="lightnavy" name="options[theme_color]"/>
<input style="border: solid 2px #6C7F93; background-color: #6C7F93; color: #6C7F93; width: 20px; font-size: 1px;" type="submit" value="lightsilver" name="options[theme_color]"/>
<input style="border: solid 2px #53ADAD; background-color: #53ADAD; color: #53ADAD; width: 20px; font-size: 1px;" type="submit" value="lightturquoise" name="options[theme_color]"/>
<input style="border: solid 2px #4DB45D; background-color: #4DB45D; color: #4DB45D; width: 20px; font-size: 1px;" type="submit" value="lightgreen" name="options[theme_color]"/>
<input style="border: solid 2px #93A659; background-color: #93A659; color: #93A659; width: 20px; font-size: 1px;" type="submit" value="lightolive" name="options[theme_color]"/>
<input style="border: solid 2px #D8A259; background-color: #D8A259; color: #D8A259; width: 20px; font-size: 1px;" type="submit" value="lightgolden" name="options[theme_color]"/>
<input style="border: solid 2px #a67259; background-color: #a67259; color: #a67259; width: 20px; font-size: 1px;" type="submit" value="lightbrown" name="options[theme_color]"/>
<input style="border: solid 2px #E15050; background-color: #E15050; color: #E15050; width: 20px; font-size: 1px;" type="submit" value="lightred" name="options[theme_color]"/>
<input style="border: solid 2px #D47BC5; background-color: #D47BC5; color: #D47BC5; width: 20px; font-size: 1px;" type="submit" value="lightrose" name="options[theme_color]"/>
<input style="border: solid 2px #A185D6; background-color: #A185D6; color: #A185D6; width: 20px; font-size: 1px;" type="submit" value="lightlilac" name="options[theme_color]"/>
<input style="border: solid 2px #7F88B2; background-color: #7F88B2; color: #7F88B2; width: 20px; font-size: 1px;" type="submit" value="lightviolet" name="options[theme_color]"/>
</form>
</div>'
;
echo '
</td>
</tr>

</table>
</div>'
;

if(!empty($settings['custom_global_html']))
echo '
<div align="center" style="width: 90%; margin-left: auto; margin-right: auto; margin-top:10px; border: 0px solid;" class="middletext">
'
$settings['custom_global_html'], '
</div>'
;

// The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 25px 2ex 25px;">'
;
}

function 
template_main_below()
{
global $context$settings$options$scripturl$txt;

echo '
</div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '

<div id="footerarea" style="text-align: center; padding-bottom: 1ex;'
$context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' width: 100%;' '''">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function smfFooterHighlight(element, value)
{
element.src = smf_images_url + "/" + (value ? "h_" : "") + element.id + ".gif";
}
// ]]></script>
<table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
<tr>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'right' 'left''">
<a href="http://www.mysql.com/" target="_blank"><img id="powered-mysql" src="'
$settings['images_url'], '/powered-mysql.gif" alt="'$txt['powered_by_mysql'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://www.php.net/" target="_blank"><img id="powered-php" src="'
$settings['images_url'], '/powered-php.gif" alt="'$txt['powered_by_php'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
</td>
<td valign="middle" align="center" style="white-space: nowrap;">
'
theme_copyright(), '
<br/><br/>
<span class="smalltext">'
$settings['custom_copyright'] . '</span>
</td>
<td width="28%" valign="middle" align="'
, !$context['right_to_left'] ? 'left' 'right''">
<a href="http://validator.w3.org/check/referer" target="_blank"><img id="valid-xhtml10" src="'
$settings['images_url'], '/valid-xhtml10.gif" alt="'$txt['valid_xhtml'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"><img id="valid-css" src="'
$settings['images_url'], '/valid-css.gif" alt="'$txt['valid_css'], '" width="54" height="20" style="margin: 5px 16px;" onmouseover="smfFooterHighlight(this, true);" onmouseout="smfFooterHighlight(this, false);" /></a>
<span style="float:right; margin-right:10px; font-size:70%;"><b>Dilber MC</b> Theme by <b><a href="http://www.harzem.com/themes/themes.php?theme=dilbermc;color='
$settings['theme_main_color'], '" target="_blank">HarzeM</a></b></span>
</td>
</tr>
</table>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">'
$txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';

// This is an interesting bug in Internet Explorer AND Safari. Rather annoying, it makes overflows just not tall enough.
if (($context['browser']['is_ie'] && !$context['browser']['is_ie4']) || $context['browser']['is_mac_ie'] || $context['browser']['is_safari'] || $context['browser']['is_firefox'])
{
// The purpose of this code is to fix the height of overflow: auto div blocks, because IE can't figure it out for itself.
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA['
;

// Unfortunately, Safari does not have a "getComputedStyle" implementation yet, so we have to just do it to code...
if ($context['browser']['is_safari'])
echo '
window.addEventListener("load", smf_codeFix, false);

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}'
;
elseif ($context['browser']['is_firefox'])
echo '
window.addEventListener("load", smf_codeFix, false);
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = 0; i < codeFix.length; i++)
{
if (codeFix[i].className == "code" && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0))
codeFix[i].style.overflow = "scroll";
}
}'
;
else
echo '
var window_oldOnload = window.onload;
window.onload = smf_codeFix;

function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");

for (var i = codeFix.length - 1; i > 0; i--)
{
if (codeFix[i].currentStyle.overflow == "auto" && (codeFix[i].currentStyle.height == "" || codeFix[i].currentStyle.height == "auto") && (codeFix[i].scrollWidth > codeFix[i].clientWidth || codeFix[i].clientWidth == 0) && (codeFix[i].offsetHeight != 0 || codeFix[i].className == "code"))
codeFix[i].style.height = (codeFix[i].offsetHeight + 36) + "px";
}

if (window_oldOnload)
{
window_oldOnload();
window_oldOnload = null;
}
}'
;

echo '
// ]]></script>'
;
}

echo '
</div>
'
,($context['browser']['is_ie']) ? '</td></tr></table>' '</div>' '
</div>'
;
// The following will be used to let the user know that some AJAX process is running
echo '
<div id="ajax_in_progress" class="ajax_in_progress" style="display: none;'
$context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' '''">'$txt['ajax_in_progress'], '</div>
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
global $context$settings$options;

echo '<div class="nav" style="font-size: 85%; margin-bottom: 2ex; margin-top: 2ex;">';

// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

// Show the link, including a URL if it should have one.
echo '<b>'$settings['linktree_link'] && isset($tree['url']) ? '<a href="' $tree['url'] . '" class="nav">' $tree['name'] . '</a>' $tree['name'], '</b>';

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}

echo '</div>';
}

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

// Work out where we currently are.
$current_action 'home';
if (in_array($context['current_action'], array('admin''ban''boardrecount''cleanperms''detailedversion''dumpdb''featuresettings''featuresettings2''findmember''maintain''manageattachments''manageboards''managecalendar''managesearch''membergroups''modlog''news''optimizetables''packageget''packages''permissions''pgdownload''postsettings''regcenter''repairboards''reports''serversettings''serversettings2''smileys''viewErrorLog''viewmembers')))
$current_action 'admin';
if (in_array($context['current_action'], array('search''admin''calendar''profile''mlist''register''login''help''pm')))
$current_action $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action 'search';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

// Dummy place holder, to set the height
echo'
<td align="center" class="menubg" height="30" width="20">
</td>'
;

// Show the [home] button.
echo'
<td align="center" class="menubg' 
$current_action == 'home' '2' '' '">
<a href="'
$scripturl'">' $txt[103] , '</a>
</td>'
;

// Show the [Foro] button.
echo'
<td align="center" class="menubg' 
$current_action == 'Foro' '2' '' '">
<a href="'
$scripturl'?action=foro">' $txt[119] , '</a>
</td>'
;

 // Show the [help] button.
echo'
<td align="center" class="menubg' 
$current_action == 'help' '2' '' '">
<a href="'
$scripturl'?action=help">' $txt[119] , '</a>
</td>'
;

// How about the [search] button?
if ($context['allow_search'])
echo'
<td align="center" class="menubg' 
$current_action == 'search' '2' '' '">
<a href="'
$scripturl'?action=search">' $txt[182] , '</a>
</td>'
;
// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo'
<td align="center" class="menubg' 
$current_action == 'admin' '2' '' '">
<a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
</td>'
;
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo'
<td align="center" class="menubg' 
$current_action == 'profile' '2' '' '">
<a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
</td>'
;
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo'
<td align="center" class="menubg' 
$current_action == 'pm' '2' '' '">
<a href="'
$scripturl'?action=pm">' $txt['pm_short'] , ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
</td>'
;
// The [calendar]!
if ($context['allow_calendar'])
echo'
<td align="center" class="menubg' 
$current_action == 'calendar' '2' '' '">
<a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
</td>'
;
// the [member] list button
if ($context['allow_memberlist'])
echo'
<td align="center" class="menubg' 
$current_action == 'mlist' '2' '' '">
<a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
</td>'
;

// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo'
<td align="center" class="menubg' 
$current_action == 'login' '2' '' '">
<a href="'
$scripturl'?action=login">' $txt[34] , '</a>
</td>'
;
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo'
<td align="center" class="menubg' 
$current_action == 'register' '2' '' '">
<a href="'
$scripturl'?action=register">' $txt[97] , '</a>
</td>'
;
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo'
<td align="center" class="menubg' 
$current_action == 'logout' '2' '' '">
<a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
</td>'
;


// Dummy place holder, to end things
echo'
<td align="center" class="menubg" width="20">
</td>'
;

}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$force_reset false$custom_td '')
{
global $settings$buttons$context$txt$scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td>&nbsp;</td>';

echo '
<td class="'
$direction == 'top' 'main' 'main''strip_first''">&nbsp;</td>
<td class="'
$direction == 'top' 'main' 'main''strip">'implode(' &nbsp;|&nbsp; '$button_strip) , '</td>
<td class="'
$direction == 'top' 'main' 'main''strip_last' '">&nbsp;</td>';
}

?>


Esto fue lo que agregue

// Show the [Foro] button.
   echo'
            <td align="center" class="menubg' , $current_action == 'Foro' ? '2' : '' , '">
               <a href="', $scripturl, '?action=foro">' , $txt[119] , '</a>
            </td>';
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 21, 2009, 08:05:06 AM
Hola, lo que pasa es que no cambiaste el string de texto, me explico,   


// Show the [Foro] button.
echo'
<td align="center" class="menubg' , $current_action == 'forum' ? '2' : '' , '">
<a href="', $scripturl, '?action=forum">' , 'Foro' , '</a>
</td>';


la accion correcta para acceder al foro es:

$scripturl, '?action=forum   

el texto que quieres que apareceza viene despues:

' , $txt[119] , '   en este caso le estas indicando que tome el string número 119 que corresponde a "ayuda",   simplemente lo cambie por la letra directamente sin usar strings ya que no sé que portal estás usando o si tengas tu foro en un subdirectorio y tengas una pagina principal.

si tienes tu página principal aparte y quieres que el botón inicio se diriga hacia allá, tienes que modificarlo de la siguiente manera:

// Show the [home] button.
echo'
<td align="center" class="menubg' , $current_action == 'home' ? '2' : '' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>';



donde en lugar de 

<a href="', $scripturl, '">

tienes que poner:

<a href="http://www.tusitio.com">   que es la dirección de tu sitio principal.


saludos !!!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: onlychriss on April 21, 2009, 11:36:24 AM
Quote from: 130860 on April 21, 2009, 08:05:06 AM
Hola, lo que pasa es que no cambiaste el string de texto, me explico,   


// Show the [Foro] button.
echo'
<td align="center" class="menubg' , $current_action == 'forum' ? '2' : '' , '">
<a href="', $scripturl, '?action=forum">' , 'Foro' , '</a>
</td>';


la accion correcta para acceder al foro es:

$scripturl, '?action=forum   

el texto que quieres que apareceza viene despues:

' , $txt[119] , '   en este caso le estas indicando que tome el string número 119 que corresponde a "ayuda",   simplemente lo cambie por la letra directamente sin usar strings ya que no sé que portal estás usando o si tengas tu foro en un subdirectorio y tengas una pagina principal.

si tienes tu página principal aparte y quieres que el botón inicio se diriga hacia allá, tienes que modificarlo de la siguiente manera:

// Show the [home] button.
echo'
<td align="center" class="menubg' , $current_action == 'home' ? '2' : '' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>';



donde en lugar de 

<a href="', $scripturl, '">

tienes que poner:

<a href="http://www.tusitio.com">   que es la dirección de tu sitio principal.


saludos !!!

Ok muchas gracias ya por fin pude ponerle el boton al foro. Ahora de lo que me dices del boton Inicio pues no tuve que modificarlo ya que solo me manda a la pagina del portal uso el simple portal, y pues aprovechando no se si me pudieras ayudar con la traduccion lo e buscado y no encuentro como traducirlo.
te dejo mi sitio para que veas como quedo el boton banneados.com no se si esto este permitido pero si no sorry
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 22, 2009, 09:01:25 AM
hola, bueno, hasta ahora la única traducción al español que hay es para spanish_es,  y la puedes bajar en   http://simpleportal.net/index.php?action=download     pero si tienes otro español, por ejem, spanish_latin, pronto estará disponible esa tradicción también, solo es cuestión de esperar, se instala como un mod normal, desde el administrador de paquetes.


saludos !!!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: varen sea on April 22, 2009, 06:18:11 PM
hola 130860, he estado intentando cambiar la palabra de inicio por portal y no doy con el tema,
no se si me he explicado...
el caso es que lo he intentado con las explicaciones que has dado un poco mas arriba y no lo veo claro,
si fueras tan amable de darme alguna pista para el theme de fault te lo agradecería enormemente..
Ah! todavía no tengo instalado ningún portal, jejeje...
Salu2 
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 23, 2009, 09:54:56 AM
hola amigo waren, si usas el theme default, entonces el portal que utilices deberá de hacerlo por ti, ya que es una regla que todos los mod funcionen para el theme default.

Instala el portal que mas te guste/ te convenga (te recomiendo simpleportal :P ) y si no aparece el botón, con gusto te ayudo, si usas smf 2.0, entonces adjunta tu archivo sources/subs.php, si utilizas 1.1.x, adjunta tu archivo Themes/default/index.template.php

saludos !!!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: varen sea on April 23, 2009, 10:51:15 AM
bueno 130860 lo primero es agradecer todo tu interés en resolver este asunto,

antes comentarte de que es para la versión 2CR1, en la 1.1.8  ya se como hacerlo y la verdad es que es mucho mas fácil en esta versión, por esto mi consulta es en la 2CR1...

en cuanto al portal he probado todos los portales que he encontrado y si estas en lo cierto,  simpleportal es realmente bueno, fácil de aplicar y muy configurable,

pero al final me decidí por PortaMx que es donde quiero hacer el cambio, aunque tengo que decirte que en ninguno de los dos me aparecido el botón portal, bueno aparte de esto lo que me gustaría es saber como se hace...

una pregunta más, si llego a cambiar la palabra inicio por portal, también me va a valer para cambiar la palabra foro por ir al foro?... bueno entiende que son dudas que me surgen y me gustaría saber hacer,
pero bueno para empezar aquí dejo el archivo


<?php

// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($buttonData cache_get_data('menu_buttons-' implode('_'$user_info['groups']) . '-' $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
{
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
//-> start add PortaMx
'forum' => array(
'title' => $txt['forum'],
'href' => $scripturl '?action=forum',
'show' => $context['PortaMx']['settings']['frontpage'] != 'none',
'sub_buttons' => array(
),
),
$txt['download'] => array(
'title' => $txt['download'],
'href' => $scripturl . (!empty($context['PortaMx']['settings']['dl_action']) && $context['PortaMx']['settings']['dl_action']{0} == '@' '?'substr($context['PortaMx']['settings']['dl_action'], 1) : (!empty($context['PortaMx']['settings']['dl_action']) ? '?action='$context['PortaMx']['settings']['dl_action'] : '')),
 
'show' => !empty($context['PortaMx']['settings']['download']) && !empty($context['PortaMx']['settings']['dl_action']),
'sub_buttons' => array(
),
),
//-> end add PortaMx

'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']),
),
//-> start add PortaMx
'pmx_center' => array(
'title' => $txt['pmx_admincenter'],
'href' => $scripturl '?action=admin;area=pmx_center',
'show' => allowedTo('admin_forum'),
),
//-> end add PortaMx

'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
),
),
),
//-> start change PortaMx
'moderate'. ($context['allow_mod_center_pmx'] ? '' '_none')  => array(
'title' => $txt['moderate'],
'href' => $scripturl '?action=moderate',
'show' => $context['allow_mod_center_pmx'],
'sub_buttons' => array()
),
//-> end change PortaMx
//-> start add PortaMx
'moderate'. (!$context['allow_mod_center_pmx'] && $context['allow_moderation_center'] ? '' '_none') => array(
'title' => $txt['moderate'],
'href' => $scripturl '?action=moderate',
'show' => !$context['allow_mod_center_pmx'] && $context['allow_moderation_center'],
//-> end add PortaMx

'sub_buttons' => array(
'modlog' => array(
'title' => $txt['modlog_view'],
'href' => $scripturl '?action=moderate;area=modlog',
'show' => !empty($modSettings['modlog_enabled']),
),
'poststopics' => array(
'title' => $txt['mc_unapproved_poststopics'],
'href' => $scripturl '?action=moderate;area=postmod;sa=posts',
'show' => $modSettings['postmod_active'],
),
'attachments' => array(
'title' => $txt['mc_unapproved_attachments'],
'href' => $scripturl '?action=moderate;area=attachmod;sa=attachments',
'show' => $modSettings['postmod_active'],
),
'reports' => array(
'title' => $txt['mc_reported_posts'],
'href' => $scripturl '?action=moderate;area=reports',
'show' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any''profile_identity_own''manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any''profile_extra_own')),
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
),
),
),
'calendar' => array(
'title' => $txt['calendar'],
'href' => $scripturl '?action=calendar',
'show' => $context['allow_calendar'],
'sub_buttons' => array(
'view' => array(
'title' => $txt['calendar_menu'],
'href' => $scripturl '?action=calendar',
'show' => allowedTo('calendar_post'),
),
'post' => array(
'title' => $txt['calendar_post_event'],
'href' => $scripturl '?action=calendar;sa=post',
'show' => allowedTo('calendar_post'),
),
),
),
'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl '?action=mlist;sa=search',
'show' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register' => array(
'title' => $txt['register'],
'href' => $scripturl '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => true,
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => true,
),
);

$load_menu_js false;
// Now we put the buttons in the context so the theme can use them.
$menu_buttons = array();
foreach ($buttons as $act => $button)
if (!empty($button['show']))
{
$button['active_button'] = false;

// Make sure the last button truely is the last button.
if (!empty($button['is_last']))
{
if (isset($last_button))
unset($menu_buttons[$last_button]['is_last']);
$last_button $act;
}

// Go through the sub buttons if there are any.
if (!empty($button['sub_buttons']))
foreach ($button['sub_buttons'] as $key => $subbutton)
{
if (empty($subbutton['show']))
unset($button['sub_buttons'][$key]);
}

// If this still has some sub buttons then we need to tell the template to load the menu javascript file.
if (!empty($button['sub_buttons']))
$load_menu_js true;

$menu_buttons[$act] = $button;
}
$buttonData = array($menu_buttons$load_menu_js);

if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2)
cache_put_data('menu_buttons-' implode('_'$user_info['groups']) . '-' $user_info['language'], $buttonData$cacheTime);
}

list($context['menu_buttons'], $context['load_menu_js']) = $buttonData;

// Logging out requires the session id in the url.
if (isset($context['menu_buttons']['logout']))
$context['menu_buttons']['logout']['href'] = sprintf($context['menu_buttons']['logout']['href'], $context['session_var'], $context['session_id']);

// Figure out which action we are doing so we can set the active tab.
// Default to home.
$current_action 'home';

if (isset($context['menu_buttons'][$context['current_action']]))
$current_action $context['current_action'];
elseif ($context['current_action'] == 'search2')
$current_action 'search';
elseif ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' 'profile' 'admin';

//-> start add PortaMx
if($context['PortaMx']['settings']['frontpage'] != 'none')
{
if(isset($_REQUEST['board']) || isset($_REQUEST['topic']) || isset($_REQUEST['forum']))
$current_action 'forum';
elseif(in_array($context['current_action'], array('unreadreplies''unread''who')))
$current_action 'forum';
}
  if(!empty(
$context['PortaMx']['settings']['dl_action']) && isset($_REQUEST['action']) && strpos($_REQUEST['action'], $context['PortaMx']['settings']['dl_action']) !== false)
    
$current_action $txt['download'];
//-> end add PortaMx
elseif ($context['current_action'] == 'register2')
$current_action 'register';
elseif (in_array($context['current_action'], array('login2''reminder')))
$current_action 'login';

$context['menu_buttons'][$current_action]['active_button'] = true;

// Only load the menu javascript stuff when we have to.
$context['load_menu_js'] = false;

if (!$user_info['is_guest'] && $context['user']['unread_messages'] > && isset($context['menu_buttons']['pm']))
$context['menu_buttons']['pm']['title'] .= ' [<strong>'$context['user']['unread_messages'] . '</strong>]';
}

// Generate a random seed and ensure it's stored in settings.
function smf_seed_generator()
{
global $modSettings;

// Never existed?
if (empty($modSettings['rand_seed']))
{
$modSettings['rand_seed'] = microtime() * 1000000;
updateSettings(array('rand_seed' => $modSettings['rand_seed']));
}

if (@version_compare(PHP_VERSION'4.2.0') == -1)
{
$seed = ($modSettings['rand_seed'] + ((double) microtime() * 1000003)) & 0x7fffffff;
mt_srand($seed);
}

// Change the seed.
updateSettings(array('rand_seed' => mt_rand()));
}

?>


ya me dirás si es suficiente ya que el archivo subs.php es muy extenso,
y gracias por todo 130860
Salu2 
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 23, 2009, 11:24:28 AM
hola, no veo ningún problema relacionado con el código, puede ser una cuestión del lenguaje, prueba con esto:


'home' => array(
'title' => 'Portal',
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
//-> start add PortaMx
'forum' => array(
'title' => 'Foro',
'href' => $scripturl . '?action=forum',
'show' => $context['PortaMx']['settings']['frontpage'] != 'none',
'sub_buttons' => array(
),



en donde he cambiado el "inicio"  por "Portal"  y también el "forum"  por "Foro"  directamente y así no depender de ningún archivo de idioma.


si aún así, el botón no aparece, tendrás que adjuntar todo tu archivo subs.php y tambien tu archivo index.tuidioma.php  o en su defecto, el archivo en donde portamx pone sus strings de texto, podria ser el modifications.php o un archivo propio de portamx, por lo que ví, parece ser que portamx tiene sus propios archivos de texto.
Title: Re: Agregar botones al menu en 2.0RC1
Post by: varen sea on April 23, 2009, 11:49:36 AM
Ok 130860,  no es suficiente, voy a ver si veo algo de lo que me comentas, en cuanto al index.tuidioma.php lo compruebo ahora mismo, también en los archivos del PortaMx aquí ni se me a ocurrido mirar,  voy a ver,
para adjuntar hay un problema y es que no puedo adjuntar todo el subs.php por ejemplo, es por la cantidad de caracteres que dispone el foro, no me deja ya que esta limitado,
si sigo sin dar con la solución ya respondo en este hilo,
gracias 130860,

Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on April 23, 2009, 11:55:55 AM
prueba el subirlo a un servidor de descargas tipo megaupload o similares, y es muy importante que revises los archivos de idioma de portamx   y que adjuntes tu archivo subs.php pues puede haber conflictos de código  si has instalado otros portales antes.
Title: Re: Agregar botones al menu en 2.0RC1
Post by: varen sea on April 23, 2009, 12:47:05 PM
Ok dame tiempo ahora no puedo subir a ningún server, he estado mirando el index.tuidioma.php  y tampoco consigo nada , en cuanto pueda subo los archivos aunque no sabría cuales son los que modifican las funciones dentro de la carpeta de PortaMx, también existe dentro de la carpeta Sources otra carpeta del PortaMx...
esta tampoco la he mirado a fondo pero lo dicho en cuanto realice todas las comprobaciones y pueda lo subo, Ah! y si esta completamente limpio el portal ya que estaba indeciso entre el simpleportal y este ultimo, ayer realice la consulta y tal vez la impaciencia me haga precipitarme, y lo he instalado hoy,  en fin aunque tengo en local los dos no me decidía
bueno ya tranquilamente y con paciencia te dejo los archivos, gracias por tu dedicación 130860... O:)
Salu2

Edit: bueno aquí esta, ya me dirás si es suficiente, Salu2 
http://rapidshare.com/files/225127173/Bot_n_Inicio_por_Portal.rar.html
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on May 07, 2009, 11:08:50 PM
uff, no me habia dado cuenta de que ya habias puesto tu archivo :P ... bueno, deja lo reviso y te aviso...

/me edita ;)

prueba con este archivo adjunto, lo probé en un foro local y funcionó a la perfección, supongo que en el tuyo será igual, revisé el archivo y te faltaban pedazos de código del portamx.

cualquier cosa me avisas ;)

saludos !!!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: varen sea on May 10, 2009, 06:49:13 PM
gracias 130860  sin problemas,
Salu2
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on May 10, 2009, 10:37:23 PM
Quote from: waren on May 10, 2009, 06:49:13 PM
gracias 130860  sin problemas,
Salu2

me alegro de que te haya funcionado ;)

si tienen alguna otrs pregunta, no duden en consultar !!!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: pendrakon on May 11, 2009, 12:34:17 PM
hay algna manera de asignarle target al boton, para que se abra en ventana nueva?
thx
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on May 11, 2009, 03:29:04 PM
hola, bueno eso no se puede hacer desde aqui, sin embargo si es posible hacerlo, para hacerlo tiewnes que ir a tu archivo index.template.php y buscar algo como esto:

// Show the menu up top. Something like [home] [help] [profile] [logout]...

y un poco mas abajo encontraras el diseño para cada botón:


foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $button['href'], '"><b>', $button['title'], '</b></a></li>';


este ejem es del theme reference, puede variar en otros themes, ahi simplemente le agregas el target blank




foreach ($context['menu_buttons'] as $act => $button)
echo '<li><a ', $button['active_button'] ? ' class="current"' : '' , ' href="', $button['href'], ' 'target="blank"'"><b>', $button['title'], '</b></a></li>';




desafortunadamente, esto hara que todos los botones tengan ese target, no creo que se pueda hacer para un solo boton anque tratare de investigarlo.

saludos !!!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: pendrakon on May 11, 2009, 05:25:42 PM
bueno, muchas gracias, lo otro seria meter el boton a la mala en el index jaja
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Crazyes on May 24, 2009, 12:22:08 PM
130860

Donde dices en el manual ahora abre tu index.tuidioma.php donde puedo encotnrarlo?
siendo tuidioma = español = spanish.

Saludos
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on May 25, 2009, 08:46:53 AM
los archivos que utiliza este manual se encuentran en:

Themes/default/languages/index.tudioma.php  para el index.tuidioma.php

y

Sources/Subs.php para Subs.php


saludos!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Alphonze on June 12, 2009, 05:24:30 PM
Aproximadamente cuanto tiempo toma el visualizar los cambios realizados?

Edito.
Uso: SMF 2.0 RC1-1
Theme: Prof
Simple Portal 2.2.2

Adjunto mis archivos modificados.
Subs.php

'controlp' => array(
'title' => $txt["Panel de Control"],
'href' => 'http://cp.epsilons-dream.com',
'show' => true,
'sub_buttons' => array(
),
),


Index.spanish_es-utf-8.php
$txt['home'] = 'Inicio';

$txt['controlp'] = 'Panel de Control';


Edito nuevamente.
Se ha resuelto el problema anterior, sin embargo después de instalar el portal, el botón inicio me llevaba a al portal precisamente, entonces decidí crear un botón mas con el nombre "Foro".
Seguí el mismo procedimiento que el anterior, pero en este si, no veo cambios, y ya espere un tiempo considerable, por aquellos que dicen que toma su tiempo.

Adjuntos el extracto de Subs.php
'common' => array(
'title' => $txt['common'],
'href' => $scripturl . '?action=forum',
'show' => true,
'sub_buttons' => array(
),
),


Aca el de mi index.spanish...........

$txt['controlp'] = 'Panel de Control';

$txt['common'] = 'Foros';
Title: Re: Agregar botones al menu en 2.0RC1
Post by: ZerK on June 12, 2009, 10:33:46 PM
y cual es el problema ?
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Alphonze on June 12, 2009, 10:39:04 PM
Pues no aparece el titulo del botón, pero el espacio esta creado correctamente.

http://img197.imageshack.us/img197/6550/dibujouxt.png
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on June 13, 2009, 01:27:34 PM
bueno, puedes utilizar esta manera, aqui ya no se necesitan agregar lineas a tus archivos de texto:

'common' => array(
'title' => 'foros',
'href' => 'misitio.com/index.php?action=forum',
'show' => true,
'sub_buttons' => array(
),
),


y directamente te mostrara la palabra foros y la direccion misitio.com/index.php?action=forum,   tambien, si utilizas simpleportal, el portal te agrega automaticamente los dos botones, uno para el foro y otro para el portal:


'home' => array(
'title' => $txt['home'],
'href' => $modSettings['sp_portal_mode'] == 3 ? $modSettings['sp_standalone_url'] : $scripturl,
'show' => true,
'sub_buttons' => array(
),
),
'forum' => array(
'title' => empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'],
'href' => $scripturl . ($modSettings['sp_portal_mode'] == 1 ? '?action=forum' : ''),
'show' => in_array($modSettings['sp_portal_mode'], array(1, 3)),
'sub_buttons' => array(
),
),


y dependiendo de el modo en que uses el portal, el boton aparecera o no aparecera, utiliza el modo "pagina frontal".

saludos!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: amartin on August 20, 2009, 06:13:21 PM
hola como estan estuve tratando de poner otro boton en mi foro pero no caigo como hacerlo probe de varias formas pero ni modo si alguien me tira un cable se lo agradezco mucho saludos!!! ;D
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on August 20, 2009, 06:21:33 PM
seguiste las instrucciones del tutorial ?


cual es el enlace que quieres agregar?

adjunta tu archivo Sources/Subs.php para ayudarte.
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Akir-Anime on August 30, 2009, 10:57:08 PM
Quote from: waren on April 03, 2009, 01:36:44 PM
hola 130860, estoy siguiendo este manual y me encuentro con un pequeño problema, antes de nada aclarar que he seguido el manual como lo explicas.....
el problema es que el botón no se ve....

(http://img523.imageshack.us/img523/5388/botn.jpg)
bueno ya me diréis si falta algo y gracias.....
Salu2



me ocurre lo mismo que le paso a warren en ese momento....

podrian ayudarme a ver porque pasa eso...
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on August 31, 2009, 10:55:10 AM
@Akir-Anime   asegurate de que hayas puseto correctamente los strings de texto:

en tu archivo Themes/default/languages/index.tuidioma.php

$txt['boton'] = 'boton';   en donde  cambias ell boton por la palabra que quieras que aparezca en el boton.

tambien, borra el cache de tu navegador y tambien el de tu foro, lop uedes hacer desde admin/mantenimiento.

saludos!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: dario_rey_musico on August 31, 2009, 07:34:24 PM
hola soy medio nuevo en esto,, y instale un tema que tiene esto..index al principio dice:// Version: 2.0 RC1.2; index

y el tema no me trajo ningun boton en la portada,,
y la verdad que no se donde esta Subs.php e index.tuidioma.php.
yo entro en el tema:


Analysis (2.0 RC1.2)

Examinar los archivos y plantillas de este tema.
Editar la hoja de estilos de este tema.
Copiar una plantilla del tema en el que éste está basado.


y voy a examinar los archivos , y no encuentro los 2 archivos del tutorial.. que hago mal.

los archivos que me muestra el nuevo tema que instale son:

Nombre del archivo Última modificación Tamaño
css   
images   
languages   
index.php  Hoy a las 04:40:02  217 B
index.template.php  Hoy a las 05:41:47  15.45 KB
logo.psd  Hoy a las 04:40:02  198.91 KB
style.css  Hoy a las 04:40:01  17.08 KB
theme_info.xml  Hoy a las 04:40:02  913 B

Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on August 31, 2009, 08:40:35 PM
eso es por que existen diferencias entre las dos versones de smf:

en 1.1.x   los botones se editan en tu archivo /Themes/tu theme/index.template.php

sin embargo, en la version 2.0  el menu ahora se encunetra en:

Sources/Subs.php

esto hace que cada vez que agregas un boton, este aparecera en todos tus themes y ya no tendras que modificar cada theme que tengas, si deseas agrgar un boton en la version 2.0, entonces sigue este tutorial.


saludos!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: dario_rey_musico on August 31, 2009, 10:51:43 PM
Quote from: 130860 on August 31, 2009, 08:40:35 PM
eso es por que existen diferencias entre las dos versones de smf:

en 1.1.x   los botones se editan en tu archivo /Themes/tu theme/index.template.php

sin embargo, en la version 2.0  el menu ahora se encunetra en:

Sources/Subs.php

esto hace que cada vez que agregas un boton, este aparecera en todos tus themes y ya no tendras que modificar cada theme que tengas, si deseas agrgar un boton en la version 2.0, entonces sigue este tutorial.


saludos!



que me recomendas,, yo quiero que en todos mis temas tener los botones ...
yo uso smf 1.1.10

lo cambio por el 2.0?
igual yo estoy armando un foro de prueba hasta que no este bien instruido de todo , no lo largo a la calle :(
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on September 01, 2009, 10:04:55 AM
mira, en mi opinion personal, yo uso 2.0RC1.2 en mi pagina, y hasta ahora no he tenido ningun problema, empece a usar smf cuando iban en la version 1.1.2  y lo use hasta la version 1.1.7, de ahi lo actualice a 2.0 y la verdad son muchos los cambios y mejoras que trae, por ejemplo los botones, solo tienes que modificar una vez y listo, todos tus botones apareceran en cualquier theme sin hacer mas cambios, tambien trae el editor WYSIYG por default y bastantes mejoras mas.

si decides seguir con 1.1.10, entonces cada vez que quieras agragar un boton, lo tendras que agregar en todos tus themes (el mod esta obligado a instalarlo solo en el default)

saludos!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Cygnux on September 09, 2009, 11:14:10 PM
Salu2  ;D

Podrias ayudarme, no encuentro como hacer que el link que agrego al menu abra un popup ya que al agregar el javascript todo el foro se daña y da error.

Este es el codigo que agrego al Subs.php
Quote'chat' => array(
             'title' => $txt['chat'],
             'href' => 'javascript:popUp('chat.php')',
             'show' => true,
             'sub_buttons' => array(
        ),
   ),

Y este es el script que agrego al <Head> con el Mod "Global Headers and Footers":
Quote<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=950,height=250');");
}
// End -->
</script>
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on September 10, 2009, 09:58:41 AM
ok, trata utilizando comillas dobles " " en lugar de comillas simples asi:

'href' => 'javascript:popUp("chat.php")',

saludos!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Cygnux on September 10, 2009, 06:36:51 PM
Quote from: 130860 on September 10, 2009, 09:58:41 AM
ok, trata utilizando comillas dobles " " en lugar de comillas simples asi:

'href' => 'javascript:popUp("chat.php")',

saludos!

El problema se soluciono, pero aun no funciona el popup, parece que el javascript no funciona agregandolo en el <head> con el mod Global Header and Footer asi que lo agregue manualmente al index.template.php y ahora me da este error:

QuoteParse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/Pixel_Perfect_v1d/index.template.php on line 177
168:    // ]]></script>';
169:
170:    echo '
171:
172: <SCRIPT LANGUAGE="JavaScript">
173: <!-- Begin
174: function popUp(URL) {
175: day = new Date();
176: id = day.getTime();
177: eval("page" + id + " = window.open(URL, '+ id +', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=950,height=250');");
178: }
179: // End -->
180: </script>
181:

Intente cambiar esta linea:
Quote177: eval("page" + id + " = window.open(URL, '+ id +', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=950,height=250');");

Por esta:
Quote177: eval("page" + id + " = window.open(URL, "+ id +", 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=950,height=250');");
Y ya no me da el error pero sigue sin funcionar el popup.  >:(
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on September 11, 2009, 10:44:52 AM
puede ser que el array no esta pasando los datos como se debe, lo que puedes hacer es meter tu boton a la fuerza dentro del index.template.php de tu theme, aunque quedara hasta el final o hasta el procipio, dpende donde lo pongas:

en tu archivo index.template.php busca esto:


// 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="clearfix">';

   foreach ($context['menu_buttons'] as $act => $button)
   {
      $classes = array();
      if (!empty($button['active_button']))
         $classes[] = 'active';
      if (!empty($button['is_last']))
         $classes[] = 'last';
      $classes = implode(' ', $classes);
      
      echo '
         <li id="button_', $act, '"', !empty($classes) ? ' class="' . $classes . '"' : '', '>
            <a title="', $act, '" href="', $button['href'], '">
               <span>', ($button['active_button'] ? '<em>' : ''), $button['title'], ($button['active_button'] ? '</em>' : ''), '</span>
            </a>
         </li>';
   }

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


y ahi agrega tu boton quedari algo asi:

<li><a href="tu direccion" ></li>

ponlo antes de </ul> o despues del <ul>

saludos!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: distante on September 11, 2009, 08:58:15 PM
Hola 130860,  espero puedas darme una mano,

Seguí el tutorial paso a paso.

agregue esto en mi archivo subs.

'recientes' => array(
             'title' => $txt['recientes'],
             'href' => $scripturl . '?action=recent',
             'show' => true,
             'sub_buttons' => array(
                ),


y en index.spanish_es.php esto:

$txt['recientes'] = 'Recientes';

El espacio del botón aparece y hasta funciona!, pero no sale el texto, algo así como lo que le paso al otro usuario

(http://img197.imageshack.us/img197/6550/dibujouxt.png)

Ademas revisando el LOG de errores (que ya lo tenia limpio) vi esto :

Quotehttp://www.lanuevacuadra.com/index.php?

8: Undefined index: recientes

Archivo: lanuevacuadra.com/Sources/Subs.php
Línea: 3841

La linea 3841 es justamente : 'title' => $txt['recientes'],

:-\ alguna idea? mi foro es www.lanuevacuadra.com, se puede ver ahí el botón vació.

Gracias
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on September 11, 2009, 09:02:28 PM
ok, para evitar conflictos innecesarios con lenguajes de texto, puedes hacer esto:

'recientes' => array(
             'title' => 'Recientes',
             'href' => $scripturl . '?action=recent',
             'show' => true,
             'sub_buttons' => array(
                ),



simplemente cambié el string de texto por esto:    'Recientes',   ahora aparecerá sin tener que llamar a ningún archivo de texto.


saludos!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: distante on September 11, 2009, 09:23:13 PM
hehe, muy tarde! lo arregle de la mejor forma... prueba y error >_>

Agregue esto :
$txt['recientes'] = 'Recientes';
A mi archivo index.english.php

Pero igual gracias, al menos la experiencia le servirá a alguien más  :D

Saludozz!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: distante on September 11, 2009, 09:28:00 PM
Ah lo olvide, también quite esta parte que del archivo subs.php:

'sub_buttons' => array(
                ),



Es decir quedo más o menos así :

'recientes' => array(
             'title' => $txt['recientes'],
             'href' => $scripturl . '?action=recent',
             'show' => true,


Y ahora no me bota ningún tipo de error en el log tampoco  :)
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Ianelgroso on September 11, 2009, 10:33:07 PM
Quote from: waren on April 03, 2009, 01:36:44 PM
hola 130860, estoy siguiendo este manual y me encuentro con un pequeño problema, antes de nada aclarar que he seguido el manual como lo explicas.....
el problema es que el botón no se ve....

(http://img523.imageshack.us/img523/5388/botn.jpg)
bueno ya me diréis si falta algo y gracias.....
Salu2

Edit: solucionado todo perfecto, no se por que los cambios que voy realizando no se aplican al momento o casi al momento....

(http://img513.imageshack.us/img513/1927/botn1.jpg)

gracias 130860 muy buen manual.....
Salu2

Pero ... no entendi el manual! yo no tengo una configuracion en un bloque de hojas !! como hago??
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Cygnux on September 12, 2009, 01:43:36 AM
Quote from: 130860 on September 11, 2009, 10:44:52 AM
puede ser que el array no esta pasando los datos como se debe, lo que puedes hacer es meter tu boton a la fuerza dentro del index.template.php de tu theme, aunque quedara hasta el final o hasta el procipio, dpende donde lo pongas:

en tu archivo index.template.php busca esto:


// 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="clearfix">';

   foreach ($context['menu_buttons'] as $act => $button)
   {
      $classes = array();
      if (!empty($button['active_button']))
         $classes[] = 'active';
      if (!empty($button['is_last']))
         $classes[] = 'last';
      $classes = implode(' ', $classes);
      
      echo '
         <li id="button_', $act, '"', !empty($classes) ? ' class="' . $classes . '"' : '', '>
            <a title="', $act, '" href="', $button['href'], '">
               <span>', ($button['active_button'] ? '<em>' : ''), $button['title'], ($button['active_button'] ? '</em>' : ''), '</span>
            </a>
         </li>';
   }

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


y ahi agrega tu boton quedari algo asi:

<li><a href="tu direccion" ></li>

ponlo antes de </ul> o despues del <ul>

saludos!

Aun sigue sin funcionarme porque el problema es cuando agrego el javascript para que funcione el popup en el <head> de index.templete.php, hay alguna forma de agregarle el parametro target="_blank" a la direccion del boton?

Quote from: Subs.php'chat' => array(
             'title' => 'chat',
             'href' => 'Chat.php', // Como agrego aqui target"_blank"?
             'show' => true,
             'sub_buttons' => array(
                ),

Gracias por tu ayuda...  ;)
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on September 12, 2009, 08:37:17 PM
ok, para agregar un target, si es posible, sin embargo es complicado y afectará a todos los botones, y no solo a uno ya que smf toma el array que se creo para los botones y los muestra con un unico formato para todos, es decir, que si le agregas un target se veran afectados todos los botones, miera este es elcodigo que se usa para mostrar todos los botones:

<li id="button_', $act, '"', !empty($classes) ? ' class="' . $classes . '"' : '', '>
            <a title="', $act, '" href="', $button['href'], '">
               <span>', ($button['active_button'] ? '<em>' : ''), $button['title'], ($button['active_button'] ? '</em>' : ''), '</span>
            </a>
         </li>';


si te das cuenta, puedes agregar otro campo mas a el array e incluirlo aqui, pero se modificaran todos los botones al mismo tiempo.

lameto no poder ayudarte, post atras otro usuario tambien queria hacer lo mismo, seria una buena idea el incluir el target de un link.
Title: Re: Agregar botones al menu en 2.0RC1
Post by: The Mx on September 20, 2009, 12:05:54 AM
sirve pa un foro Powered by SMF 2.0 RC1.2?
Title: Re: Agregar botones al menu en 2.0RC1
Post by: distante on September 20, 2009, 03:26:39 PM
Quote from: The Mx on September 20, 2009, 12:05:54 AM
sirve pa un foro Powered by SMF 2.0 RC1.2?

Si funciona! ;)
Title: Re: Agregar botones al menu en 2.0RC1
Post by: anabelen on September 29, 2009, 02:47:32 PM
Gracias, mi botón no se ve, que hago mal?
Tengo instalado;

Powered by SMF 2.0 RC1.2  (http://www.simplemachines.org/)
SimplePortal 2.3  (http://www.simpleportal.net/)       

Video embedding by Aeva (http://custom.simplemachines.org/mods/index.php?mod=977)
Newton_RC1 (http://custom.simplemachines.org/themes/index.php?lemma=1432)

(http://img401.imageshack.us/img401/3055/botonl.jpg)

(http://img132.imageshack.us/img132/1196/boton2o.jpg)


      $buttons = array(
         'home' => array(
            'title' => $txt['home'],
            'href' => $modSettings['sp_portal_mode'] == 3 ? $modSettings['sp_standalone_url'] : $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
         ),
         'Galeria' => array(
             'title' => $txt['Galeria'],
             'href' => 'http://www.cordobacf-posadas.es/Galeria/main.php',
             'show' => true,
             'sub_buttons' => array(
        ),
   ),


$txt['news'] = 'Noticias';
$txt['home'] = 'Inicio';
$txt['Galeria'] = 'Galeria';


Saludos.
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on September 30, 2009, 10:07:10 AM
no encontre ningun error en tu codigo

a veces el foro se tarda en mostrar los cambios, lo que puedes hacer es borrar el cache de tu foro en admin/mantenimiento/rutina/Vaciar la caché de ficheros   para ver si solo es cuestion de el cache.


oh! acabo de entrar a tu web y yo puedo ver el boton con normalidad!

solo es cuestion de esperar un poco o hacer como te he dicho, borrar el cache.


saludos!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: anabelen on September 30, 2009, 01:31:53 PM
    Ahora si se ve, debía de ser eso, porque yo no he tocado nada mas, muchas gracias ;)

Saludos. 
Title: Re: Agregar botones al menu en 2.0RC1
Post by: falken on October 15, 2009, 01:17:40 PM
Muchisimas Gracias, llevo varios dias intentando agregar un boton y al fin lo he conseguido sin ni 1 problema!! :)

Hay alguna manera de que el boton solo lo vean los usuarios registrados?o ciertos grupos de usuarios?
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on October 15, 2009, 10:04:46 PM
si, si es posible, en la parte que dice:

'show' => true,

puedes especificar varias configuraciones, por ejemplo:

'show' => allowedTo('admin_forum'),   esto sirve para que solo lo vea un administrador.

o puedes utilizar esto:

'show' => if(in_array($user_info['groups'])==1) || (in_array($user_info['groups']))==2,

en donde el numero 1 es el id de el admin y el 2 es el id de otro grupo que tambien lo podra ver
Title: Re: Agregar botones al menu en 2.0RC1
Post by: falken on October 16, 2009, 09:15:47 AM
Quote from: 130860 on October 15, 2009, 10:04:46 PM
si, si es posible, en la parte que dice:

'show' => true,

puedes especificar varias configuraciones, por ejemplo:

'show' => allowedTo('admin_forum'),   esto sirve para que solo lo vea un administrador.

o puedes utilizar esto:

'show' => if(in_array($user_info['groups'])==1) || (in_array($user_info['groups']))==2,

en donde el numero 1 es el id de el admin y el 2 es el id de otro grupo que tambien lo podra ver


'show' => allowedTo('admin_forum'),   esto sirve para que solo lo vea un administrador.

Y como puede hacer para que solo lo vean usuarios registrados? Es que no encuentro el ID de ese grupo :S asi que con ese comando podria hacerlo no?

Gracias! :)
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on October 16, 2009, 10:21:27 AM
si solo deseas que el botn sea para usuarios registrados solamente, puedes hacer esto:

'show' => if ($context['user']['is_logged']),    esto es para que lo vean solo los usuarios registrados y esto:

'show' => if ($context['user']['is_guest']),   es para que solo o vean los invitados.

saludos!

Title: Re: Agregar botones al menu en 2.0RC1
Post by: falken on November 01, 2009, 08:03:57 PM
Hola, a ver si alguien puede ayudarme, el caso es que queria poner un boton con el correo que te lleve directamente a la pagina de login de gmail (y ya lo tengo el boton) el caso es que me gustaria que al darle al enlace fuera a la pagina web pero siga estando el banner y la linea de botones de debajo del banner (no se si me explico muy bien) quiero decir que cargue la pagina en donde tendrian que estar lo que es el foro. Es posible??

De no ser posible hay alguna manera de que al darle al boton el link se abra en 1 ventana nueva?

Gracias!!
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on November 01, 2009, 08:15:38 PM
bueno, podria ser posible si utilizaras frames, aunque son muy complicados y modificarias mucho tu foro solo para tener eso, la otra opcion, la de poner un target, estoy trabajando actualmente en eso ya que hay varios usuarios interesados en tener un target en los botones.


ok, aqui esta la solucion para poner un target a un boton:


'href' => 'http://misitio.com" target="_blank',

en la opcion href   de el array del boton, agrega el target="_blank justo como lo puse arriba
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Douglass on November 25, 2009, 11:06:04 AM
Bueno yo la verdad si que no se que puede estar pasanso te voy a dejar el código para que veas donde puede estar mi error, el problema es que aparece osea el boton y funciona el enlace pero no aparece la leyenda que yo quiero, directamente aparece vacio.

Te dejo un screen para que lo veas:

(http://i45.tinypic.com/11mas6s.jpg)

En el archivo Subs.pbp agregue este código:

'portal' => array(
'title' => $txt['portal'],
'href' => 'http://www.descargas-rm.blogspot.com',
'show' => true,
'sub_buttons' => array(
),
),


En el archivo Index.spanish_latin.php agregue este código:

$txt['portal'] = 'Portal';

La verdad si que nose que puede estar pasando.

Desde ya muchas gracias
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on November 25, 2009, 11:09:58 AM
prueba con este:

'portal' => array(
            'title' => 'Portal',
            'href' => 'http://www.descargas-rm.blogspot.com',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),

es mas rapido y facil, hacerlo d esta manera, aunque la forma "correcta" de gacerlo sería mendiante los strings de texto, pero esta forma es ma sencillo ;)
Title: Re: Agregar botones al menu en 2.0RC1
Post by: Douglass on November 25, 2009, 11:51:48 AM
Quote from: 130860 on November 25, 2009, 11:09:58 AM
prueba con este:

'portal' => array(
            'title' => 'Portal',
            'href' => 'http://www.descargas-rm.blogspot.com',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),

es mas rapido y facil, hacerlo d esta manera, aunque la forma "correcta" de gacerlo sería mendiante los strings de texto, pero esta forma es ma sencillo ;)

Listo muchas gracias de esa forma ya pude arreglar ese problema je.. xD
Title: Re: Agregar botones al menu en 2.0RC1
Post by: InfoMax on December 10, 2009, 11:25:14 AM
Bueno, yo lo estaba buscando..
Pense ke se hacía igual ke en las anteriores versiónes. En 2.0 rc2 si funciona ya lo probe.
Pero ahora tengo otra duda mas exacta...
¿Como elimino unos botones?
Yo deseo eliminar "ayuda" y "salir", agradeceria decirme como borrar lo presico, porke hay unos ), ke no entiendo cuales se borran y cuales son de otro botón.
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on December 10, 2009, 11:43:03 AM
los botones ayuda y slair son los siguientes:

ayuda:

'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),


salir

'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),


solo borralos  y limpia el cahce de tu navegador para ver los cambios


como nota, no te recomiendo  que borres el boton de salir,  auque parace que no lo utilizas, quiza algun usuario entro a su cuneta desde otra pc y necesita ese boton,  es solo una sugerencia.
Title: Re: Agregar botones al menu en 2.0RC1
Post by: spanw on January 19, 2010, 02:14:30 PM
Hola 130860 tengo una duda es sobre esto y esto es a lo contrario a la version 1.1.11 que colocas numeros un ejemplo seria asi.


index.template.php

// Show the [forum] button.

echo '<li><a' , $current_action=='Foro' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=forum">' , $txt['130860'] , '</a></li>';



index.tuidioma.php

$txt['130860']

En si mi pregunta es la modificacion es ahora en subs.php y no se utiliza mas numeros y ahora solo nombres ?
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on January 19, 2010, 02:21:21 PM
no, puede ser loque tu quieras,  por ejemplo, smf utiliza numeros:


$txt['222']   la razón es que smf tiene muchas mas strings de texto que un mod cualquiera,    es mas facil para smf  llevar un control de las strings de esa manera,   los mods   por lo general utilizan palabras:

$txt['pagerank']    porque asi es mas facil identificar que esa string pertenece a ese mod


en si no hay diferencia entre numeros y letras,  el string puede contener cualqueir cosa, por ejemplo:

$txt['pagerank222']  o   $txt['$%&/(']   siempre y cuando esten dentro de las comillas simples '  '

en ambas versiondes de smf se utilizan tanto numeros como letras, no hay distincion.

saludos
Title: Re: Agregar botones al menu en 2.0RC1
Post by: spanw on January 19, 2010, 03:38:14 PM
Bueno muchas gracias por la aclaracion.

Saludos gracias por la respuesta.
Title: Re: Agregar botones al menu en 2.0RC1
Post by: distante on February 04, 2010, 07:22:16 PM
Esto sigue funcionando para la RC2 ?
Title: Re: Agregar botones al menu en 2.0RC1
Post by: distante on February 04, 2010, 07:53:52 PM
Probe poner en mi nuevo foro con RC2 para que los moderadores puedan ver el boton de mensajes recientes:




            'recent' => array(
            'title' => $txt['recent_posts'],
            'href' => $scripturl . '?action=recent',
            'show' => $context['allow_moderation_center'],
            'sub_buttons' => array(
            ),
         ),



Pero no sale nada (y si vacié el cache del foro y de mi navegador).

Lo cambie por esto para probar




            'recent' => array(
            'title' => 'Recientes',
            'href' => $scripturl . '?action=recent',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),




Y no salia nada tampoco, alguna idea?  :-\
Title: Re: Agregar botones al menu en 2.0RC1
Post by: puchitus on February 04, 2010, 09:21:47 PM
Probé colocando tu código


  'recent' => array(
            'title' => 'Post Recientes',
            'href' => $scripturl . '?action=recent',
            'show' => $context['allow_moderation_center'],
            'sub_buttons' => array(
            ),
         ),


y funciona perfecto.

Saludos
Title: Re: Agregar botones al menu en 2.0RC1
Post by: distante on February 04, 2010, 09:50:30 PM
No se porque a mi no me sale, quizas lo estoy colocando mal dentro del codigo?



'mlist' => array(
            'title' => $txt['members_title'],
            'href' => $scripturl . '?action=mlist',
            'show' => $context['allow_memberlist'],
            'sub_buttons' => array(
               'mlist_view' => array(
                  'title' => $txt['mlist_menu_view'],
                  'href' => $scripturl . '?action=mlist',
                  'show' => true,
               ),
               'mlist_search' => array(
                  'title' => $txt['mlist_search'],
                  'href' => $scripturl . '?action=mlist;sa=search',
                  'show' => true,
               ),
            ),
         ),
            'recent' => array(
            'title' => $txt['recent_posts'],
            'href' => $scripturl . '?action=recent',
            'show' => $context['allow_moderation_center'],
            'sub_buttons' => array(
            ),
         ),
         'login' => array(
            'title' => $txt['login'],
            'href' => $scripturl . '?action=login',
            'show' => $user_info['is_guest'],
            'sub_buttons' => array(
            ),
         ),
         'register' => array(
            'title' => $txt['register'],
            'href' => $scripturl . '?action=register',
            'show' => $user_info['is_guest'],
            'sub_buttons' => array(
            ),
            'is_last' => !$context['right_to_left'],
         ),
         'logout' => array(
            'title' => $txt['logout'],
            'href' => $scripturl . '?action=logout;%1$s=%2$s',
            'show' => !$user_info['is_guest'],
            'sub_buttons' => array(
            ),
            'is_last' => !$context['right_to_left'],
         ),
      );



(http://img2.pict.com/f5/f9/29/2742626/0/estudio2520de2520grabaci25c325b3.png)
:-\
Title: Re: Agregar botones al menu en 2.0RC1
Post by: puchitus on February 04, 2010, 10:20:43 PM
Yo te lo veo bien

Title: Re: Agregar botones al menu en 2.0RC1
Post by: distante on February 04, 2010, 10:22:38 PM
Vaya estoy dando vueltas y vueltas y no se porque no sale! En mi otro foro (RC1.2) salio perfecto.

Sera por algún mod que tengo?

Quote1.    nCode Image Resizer    1.2   
2.    Google Analytics Code    1.1   
3.    Spoiler Tag    0.7a   
4.    Favicon    1.3   
5.    Pretty URLs    1.0RC   
6.    Hide SMF Version    1.0.5   
7.    SimplePortal - Spanish_es    2.3.1   
8.    SimplePortal    2.3.1   
9.    Aeva Media    1.0 Beta 5   
10.    Ad Managment    2.3.6.1   
11.    Wysiwyg Quick Reply RC2    RC2




Probé poniendo el codigo dentro de la pestaña usuarios.



'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
),
'recent' => array(
'title' => $txt['recent_posts'],
'href' => $scripturl . '?action=recent',
'show' => $context['allow_moderation_center'],
),
),
),



Y nada, veo el código fuente creado cuando veo la pagina y estoy viendo que no esta jalando el código del botón :-\
Title: Re: Agregar botones al menu en 2.0RC1
Post by: mirahalo on February 05, 2010, 08:48:04 AM
pregunta, tus moderadores locales pueden ver el centro de moderacion?

el context= $context['allow_moderation_center'],    se refiere a un permiso puesto desde el area de permisos, el boton de moderacion esta por default en el subs no tienes que agregarlo, simplemente tienes que darle los permisos necesarios a el grupo de usuarios que quieras que vea ese boton.
Title: Re: Agregar botones al menu en 2.0RC2
Post by: distante on February 05, 2010, 09:10:19 AM
Lo arregle poniendo este código siguiendo un consejo de vicram en este hilo : http://www.simplemachines.org/community/index.php?topic=364271.0

Probé cambiando el nombre por uno de los strings de texto, el allow estaba bien, lo puse así y ya funciona!




'recent_posts' => array(
                    'title' => $txt['recent_posts'],
                    'href' => $scripturl . '?action=recent',
                    'show' => $context['allow_moderation_center'],
                    ),               
'who_title' => array(
                    'title' => $txt['who_title'],
                    'href' => $scripturl . '?action=who',
                    'show' => $context['allow_moderation_center'],
                    ),   



Al menos funciono U_U

Gracias por tu respuesta 130860/mirahalo
Title: Re: Agregar botones al menu en 2.0RC2
Post by: Rallak on February 06, 2010, 06:29:09 AM
donde se encuentra los archivos no los veo el sub,

saludos
Title: Re: Agregar botones al menu en 2.0RC2
Post by: vicram10 on February 06, 2010, 07:23:23 AM
Quote from: Rallak on February 06, 2010, 06:29:09 AM
donde se encuentra los archivos no los veo el sub,
saludos

Por FTP, esta en

1) Sources/Subs.php
2) Themes/default/languanges/aqui

Salu2
Title: Re: Agregar botones al menu en 2.0RC2
Post by: 1antares1 on April 01, 2010, 03:18:46 PM
Bueno, sólo quize dejarte tus Gracias y decirte que me sirvió tu tutorial. Era lo que necesitaba para la versión RC 2.0 Ya que en el buscador encontraba para la SMF 1.1. y no estaba explicado detalladamente como acá.

Saludos! Suerte ;)
Title: Re: Agregar botones al menu en 2.0RC2
Post by: luuuciano on April 08, 2010, 07:54:24 PM
estaba viendo que el home tiene comentada la línea
            // 'target' => '_blank',

en un enlace que agregué le puse esa línea, descomentada, pero no le agrega el _blank a ese enlace :(

lo cual sería genial, lástima
Title: Re: Agregar botones al menu en 2.0RC2
Post by: mirahalo on April 09, 2010, 09:14:40 AM
puedes hacerlo de la manera "sucia"



'href' => 'http://misitio.com" target="_blank',
Title: Re: Agregar botones al menu en 2.0RC2
Post by: luuuciano on April 09, 2010, 09:25:03 AM
pues si, eso me recomendaron en el foro inglés y es lo que finalmente hice...

lo extraño del asunto es que varios respondieron con el mismo código que había probado yo, o variantes no muy diferentes... y claro, dicen que les anda??
cosas raras
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Albo-69 on April 17, 2010, 02:32:14 PM
Una pregunta el SUB.PHP Esta en el theme ? y si esta ahi donde se encuentra ?
Title: Re: Agregar botones al menu en 2.0RC3
Post by: zutzu on April 17, 2010, 02:39:24 PM
el subs.php esta en la carpeta sources
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Blackdozer on April 20, 2010, 06:40:05 AM
Estupendo tutorial, aora ya se donde quitar las imágenes que vienen en algunos themes ;) ;D
Title: Re: Agregar botones al menu en 2.0RC3
Post by: lucas-ruroken on April 23, 2010, 06:44:00 PM
excelente mirahalo nice tutorial
Title: Re: Agregar botones al menu en 2.0RC3
Post by: AWES0MN on April 30, 2010, 05:05:54 PM
Quote from: 130860 on February 16, 2009, 11:02:18 AM
saludos, pues les dejo este pequeño tutorial para agregar botones al menu principal en 2.0 RC1, como ya se sabe, en la version 1.xxx el menu se encnotraba en index.template y si tenias un theme diferente tenias que hacer los cambios manualmente, esto se acabó con 2.0 RC1, ahora el menu se encuentra en Subs.php dentro de la carpeta sources, de esta forma, ya no tenemos que preocuparnos por agregar botones de algun mod a nuestro theme personalizado.

primero lo primero, siempre hacer un backup de los archivos que vayamos a utilizar, en este caso Subs.php e index.tuidioma.php.

abrimos Subs.php y buscamos esto:



'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
         ),





despues agregamos la estructura básica del botón que queremos, sería algo como esto:


'boton' => array(
             'title' => $txt['boton'],
             'href' => 'http://www.tuenlace.com',
             'show' => true,
             'sub_buttons' => array(
        ),
   ),



cambia el "boton"  por lo que tu quieras, por ejem, chat, tracker, galeria, enlaces, lo que sea, de preferencia que no sean caracteres extraños o muy largos, cambia tambien el  'title' => $txt['boton'], por lo que quieras que aparezca, esto es, el titulo o nombre del boton, regularmente es la misma palabra para los dos.

'href' => 'http://www.tuenlace.com',    el enlace que quieras que tenga el boton.

'show' => true,  es el valor por defecto, lo podrán ver todos los usuarios, invitados y registrados.

ahora abre tu archivo index.tuidioma.php y busca:

$txt['home'] = 'Inicio';



agrega despues:

    $txt['boton'] = 'boton';


aqui cambia el boton por lo que pusiste en Subs.php, debe de ser igual o no aparecerá y por ultimo cambia el  'boton'  por lo que quieras que aparezca, y listo !!!!  ya tienes tu boton que servirá en todos los themes que tengas.
puedes agregar todos los botones que quieras siempre y cuando no se repitan los nombres que les des.
Gracias ! ;)

Funciona muy bien.
Title: Re: Agregar botones al menu en 2.0RC3
Post by: dataarkangel on May 11, 2010, 12:57:44 PM
Hola, el Tuto esta excelente pero tengo un problema..

Los ultimos pasos dice:

Quoteahora abre tu archivo index.tuidioma.php y busca:

Código: [Seleccionar]
$txt['home'] = 'Inicio';

agrega despues:


Código: [Seleccionar]
    $txt['boton'] = 'boton';


Tengo aplicado un template de Infierno en idioma español latin y no puedo encontrar el archivo index.tuidioma.php

alguien me puede guiar donde encuentro el index correcto..

salu2
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on May 11, 2010, 01:00:29 PM
ese archivo se encuentra en /Themes/default/language/   ahi estara el archivo index.tuidioma.php   reemplaza el tuidioma por el idioma que uses en tu foro, por ejemplo:

spanish_es  spanish_latin, etc     si usas spanish_es entonces tu archivo sera  index.spanish_es.php
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Ҝξтع on May 21, 2010, 08:21:07 AM
No me funka. Me sale detras del menu un palo y ya esta. :-\
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on May 21, 2010, 12:28:21 PM
Quote from: Kete on May 21, 2010, 08:21:07 AM
No me funka. Me sale detras del menu un palo y ya esta. :-\

???


podrias explicar tu problema con detalles por favor, adjunta aqui tu subs.php y dime el nombre y la url del boton que agregaste
Title: Re: Agregar botones al menu en 2.0RC3
Post by: francisco62 on May 30, 2010, 12:16:52 PM
Buenas, gracias por tu tutorial, es genial, pero me pasa lo siguiente: lo he echo todo y aparece el botón pero sin nombre, ya sabes en blanco, a que es debido? si el enlace funciona bien, saludos.

mi version del smf 2.0 rc3
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on May 30, 2010, 08:32:36 PM
asegurate de que hayas puesto el string de texto que corersponde en tu archivo /themes/default/languaje/index.tuidioma.php


o adjunta tu subs.php aqui par revisarlo
Title: Re: Agregar botones al menu en 2.0RC3
Post by: francisco62 on May 31, 2010, 11:47:36 AM
Buenas, gracias por responder, visto que aqui no me deja de adjuntar (o por lo menos yo no sé) te doy el enlace donde lo he subido, saludos.

http://www.megaupload.com/?d=ZT126VE1
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on May 31, 2010, 11:59:33 AM
para adjuntar al responder,   en l arespuesta normal, no la respuestas rapida veras una opcion que dice opciones adicionales o aditional options, dale lcick ahi y te saldra la caja para adjuntar, prefiero que lo adjuntes ya que es mas facil para mi bajarlo y verlo.


tambien necesitaria el nombre de el boton que quieres agregar o el pedazo de codigo que estas tratando de poner.
Title: Re: Agregar botones al menu en 2.0RC3
Post by: francisco62 on May 31, 2010, 12:12:00 PM
Buenas, a  mi no me sale el adjuntar, sale esto:
Notificarme al haber nuevas respuestas.
No usar smileys.
Regresar a este tema.
nada mas, de adjuntar archivos, nada de nada,
de todas maneras te he puesto el enlace de donde lo he subido, saludos
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on May 31, 2010, 12:13:45 PM
quiza modificaron los permisos.

Quote from: 130860 on May 31, 2010, 11:59:33 AM


tambien necesitaria el nombre de el boton que quieres agregar o el pedazo de codigo que estas tratando de poner.
Title: Re: Agregar botones al menu en 2.0RC3
Post by: francisco62 on May 31, 2010, 12:16:02 PM
Buenas el nombre del boton seria: Galeria, saludos.
pero me gustaria de saber donde esta el fallo ya que me haria falta poner mas botones y algunos hasta con menu despegable, saludos y gracias
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on May 31, 2010, 12:20:05 PM
tu boton estaba bien, solo habia que agregar el string  $txt['Galeria']  a tu archivo Themes/default/languages/index.tuidioma.php


prueba este, ya no tienes que agregar nada.
Title: Re: Agregar botones al menu en 2.0RC3
Post by: francisco62 on May 31, 2010, 12:44:21 PM
Buenas, solucionado, no se como lo has echo, pero funciona, gracias. y algun tutorial de botones despegables? saludos.
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on May 31, 2010, 12:53:31 PM
para agregar una subfuncion a tu boton   solo agrega otro boton dentro de tu boton, me explico:

este es tu boton:

'galeria' => array(
             'title' => 'Galer&iacute;a',
             'href' => 'http://picasaweb.google.com/fotos.biciaventura',
             'show' => true,
             'sub_buttons' => array(
               ),
           ),


pero tiene una interesante array para subotones:   


'sub_buttons' => array(
               ),


dentro de este array irá el boton que quiera sque aparesca justo debajo, quedaria asi:


'galeria' => array(
             'title' => 'Galer&iacute;a',
             'href' => 'http://picasaweb.google.com/fotos.biciaventura',
             'show' => true,
             'sub_buttons' => array(
         
                  'galeria2' => array(
             'title' => 'mi otro boton',
             'href' => '#',
             'show' => true,
             'sub_buttons' => array(
               ),
           ),         
         
               ),
           ),



puedes tener hasta un tercer boton dentro de el mismo boton haciendo exactamente lo mismo




Title: Re: Agregar botones al menu en 2.0RC3
Post by: francisco62 on May 31, 2010, 01:07:48 PM
Gracias, me lo guardo, saludos.
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Tamagochi on June 22, 2010, 06:59:43 AM
Hola

He seguido los pasos de tu tutorial y me aprece el boton pero sin texto, ademas cambie el texto del boton inicio y tampoco me aparece modificado. he probado contro f5 he probado sin cache y luego he vuelto a poner el nivel uno que es el que tenia y nada. Podria ser por mi theme? alguna idea?

Salu2
Title: Re: Agregar botones al menu en 2.0RC3
Post by: vicram10 on June 22, 2010, 07:58:23 AM
debes limpiar la cache del foro

Admin----Mantenimiento----Rutina----Limpiar Cache (Empty CAche)

para que los cambios a los string de textos surtan efecto
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Tamagochi on June 22, 2010, 09:38:10 AM
Hola

Gracias se ha solucionado. Ahora tengo otro problema aunque no se si este es el foro adecuado para ello. Vino a raiz de esta modificacion asi que lo pongo aqui si no es su sitio decidmelo y lo cambio. Tengo el foro integrado con un blog de wordpress a traves de una extension de wordpress que se llama wpsmf, el caso es que tras limpiar la cache ahora se ve perfecto el foro, pero en el blog me aparecen errores (solo en el admin por lo que he podido ver):

Notice: Undefined index: blog in /home/evitalac/public_html/foro/Sources/Subs.php  on line 3882

La linea en cuestion es:

'title' => $txt['blog'],

Es decir la segunda linea del codigo que añadi. He de decir que en lugar de ponerla despues de Home la puse antes no se si tenga esto algo que ver.

Salu2
Title: Re: Agregar botones al menu en 2.0RC3
Post by: vicram10 on June 22, 2010, 10:55:09 AM
ese es simplemente un error antes que limpies la cache, como vos agregaste los string y luego te fuiste a probar a ver si te funciono el boton o te salio el boton, no aparecio nada pero en el Subs.php ya hizo al llamado del string de texto blog, pero en el cache ese string todavia no existia por lo que arrojo ese error y se solvento cuando limpiaste la cache de tu foro.. por que se genero el cache del texto ya con el texto que agregaste... por lo que el error que te muestra ahi es antes que limpies la cache y no de ahora
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Tamagochi on June 22, 2010, 02:27:00 PM
Hola

Efectivamente, ya se soluciono gracias.

Salu2
Title: Re: Agregar botones al menu en 2.0RC3
Post by: cieelo on June 22, 2010, 05:01:03 PM
Gracias por el Tuto.
He logrado insertar con éxito un ítem al menú. este me lleva a wordpress.
en wordpres es usado ssi_menubar, aquí sigue apareciendo mi boton insertado en el core del smf
Pero luego de esto me surge un problema.
no esta activado,  (class active). por lo contrario, el que se ve activado es el boton Home. como manejar darle la clase active.

he encontrado este código pero no se como modificarlo: en el index.template.php
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>'; Etc..


gracias por la ayuda.

Title: Re: Agregar botones al menu en 2.0RC3
Post by: vicram10 on June 22, 2010, 06:48:33 PM
@cieelo:

En el mismo archivo donde agregas tu ITEM al menu tienes para agregar el active (current action ó accion actual)..

Busca


elseif ($context['current_action'] == 'register2')
$current_action = 'register';


Agrega antes


elseif ($context['current_action'] == 'LA_ACCION_DE_TU_BOTON')
$current_action = 'LA_ACCION_DE_TU_BOTON';


Que es "LA_ACCION_DE_TU_BOTON"

justamente la parte que en el tuto esta esto

Quote'boton' => array(
Title: Re: Agregar botones al menu en 2.0RC3
Post by: CCX42 on June 22, 2010, 10:41:31 PM
Oye yo segui tu tuto y me daba error en el template

algo de

Template Parse Error!

There was a problem loading the /cache/lang_index+Modifications_spanish_latin-utf8_core.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.


Pues ahorita no tengo los botones pues lo intente muchas veces y siempre me pasaba el mismo error. Lo de los botones es para vartios foros en SMF instalados en la web principal y en subdominios.

Ayuda. ¿como hago para que no salga ese error al seguir el tutorial?
Title: Re: Agregar botones al menu en 2.0RC3
Post by: DoctorMalboro on June 22, 2010, 10:42:45 PM
Quote from: CLUB CONSOLAS on June 22, 2010, 10:41:31 PMOye yo segui tu tuto y me daba error en el template

algo de

Template Parse Error!

There was a problem loading the /cache/lang_index+Modifications_spanish_latin-utf8_core.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.


Pues ahorita no tengo los botones pues lo intente muchas veces y siempre me pasaba el mismo error. Lo de los botones es para vartios foros en SMF instalados en la web principal y en subdominios.

Ayuda. ¿como hago para que no salga ese error al seguir el tutorial?
Vacia la carpeta cache que se encuentra en tu directorio raíz o vía Panel de Administración - Mantenimiento
Title: Re: Agregar botones al menu en 2.0RC3
Post by: CCX42 on June 22, 2010, 11:32:58 PM
hize lo que tu me dijiste en una seccion es consturccion que como no tiene nada la uso de prueba, y haora me aparece este error.

Template Parse Error!

It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.


Vacié la cache como me lo indicaste.

direccion: http://clubes.clubconsolas.com
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on June 23, 2010, 12:28:57 AM
el tutorial no modifica ningun archivo de template asi que tu problema seguramente se debe a otra modificacion.

cuales son los botones que quieres agregar?
Title: Re: Agregar botones al menu en 2.0RC3
Post by: vicram10 on June 23, 2010, 06:02:56 AM
no es en el template, sino en el archivo de idioma lo que agrego mal algo..
Title: Re: Agregar botones al menu en 2.0RC3
Post by: CCX42 on June 23, 2010, 05:37:37 PM
Quote from: 130860 on June 23, 2010, 12:28:57 AM
el tutorial no modifica ningun archivo de template asi que tu problema seguramente se debe a otra modificacion.

cuales son los botones que quieres agregar?

Quiero agregar estos botones a la seccion de clubes: Club consolas, Revista, Reviews

Quote from: vicram10 on June 23, 2010, 06:02:56 AM
no es en el template, sino en el archivo de idioma lo que agrego mal algo..

$txt['message_index'] = 'Índice de Mensajes';
$txt['news'] = 'Noticias';
$txt['home'] = 'Inicio';
$txt['club'] = 'Club consolas';


Asi modifique el index.spanish_latin-utf8.php
Title: Re: Agregar botones al menu en 2.0RC3
Post by: vicram10 on June 23, 2010, 07:11:22 PM
adjunta ese archivo tuyo.. y el que dice que esta fallando en el error..
Title: Re: Agregar botones al menu en 2.0RC3
Post by: CCX42 on June 23, 2010, 07:32:21 PM
Quote from: vicram10 on June 23, 2010, 07:11:22 PM
adjunta ese archivo tuyo.. y el que dice que esta fallando en el error..

adjunto el subs.php y el index.spanish_latin-utf8.php

Nota:¿Porque no Aparece la opcion para adjuntar?
Title: Re: Agregar botones al menu en 2.0RC3
Post by: vicram10 on June 23, 2010, 07:46:39 PM
deberia de aparecerte al postear

Opciones Adicionales (Additional Options)
Title: Re: Agregar botones al menu en 2.0RC3
Post by: CCX42 on June 23, 2010, 09:22:57 PM
Gracias, creo que ya encontré el problema.

Se me están generando datos corruptos en el index.spanish_latin-utf8.php debido a unos signos (este ?) en la segunda linea, voy a ver como resulta. Cualquier cosa comento

Un saludo
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Luacian5 on July 09, 2010, 05:59:34 AM
La verdad que agradeceros este post ya que me volvia loco hasta que vi lo de borrar el caché jajaja gracias :)
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Alezander on July 13, 2010, 11:27:59 PM
No encuentro eso, me podrían decir en que linea esta en el de subs.php?

Saludos!
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on July 13, 2010, 11:29:51 PM
que parte no encuentras?


cómo la estas buscando?


que programa usas para buscarlo?


intenta buscar solamente el $txt['home']
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Alezander on July 13, 2010, 11:44:58 PM
Quote from: 130860 on July 13, 2010, 11:29:51 PM
que parte no encuentras?


cómo la estas buscando?


que programa usas para buscarlo?


intenta buscar solamente el $txt['home']

No encuentro lo que dice:


'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
         ),


Lo estoy leyendo todo :S

Bloc de notas

Title: Re: Agregar botones al menu en 2.0RC3
Post by: zutzu on July 14, 2010, 12:29:58 AM
si esta, búscalo bien y cuidado con los espacios a la hora de buscar

'title' => $txt['home']

usa notepad ++ (http://notepad-plus-plus.org/release/5.7)
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Alezander on July 14, 2010, 12:40:09 AM
Quote from: zυтzυ on July 14, 2010, 12:29:58 AM
si esta, búscalo bien y cuidado con los espacios a la hora de buscar

'title' => $txt['home']

usa notepad ++ (http://notepad-plus-plus.org/release/5.7)

Use el buscador de notepad y puse eso en el buscador de el y no aparece ese código.  :-X
Title: Re: Agregar botones al menu en 2.0RC3
Post by: zutzu on July 14, 2010, 12:41:16 AM
adjunta tu subs.php y te digo en que linea esta.
Title: Re: Agregar botones al menu en 2.0RC3
Post by: Alezander on July 14, 2010, 12:50:57 AM
Quote from: zυтzυ on July 14, 2010, 12:41:16 AM
adjunta tu subs.php y te digo en que linea esta.

No me aparece para adjuntar ¿Como lo hago?, leí en help pero no aparece.  :-X

Saludos!
Title: Re: Agregar botones al menu en 2.0RC3
Post by: zutzu on July 14, 2010, 01:27:27 AM
suponiendo que no haz tocado para nada el subs.php

el código esta en la linea  3881

Title: Re: Agregar botones al menu en 2.0RC3
Post by: pcnova on August 03, 2010, 09:30:24 AM
yo tengo un problema logre insertar el codigo y se ve en el foro, pero el problema es que mi foro usa imagenes

os adjunto el foro www.scannerscars.com/foro   y claro se ve en vez de la imagen el texto portal, yo lo que quiero que se vea es la imagen alguna idea de donde tengo que modificar, mira los index.ccs pero no encuentro nada
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on August 03, 2010, 10:47:48 AM
te dalta agregar la imagen para el portal:   http://www.scannerscars.com/foro/Themes/designblue2/images/spanish_es/Portal.png

crea una imagen llamada Portal.png y subela a la ruta Themes/designblue2/images/spanish_es/
Title: Re: Agregar botones al menu en 2.0RC3
Post by: pcnova on August 03, 2010, 02:14:06 PM
pues no se que puede pasar por que la tengo metida te paso los dos archivos en adjuntos a ver que ves tu mal


// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
{
$buttons = array(
    'Portal' => array(
'title' => 'Portal',
'href' => 'http://www.scannerscars.com',
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
// 'target' => '_blank',
            ),
            'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
// 'target' => '_blank',
),
'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'),




$txt['message_index'] = 'índice de Mensajes';
$txt['news'] = 'Noticias';
$txt['portal'] = 'portal';
$txt['home'] = 'Inicio';
$txt['lock_unlock'] = 'Bloquear/Desbloquear Tema';
$txt['post'] = 'Publicar';
$txt['error_occured'] = '¡Un error ha ocurrido!';
$txt['at'] = 'a las';
$txt['logout'] = 'Salir';
$txt['started_by'] = 'Iniciado por';
$txt['replies'] = 'Respuestas';
$txt['last_post'] = 'Último mensaje';
$txt['admin_login'] = 'Ingresar a Administración';
// Use numeric entities in the below string.
$txt['topic'] = 'Tema';
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on August 03, 2010, 08:57:12 PM
no, no la tienes, fijate en el enlace que te deja, debería de aparecer tu imagen.

no es el boton, es el theme,   revisa que tu imagen existe en esa ruta tiene que llamarse Portal.png  asi con mayúscula
Title: Re: Agregar botones al menu en 2.0RC3
Post by: pcnova on August 03, 2010, 09:23:39 PM
pues tenias toda la razón solo faltaba en poner la mayúscula al principio, menuda tontería no ocurrirseme antes muchas gracias por mi sangado el problema
Title: Re: Agregar botones al menu en 2.0RC3
Post by: lesanju on August 04, 2010, 10:02:24 PM
gracias por el tutorial  ;)

quizas esta sea una pregunta tonta pero como soy nuevo en SMF les pregunto como hago una nueva pagina? , lo que quiero hacer es agregar un mensaje de aviso legal en el menu, en este tutorial ya vi como agregar el boton, me faltaria crear la pagina con el mensaje.
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on August 05, 2010, 10:41:07 AM
hya un tutorial osbre como hacer página en este mismo foro, o puedes usar algún mod que crea páginas  o un portal.

http://www.simplemachines.org/community/index.php?topic=371329.msg2542207#msg2542207
Title: Re: Agregar botones al menu en 2.0RC3
Post by: lesanju on August 05, 2010, 06:40:25 PM
gracias  130860 .. ayer estuve buscando aqui pero no lo encontre  :(   prefiero agregar manualmente, voy a ver como me va.. saludos  :D
Title: Re: Agregar botones al menu en 2.0RC3
Post by: renoik99 on August 31, 2010, 06:39:12 PM
Donde esta el archivo index.tuidioma.php?? Mi Idioma es el español osea spain y e buscado index.spain.php en la carpeta sources y nada no me sale nada de eso nisiquiera index.otroidioma.php, porfavor contestame quiero poner un chat en el menu   :'(
Title: Re: Agregar botones al menu en 2.0RC3
Post by: mirahalo on August 31, 2010, 06:43:11 PM
/Themes/default/languages/index.spanish_es.php
Title: Re: Agregar botones al menu en 2.0RC3
Post by: renoik99 on September 01, 2010, 04:15:02 AM
Gracias! Va perfectamente bien ahora voy a quitar el de ayuda  8)
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: ivanlariz on December 03, 2010, 05:34:22 AM
Que raro, en mi subs.php no encuentro

'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
         ),


:-\
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: lucas-ruroken on December 03, 2010, 06:10:43 AM
busca

'help' => array(

y arriba agrega el boton ;)
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: ivanlariz on December 03, 2010, 06:29:27 AM
Que raro, no existe la palabra help ni home en todo el archivo.
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: lucas-ruroken on December 03, 2010, 06:41:31 AM
Recuerda que esto es para 2.0 RC y no para 1.1.x

Adjunta tu Sources/Subs.php asi te digo
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: ivanlariz on December 03, 2010, 06:45:37 AM
ahhh, ok yo tengo 1.1.12 Para mi versión como se hace?

Un saludo y gracias.
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: lucas-ruroken on December 03, 2010, 06:57:30 AM
desde el index.template.php de tu theme, pero en todos los themes es diferentes, debes buscar despues de

function template_menu y ver como estna los demas botones, copiar y pegar, y luego modificar la url y el texto
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: ivanlariz on December 03, 2010, 08:01:41 PM
Muchisimas gracias, resuelto!  ;)
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: lucas-ruroken on December 04, 2010, 12:36:55 AM
de nada macho!
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: pablo24 on January 05, 2011, 02:36:35 PM
Yo sólo cambio el index.template y me basta, no se si será por mi tema, pero no he tenido ningún problema.

¿No hay problemas en que haga eso?
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Suki on January 05, 2011, 02:53:22 PM
Quote from: pablo24 on January 05, 2011, 02:36:35 PM
Yo sólo cambio el index.template y me basta, no se si será por mi tema, pero no he tenido ningún problema.

¿No hay problemas en que haga eso?


solo cambiaste el index.template porque usas 1.1.x,  si te fijas bien, el título de este tema es: Agregar botones al menu en 2.0RC3, RC4



en 2.0 puedes agregar botones desde tu index.template pero e smucho mas fácil hacerlo en tu arcivo Subs.php
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: pablo24 on January 11, 2011, 08:43:26 AM
De hecho, uso smf 2.0 rc3
Por eso encuentro extraño, que ha pesar de tener esa versión, me haya servido modificar sólo el index.template
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Suki on January 11, 2011, 08:55:29 AM
podrias indicarnos como lo haces?
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Tamagochi on January 22, 2011, 12:42:43 PM
Hola

Lo hice y se ve perfecto... En firefox, en internet explorer me descuadro todo el menu superior. Mirar pero con internet explorer:

http://www.summarios.com

Alguien sabe como arreglarlo??

Salu2
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: mirahalo on January 22, 2011, 08:08:41 PM
que boton agregaste y como lo agregaste?
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Tamagochi on January 25, 2011, 04:04:14 AM
Hola

Agregue Blog y Tienda y tal cual pone en el primer post. Mira este es mi subs.php si necesitais subo tambien el de idioma.

$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $home_url,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
// 'target' => '_blank',
),
'forum' => array(
'title' => !empty($txt['foro']) ? $txt['foro'] : 'Forum',
'href' => $adkportal['adk_enable'] == 2 ? $scripturl : $scripturl . '?action=forum',
'show' => !empty($adkportal['adk_enable']),
'sub_buttons' => array(
),
),
'blog' => array(
              'title' => $txt['blog'],
              'href' => 'http://www.summarios.com/blog',
              'show' => true,
              'sub_buttons' => array(
        ),
    ),
'tienda' => array(
              'title' => $txt['tienda'],
              'href' => 'http://tienda.summarios.com',
              'show' => true,
              'sub_buttons' => array(
        ),
    ),
'downloads' => array(
'title' => $txt['downloads'],
'href' => $scripturl . '?action=downloads',
'show' => $adkportal['download_enable'] && allowedTo('adk_downloads_view'),
'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(
),
),


Salu2
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: vicram10 on January 25, 2011, 12:25:37 PM
no creo que sea culpa de tu boton.. viendo con el firebug esta totalmente deformado la estructura de tu theme.. los links a los scripts y a los CSS estan en el <body>...  y no en el <head> por dar un ejemplo..

adjunta tu index.template.php
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Tamagochi on January 29, 2011, 04:06:36 AM
Hola

No me deja ponerlo como adjunto en opciones adiccionales:

<?php
// Version: 2.0 RC4; index

/* This template is, perhaps, the most important template in the theme. It
contains the main template layer that displays the header and footer of
the forum, namely with main_above and main_below. It also contains the
menu sub template, which appropriately displays the menu; the init sub
template, which is there to set the theme up; (init can be missing.) and
the linktree sub template, which sorts out the link tree.

The init sub template should load any data and set any hardcoded options.

The main_above sub template is what is shown above the main content, and
should contain anything that should be shown up there.

The main_below sub template, conversely, is shown after the main content.
It should probably contain the copyright statement and some other things.

The linktree sub template should display the link tree, using the data
in the $context['linktree'] variable.

The menu sub template should display all the relevant buttons the user
wants and or needs.

For more information on the templating system, please see the site at:
http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
global $context$settings$options$txt;

/* Use images from default theme when using templates from the default theme?
if this is 'always', images from the default theme will be used.
if this is 'defaults', images from the default theme will only be used with default templates.
if this is 'never' or isn't set at all, images from the default theme will not be used. */
$settings['use_default_images'] = 'never';

/* What document type definition is being used? (for font size and other issues.)
'xhtml' for an XHTML 1.0 document type definition.
'html' for an HTML 4.01 document type definition. */
$settings['doctype'] = 'xhtml';

/* The version this template/theme is for.
This should probably be the version of SMF it was created for. */
$settings['theme_version'] = '2.0 RC4';

/* Set a setting that tells the theme that it can render the tabs. */
$settings['use_tabs'] = true;

/* Use plain buttons - as opposed to text buttons? */
$settings['use_buttons'] = true;

/* Show sticky and lock status separate from topic icons? */
$settings['separate_sticky_lock'] = true;

/* Does this theme use the strict doctype? */
$settings['strict_doctype'] = false;

/* Does this theme use post previews on the message index? */
$settings['message_index_preview'] = false;

/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;
}

// The main sub template above the content.
function template_html_above()
{
global $context$settings$options$scripturl$txt$modSettings;

// Show right to left and the character set for ease of translating.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"'
$context['right_to_left'] ? ' dir="rtl"' '''>
<head>'
;
if(
function_exists('loadColpaseAdkportal'))loadColpaseAdkportal();
echo
'';

// The ?rc3 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/index'$context['theme_variant'], '.css?rc3" />';

// Some browsers need an extra stylesheet due to bugs/compatibility issues.
foreach (array('ie7''ie6''webkit') as $cssfix)
if ($context['browser']['is_' $cssfix])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/css/'$cssfix'.css" />';

// RTL languages require an additional stylesheet.
if ($context['right_to_left'])
echo '
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/css/rtl.css" />';

// Here comes the JavaScript bits!
echo '
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/script.js?rc3"></script>
<script type="text/javascript" src="'
$settings['theme_url'], '/scripts/theme.js?rc3"></script>
<script type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_default_theme_url = "'
$settings['default_theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_iso_case_folding = '
$context['server']['iso_case_folding'] ? 'true' 'false'';
var smf_charset = "'
$context['character_set'], '";'$context['show_pm_popup'] ? '
var fPmPopup = function ()
{
if (confirm("' 
$txt['show_personal_messages'] . '"))
window.open(smf_prepareScriptUrl(smf_scripturl) + "action=pm");
}
addLoadEvent(fPmPopup);' 
'''
var ajax_notification_text = "'
$txt['ajax_in_progress'], '";
var ajax_notification_cancel_text = "'
$txt['modify_cancel'], '";
// ]]></script>'
;

echo '
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<meta name="description" content="'
$context['page_title_html_safe'], '" />', !empty($context['meta_keywords']) ? '
<meta name="keywords" content="' 
$context['meta_keywords'] . '" />' '''
<title>'
$context['page_title_html_safe'], '</title>';

// Please don't index these Mr Robot.
if (!empty($context['robot_no_index']))
echo '
<meta name="robots" content="noindex" />'
;

// Present a canonical url for search engines to prevent duplicate content in their indices.
if (!empty($context['canonical_url']))
echo '
<link rel="canonical" href="'
$context['canonical_url'], '" />';

// Show all the relative links, such as help, search, contents, and the like.
echo '
<link rel="help" href="'
$scripturl'?action=help" />
<link rel="search" href="'
$scripturl'?action=search" />
<link rel="contents" href="'
$scripturl'" />';

// If RSS feeds are enabled, advertise the presence of one.
if (!empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']))
echo '
<link rel="alternate" type="application/rss+xml" title="'
$context['forum_name_html_safe'], ' - '$txt['rss'], '" href="'$scripturl'?type=rss;action=.xml" />';

// If we're viewing a topic, these should be the previous and next topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="'
$scripturl'?topic='$context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
if (!empty($context['current_board']))
echo '
<link rel="index" href="'
$scripturl'?board='$context['current_board'], '.0" />';

// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'];

  
// Begin show your social networks 2.0 Thanks MaXiForum.cz for the idea.
  
  
sys();

echo '
</head>
<body>'
;
}

function 
template_body_above()
{
global $context$settings$options$scripturl$txt$modSettings;

echo !empty($settings['forum_width']) ? '
<div id="wrapper" style="width: ' 
$settings['forum_width'] . '">' '''
<div id="header"><div class="frame">
<div id="top_section">
<span style="line-height: 45px; font-size: 1.8em; font-family: Geneva, verdana, sans-serif; margin: 0; padding: 0;float: left;font-weight: bold;">
<a href="'
$scripturl'">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' $context['header_logo_url_html_safe'] . '" alt="' $context['forum_name'] . '" />''</a>
</span>'
;

// the upshrink image, right-floated
echo '
<img id="upshrink" src="'
$settings['images_url'], '/upshrink.png" alt="*" title="'$txt['upshrink_description'], '" style="display: none;" />';
echo '
'
, empty($settings['site_slogan']) ? '<img id="smflogo" src="' $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' '<div id="siteslogan" class="floatright">' $settings['site_slogan'] . '</div>''
</div>
<div id="upper_section" class="middletext"'
, empty($options['collapse_header']) ? '' ' style="display: none;"''>
<div class="user">'
;

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
if (!empty($context['user']['avatar']))
echo '
<p class="avatar">'
$context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">'
$txt['hello_member_ndt'], ' <span>'$context['user']['name'], '</span></li>
<li><a href="'
$scripturl'?action=unread">'$txt['unread_since_visit'], '</a></li>
<li><a href="'
$scripturl'?action=unreadreplies">'$txt['show_unread_replies'], '</a></li>';

// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">'
$txt['maintain_mode_on'], '</li>';

// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
<li>'
$context['unapproved_members'] == $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="'$scripturl'?action=admin;area=viewmembers;sa=browse;type=approve">'$context['unapproved_members'] == $txt['approve_member'] : $context['unapproved_members'] . ' ' $txt['approve_members'], '</a> '$txt['approve_members_waiting'], '</li>';

if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
echo '
<li><a href="'
$scripturl'?action=moderate;area=reports">'sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';

echo '
<li>'
$context['current_time'], '</li>
</ul>'
;
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
elseif (!empty($context['show_login_bar']))
{
echo '
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="'
$scripturl'?action=login2" method="post" accept-charset="'$context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' $context['session_id'] . '\');"' '''>
<div class="info">'
$txt['login_or_register'], '</div>
<input type="text" name="user" size="10" class="input_text" />
<input type="password" name="passwrd" size="10" class="input_password" />
<select name="cookielength">
<option value="60">'
$txt['one_hour'], '</option>
<option value="1440">'
$txt['one_day'], '</option>
<option value="10080">'
$txt['one_week'], '</option>
<option value="43200">'
$txt['one_month'], '</option>
<option value="-1" selected="selected">'
$txt['forever'], '</option>
</select>
<input type="submit" value="'
$txt['login'], '" class="button_submit" /><br />
<div class="info">'
$txt['quick_login_dec'], '</div>';

if (!empty($modSettings['enableOpenID']))
echo '
<br /><input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />'
;

echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>'
;
}

echo '
</div>
<div class="news normaltext">
<form id="search_form" action="'
$scripturl'?action=search2" method="post" accept-charset="'$context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />&nbsp;
<input type="submit" name="submit" value="'
$txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />'
;

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="'
$context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd['
$context['current_board'], ']" value="'$context['current_board'], '" />';

echo '</form>';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<h2>'
$txt['news'], ': </h2>
<p>'
$context['random_news_line'], '</p>';

echo '
</div>
</div>
<br class="clear" />'
;

// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: '
, empty($options['collapse_header']) ? 'false' 'true'',
aSwappableContainers: [
\'upper_section\'
],
aSwapImages: [
{
sId: \'upshrink\',
srcExpanded: smf_images_url + \'/upshrink.png\',
altExpanded: '
JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/upshrink2.png\',
altCollapsed: '
JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: '
$context['user']['is_guest'] ? 'false' 'true'',
sOptionName: \'collapse_header\',
sSessionVar: '
JavaScriptEscape($context['session_var']), ',
sSessionId: '
JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: '
$context['user']['is_guest'] ? 'true' 'false'',
sCookieName: \'upshrink\'
}
});
// ]]></script>'
;

// Show the menu here, according to the menu sub template.
template_menu();

echo '
<br class="clear" />
</div></div>'
;

// The main content should go here.
echo '
<div id="content_section"><div class="frame">
<div id="main_content_section">'
;

// Custom banners and shoutboxes should be placed here, before the linktree.

// Show the navigation tree.
theme_linktree();
if(function_exists('loadCTop'))loadCTop();
}

function 
template_body_below()
{
if(function_exists('loadCBottom'))loadCBottom();
global $context$settings$options$scripturl$txt$modSettings;

echo '
</div>
</div></div>'
;

// Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
echo '
<div id="footer_section"><div class="frame">
<ul class="reset">
<li class="copyright">'
theme_copyright(), '</li>
<li><a id="button_xhtml" href="http://validator.w3.org/check/referer" target="_blank" class="new_win" title="'
$txt['valid_xhtml'], '"><span>'$txt['xhtml'], '</span></a></li>
'
, !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' $scripturl '?action=.xml;type=rss" class="new_win"><span>' $txt['rss'] . '</span></a></li>' '''
<li class="last"><a id="button_wap2" href="'
$scripturl '?wap2" class="new_win"><span>'$txt['wap2'], '</span></a></li>
</ul>'
;

// Show the load time?
if ($context['show_load_time'])
echo '
<p>'
$txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';

echo '
</div></div>'
, !empty($settings['forum_width']) ? '
</div>' 
'';
}

function 
template_html_below()
{
global $context$settings$options$scripturl$txt$modSettings;

echo '
</body></html>'
;
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show false)
{
global $context$settings$options$shown_linktree;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;

echo '
<div class="navigate_section">
<ul>'
;

// Each tree item has a URL and name. Some may have extra_before and extra_after.
$i 1;
$count count($context['linktree']);
foreach ($context['linktree'] as $link_num => $tree)
{
echo '
<li'
, ($link_num == count($context['linktree']) - 1) ? ' class="last"' '''>';

// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

if($count == $i)
echo'<h1 style="font-size: 1em; display: inline;">';

// Show the link, including a URL if it should have one.
echo $settings['linktree_link'] && isset($tree['url']) ? '
<a href="' 
$tree['url'] . '"><span>' $tree['name'] . '</span></a>' '<span>' $tree['name'] . '</span>';

if($count == $i)
echo'</h1>';
$i++;

// Show something after the link...?
if (isset($tree['extra_after']))
echo $tree['extra_after'];

// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo ' &#38;#187;';

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

$shown_linktree true;
}

// 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>'
;
}

// Generate a strip of buttons.
function template_button_strip($button_strip$direction 'top'$strip_options = array())
{
global $settings$context$txt$scripturl;

if (!is_array($strip_options))
$strip_options = array();

// Create the buttons...
$buttons = array();
foreach ($button_strip as $key => $value)
{
$txt[$value['text']] = isset($value['eap']) ? $value['text'] : $txt[$value['text']];
if (!isset($value['test']) || !empty($context[$value['test']]))
$buttons[] = '
<li><a' 
. (isset($value['id']) ? ' id="button_strip_' $value['id'] . '"' '') . ' class="button_strip_' $key . (isset($value['active']) ? ' active' '') . '" href="' $value['url'] . '"' . (isset($value['custom']) ? ' ' $value['custom'] : '') . '><span>' $txt[$value['text']] . '</span></a></li>';
}

// No buttons? No button strip either.
if (empty($buttons))
return;

// Make the last one, as easy as possible.
$buttons[count($buttons) - 1] = str_replace('<span>''<span class="last">'$buttons[count($buttons) - 1]);

echo '
<div class="buttonlist'
, !empty($direction) ? ' float' $direction '''"', (empty($buttons) ? ' style="display: none;"' ''), (!empty($strip_options['id']) ? ' id="' $strip_options['id'] . '"'''), '>
<ul>'
,
implode(''$buttons), '
</ul>
</div>'
;
}

function 
sys()
{
    global 
$context$settings$options$txt$scripturl;

if(!empty(
$settings['sys_link_1']))

echo '<a id="sys_twitter" target="_blank" href="'$settings['sys_link_1'] , '">&nbsp;</a>';

if(!empty(
$settings['sys_link_2']))
        echo 
'

<a id="sys_rss" target="_blank" href="'
$settings['sys_link_2'] , '">&nbsp;</a>';

if(!empty(
$settings['sys_link_3']))
        echo 
'

<a id="sys_facebook" target="_blank" href="'
$settings['sys_link_3'] , '">&nbsp;</a>'

}


?>


A ver si lo coge asi y si no te lo subo a mi server a ver.

Salu2
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: vicram10 on January 29, 2011, 08:23:45 AM
no se que puede ser.. no encuentro la razon.. pero la estructura de tu index.template esta bien.. pero cuando se accede a tu web esta totalmente desastre.. el por que no se.. algun mod que instalaste recien.. nose... pero el menu que agregaste con este tutorial no tiene nada que ver...
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Tamagochi on January 29, 2011, 09:13:35 AM
Hola

Estos son los mod que tengo por si ayuda, pero creo que son bastante comunes:

1.     Karma Buttons    1.1    [ Desinstalar ] [ Listar archivos ] [ Borrar ]
2.    Show your social networks    2.0    [ Desinstalar ] [ Listar archivos ] [ Borrar ]
3.    Network Share    1.1    [ Desinstalar ] [ Listar archivos ] [ Borrar ]
4.    Spanish translation of Aeva Media 1.3a    1.3a    [ Desinstalar ] [ Listar archivos ] [ Borrar ]
5.    Adk Portal    2.0 RC6    [ Desinstalar ] [ Listar archivos ] [ Borrar ]
6.    Google Analytics Code    1.2    [ Desinstalar ] [ Listar archivos ] [ Borrar ]
7.    Sitemap    2.2.0    [ Desinstalar ] [ Listar archivos ] [ Borrar ]
8.    H1 Tags in link tree    1.1    [ Desinstalar ] [ Listar archivos ] [ Borrar ]
9.    Affiliates System (Adk Portal Module)    1.0    [ Desinstalar ] [ Listar archivos ] [ Borrar ]
10.    Enhanced About Page (0.01)

Tendra algo que ver que al actualizar a rc4 lo hiciera con small update?? la verdad es que he tenido algunos problemas desde entonces. se que no deberia pasar por ser solo los archivos modificados, pero es que no se me ocurre otra cosa.
Salu2
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: vicram10 on January 29, 2011, 11:35:25 AM
y a partir de que mod te sucede eso?.. siempre? desde hace un rato nomas?? desde cuando? mas o menos debes ver si siempre anduvo o nunca luego anduvo.. etc...
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Tamagochi on January 29, 2011, 03:34:42 PM
Hola

La verdad es que yo utilizo y recomiendo a mis usuarios firefox y no vi el fallo hasta que un usuario me lo comento y fue justo al poco de acabar de poner los botones. Por eso pense que era por los botones.

De los otros solo di permisos al aeva pero instalado ya estaba. No hubo mas novedad.

Salu2
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: vicram10 on January 29, 2011, 05:03:21 PM
la modificacion en este post no daña nada.. algun mod que coloca valores en el head o algo por el estilo deberia de haber desconfigurado todo.. no sabria decirte.. por que no hay referencia del por que puede estar pasando... lo que puedes hacer es en un foro de pruebas copiar todo tu propio foro y testearlo, desinstalando cada mod y ver como se comporta y luego ir agregando las modificaciones que hiciste y ver donde esta el error...

Pd.: deberias de crear un tema a parte ya que este post trata de OTRO tema.. y asi no se desvirtua mas de lo que ya se desvirtuo...
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Tamagochi on January 30, 2011, 02:52:34 AM
Hola

Tienes razon, mil disculpas, creo otro post.

Salu2
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: hoxxing on March 27, 2011, 05:51:55 PM
hola :)

me interesó mucho éste tema, pero tengo una gran incógnita. Resulta que quiero colocar una imágen de mensaje nuevo cuando llega un mensaje privado nuevo, encontre el siguiente codigo para colocar una imagen en un boton:


'title' => $txt['espanol'],           
   'href' => 'index.php?language=spanish_es',           
   'show' => true,           
   'sub_buttons' => array(     
   ),   
),
'ingles' => array(           
   'title' => $txt['ingles']='<img src="url imagen" />',           
   'href' => 'index.php?language=english',           
   'show' => true,           
   'sub_buttons' => array(     
   ),   
),


la verdad funciona a medias, porque bueno, el codigo de los mensajes privados es este:

'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,


y si agrego el code de la imagen, pues reemplaza el texto por la imagen y no quiero eso, además la imagen no aparece cuando envian un mensaje nuevo si no que aparece siempre, en vez de decir mensajes, aparece la imagen.

Resumiendo: cuando envian mensajes privados nuevos, quiero reemplazar el número que aparece (Mensajes [1]) por una imagen (Mensajes [...imagen.png]). Por favor ayudenme, es muy imporatnte para mi realizar ésta modificacion...

Gracias de antemano :)
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: hoxxing on March 31, 2011, 08:15:27 PM
hoolaaa, nadie sabe?? por favor lo necesito, en serio...
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: xgtap500x on April 28, 2011, 02:31:20 PM
muchas graxias wee
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Pyare on August 11, 2011, 01:14:50 PM
Quote from: mirahalo on November 01, 2009, 08:15:38 PM
ok, aqui esta la solucion para poner un target a un boton:

'href' => 'http://misitio.com" target="_blank',

en la opcion href   de el array del boton, agrega el target="_blank justo como lo puse arriba
Gracias MAESTRO!!!! Y también al creador de este post, a mi me funcionó perfectamente, tengo la versión 2.0
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: astrokuma on August 14, 2011, 07:15:53 PM
Excelente tema

Me ha sido muy util

Saludos!!!!
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: I G N A C I O on August 14, 2011, 09:24:15 PM
me podrian decir en que rta esta subs y idex,tuidioma,php
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Diego Andrés on August 14, 2011, 09:35:54 PM
/Sources/Subs.php

/Themes/default/languages/index.tuidioma.php
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Igηα¢ισ on August 15, 2011, 01:13:43 AM
Hago todo eso y no me va ami, mi version es 2.0 RC5 y hago esto:

Sources/Subs.php > Busco esto:
'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
         ),


Y me sale asi:
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),

'is_last' => $context['right_to_left'],
// This is where help use to be!!!


y Modifico y lo pongo todo como dice y dejo asi:
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),

'is_last' => $context['right_to_left'],
// This is where help use to be!!!


'Blogger' => array(
             'title' => $txt['Blog'],
             'href' => 'http://wwww.aquariumbblog.blogspot.com/',
             'show' => true,
             'sub_buttons' => array(
        ),
   ),


Luego voy a index.spanish_latin.php, busco esto:
$txt['home'] = 'Inicio';

Me sale esto:
$txt['message_index'] = 'Índice de Mensajes';
$txt['news'] = 'Noticias';
$txt['home'] = 'Inicio';


Lo dejo asi:
$txt['message_index'] = 'Índice de Mensajes';
$txt['news'] = 'Noticias';
$txt['home'] = 'Inicio';
$txt['Blogger'] = 'Blogger';


Borro el Cache del Foro apreto F5 y el boton no se pone, que hago mal.
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Patrick D on August 17, 2011, 10:27:09 AM
Quote from: Ignacioxd on August 15, 2011, 01:13:43 AM
Hago todo eso y no me va ami, mi version es 2.0 RC5 y hago esto:

Sources/Subs.php > Busco esto:
'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
         ),


Y me sale asi:
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),

'is_last' => $context['right_to_left'],
// This is where help use to be!!!


y Modifico y lo pongo todo como dice y dejo asi:
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),

'is_last' => $context['right_to_left'],
// This is where help use to be!!!


'Blogger' => array(
             'title' => $txt['Blog'],
             'href' => 'http://wwww.aquariumbblog.blogspot.com/',
             'show' => true,
             'sub_buttons' => array(
        ),
   ),


Luego voy a index.spanish_latin.php, busco esto:
$txt['home'] = 'Inicio';

Me sale esto:
$txt['message_index'] = 'Índice de Mensajes';
$txt['news'] = 'Noticias';
$txt['home'] = 'Inicio';


Lo dejo asi:
$txt['message_index'] = 'Índice de Mensajes';
$txt['news'] = 'Noticias';
$txt['home'] = 'Inicio';
$txt['Blogger'] = 'Blogger';


Borro el Cache del Foro apreto F5 y el boton no se pone, que hago mal.

En el Subs pones $txt['Blog'], y en la traducción pones $txt['Blogger']
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: DeVeSt on September 02, 2011, 05:19:10 AM
Hola,

He seguido el tuto y me ha funcionado a la perfección, pero me gustaría que cuando pincho en el botón me abra el enlace en una página aparte, he probado lo del Target_blank pero algo no debo hacer bien porque no funciona.

Muchas gracias!
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: DeVeSt on September 10, 2011, 09:27:24 PM
Quote from: DeVeSt on September 02, 2011, 05:19:10 AM
Hola,

He seguido el tuto y me ha funcionado a la perfección, pero me gustaría que cuando pincho en el botón me abra el enlace en una página aparte, he probado lo del Target_blank pero algo no debo hacer bien porque no funciona.

Muchas gracias!

Nadie sabe nada?
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Suki on September 10, 2011, 09:28:48 PM
solo tienes que agregar el target="_blank"


y si no, el array puede acpetar el parametro

'target' => '_blank',
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: sarigar on September 24, 2011, 06:41:20 PM
Hola, Buenas:

Estoy añadiendo un nuevo botón para enviar emails desde el menú principal y cuando pulso sobre el no se me activa, es decir queda como que inicio es el botón activo. Pego mi código a ver si veis algo que este mal.

'contact' => array(
'title' => $txt['contact'],
'href' => $scripturl . '?action=emailuser;sa=email;msg=2048',
'show' => true,
'sub_buttons' => array(
),
),


La definición de la string:

$txt['contact'] = 'Contactar';

Y este es mi current_action:

if (isset($context['menu_buttons'][$context['current_action']]))
$current_action = $context['current_action'];
elseif ($context['current_action'] == 'search2')
$current_action = 'search';
elseif ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
elseif(empty($context['disable_sp']) && ((isset($_GET['board']) || isset($_GET['topic']) || in_array($context['current_action'], array('unread', 'unreadreplies', 'recent', 'stats', 'who'))) && in_array($modSettings['sp_portal_mode'], array(1, 3))))
$current_action = 'forum';
elseif ($context['current_action'] == 'contact')
$current_action = 'contact';
elseif ($context['current_action'] == 'register2')
$current_action = 'register';
elseif ($context['current_action'] == 'login2' || ($user_info['is_guest'] && $context['current_action'] == 'reminder'))
$current_action = 'login';
elseif ($context['current_action'] == 'groups' && $context['allow_moderation_center'])
$current_action = 'moderate';


No entiendo por que no se me activa el botón, podéis ayudarme.

He borrado todas las caches imaginables y demás.

Gracias por adelantado.

Un saludo.
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: delivery on September 28, 2011, 01:08:47 AM
Buen aporte y muy bien explicado
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Ibancius on January 05, 2012, 12:16:06 PM
No encuentro el archivo index.tuidioma.php (en nuestro caso español)
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Suki on January 05, 2012, 12:19:53 PM
index.spanish_es.php

o

index.spanish_latin.php

o

index.spanish_latin-utf8.php

o

index.spanish_es-utf8.php
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Ibancius on January 05, 2012, 12:32:40 PM
Quote from: Suki on January 05, 2012, 12:19:53 PM
index.spanish_es.php

o

index.spanish_latin.php

o

index.spanish_latin-utf8.php

o

index.spanish_es-utf8.php
Es muy raro, pero no tengo ninguno de esos archivos en mi ordenador :S
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Suki on January 05, 2012, 12:34:22 PM
Themes/default/languages/


los archivos NO están en tu ordenador, están en el servidor donde está alojado  tu foro, usa tu programa de FTP.
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Ibancius on January 05, 2012, 12:39:30 PM
Quote from: Suki on January 05, 2012, 12:34:22 PM
Themes/default/languages/


los archivos NO están en tu ordenador, están en el servidor donde está alojado  tu foro, usa tu programa de FTP.
Yaya, pero esque como tengo la carpeta en el pc por si acaso... bueno, que me he bajado el archivo de la página de SMF en español, y he modificado el archivo tal como dice, y lo he subido, y el menú sigue igual...
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Suki on January 05, 2012, 12:46:29 PM
que idioma bajaste...?


que archivo modificaste?


estás seguro de que el idioma es el mismo que tienes en el servidor?


impia el cache de tu foro y limpia el cache de tu navegador.
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Ibancius on January 05, 2012, 12:52:48 PM
Quote from: Suki on January 05, 2012, 12:46:29 PM
que idioma bajaste...?


que archivo modificaste?


estás seguro de que el idioma es el mismo que tienes en el servidor?


impia el cache de tu foro y limpia el cache de tu navegador.
Me descargué el español (archivo es index.spanish_es.php). He pensado y he mirado el código fuente del foro, y el problema es que no sale la palabra Chat, porqué el enlace sí que está:


<li id="button_home">
<a class="active firstlevel" href="http://nadaquehacer.es/foro/index.php">
<span class="last firstlevel">Inicio</span>
</a>
</li>
<li id="button_chat">
<a class="firstlevel" href="http://nadaquehacer.es/foro/index.php?action=chat">
<span class="firstlevel"></span>
</a>


Si ves donde pone <span class="firstlevel"></span> tendría que estar así <span class="firstlevel">Chat</span>
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Suki on January 05, 2012, 12:58:27 PM
eso es porque la palabra esta definida en un string de texto dentor de tu archivo index.tuidioma:

$txt['some_chat_word'] = 'Chat';


si tu NO tienes ese string en tu archivo de idioma entonces NO va a salir la palabra...   el tutorial lo explica con claridad...
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Ibancius on January 05, 2012, 01:02:34 PM
Quote from: Suki on January 05, 2012, 12:58:27 PM
eso es porque la palabra esta definida en un string de texto dentor de tu archivo index.tuidioma:

$txt['some_chat_word'] = 'Chat';


si tu NO tienes ese string en tu archivo de idioma entonces NO va a salir la palabra...   el tutorial lo explica con claridad...
... Haber, te paso una parte de lo que tengo puesto en el Subs.php

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

),'chat' => array(
             'title' => $txt['Chat'],
             'href' => '?action=chat',
             'show' => true,
             'sub_buttons' => array(
        ),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Suki on January 05, 2012, 01:07:58 PM
Como dice el tutorial....

abre tu archivo Index.tuidioma.php

al final antes del ?>

pon esto:

$txt['Chat'] = 'Chat';


sube tu archivo y limpia el cache del foro.
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Ibancius on January 05, 2012, 01:19:44 PM
Quote from: Suki on January 05, 2012, 01:07:58 PM
Como dice el tutorial....

abre tu archivo Index.tuidioma.php

al final antes del ?>

pon esto:

$txt['Chat'] = 'Chat';


sube tu archivo y limpia el cache del foro.
Perfecto, ya me funciona! :D
Una pregunta, para hacer que el botón apareza solo si estás registrado? (es decir, que no le salga a los visitantes)
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Suki on January 05, 2012, 01:22:59 PM
'chat' => array(
             'title' => $txt['Chat'],
             'href' => '?action=chat',
             'show' => true,
             'sub_buttons' => array(
        ),

cambialo por

'chat' => array(
             'title' => $txt['Chat'],
             'href' => '?action=chat',
             'show' => $context['user']['is_logged'],
             'sub_buttons' => array(
        ),
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: Ibancius on January 05, 2012, 01:39:14 PM
Quote from: Suki on January 05, 2012, 01:22:59 PM
'chat' => array(
             'title' => $txt['Chat'],
             'href' => '?action=chat',
             'show' => true,
             'sub_buttons' => array(
        ),

cambialo por

'chat' => array(
             'title' => $txt['Chat'],
             'href' => '?action=chat',
             'show' => $context['user']['is_logged'],
             'sub_buttons' => array(
        ),
¡Muchas gracias!:)
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: -Rock Lee- on January 23, 2012, 10:29:08 AM
Muy bueno mirahalo me sirvió perfectamente solo tengo una duda como se debe hacer para que al hacer click esta manda a la pagina pero en otra pestaña nueva para que no la saque de la pagina principal osea en la que esta? por favor alguien me puede decir que debe agregar? iría a subs.php y index.mi_idioma.php?

Desde ya muchas gracias!

Un saludo!
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: vicram10 on January 23, 2012, 10:33:44 AM
en el subs.php prueba agregando asi


'chat' => array(
             'title' => $txt['Chat'],
             'href' => '?action=chat',
             'show' => true,
             'target' => '_blank',
             'sub_buttons' => array(
        ),


es solo un ejemplo.. lo unico que se agrego fue

'target' => '_blank',

prueba y dinos luego si te funciono
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: -Rock Lee- on January 23, 2012, 10:45:47 AM
Quote from: vicram10 on January 23, 2012, 10:33:44 AM
en el subs.php prueba agregando asi


'chat' => array(
             'title' => $txt['Chat'],
             'href' => '?action=chat',
             'show' => true,
             'target' => '_blank',
             'sub_buttons' => array(
        ),


es solo un ejemplo.. lo unico que se agrego fue

'target' => '_blank',

prueba y dinos luego si te funciono

Me funciono perfecto muchas gracias vicram10 y perdona las molestias (lo habia leído en post anterior pero no me di cuenta era para eso  :-[) esto seguro va a marcadores ;)

Un saludo!
Title: Re: Agregar botones al menu en 2.0RC3, RC4
Post by: vicram10 on January 23, 2012, 12:41:27 PM
de nada para eso estamos..