News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

poner un boton en el menu

Started by shreck26, June 22, 2007, 08:47:14 AM

Previous topic - Next topic

shreck26

hola, queria saber si es posible crear o modificar la url de un boton del menu es ke quiero hacer ke cuando le de a inicio vaya a la web principal aver si vosotros me podeis ayudar.

gracias.

chapu

Con la opcion buscar se encuentra de todo.......

Saludos

SeAlVa

busca en el el index.template.php y modificalo PARA CADA THEME que esté instalado

aguavisual

Quote from: shreck26 on June 22, 2007, 08:47:14 AM
hola, queria saber si es posible crear o modificar la url de un boton del menu es ke quiero hacer ke cuando le de a inicio vaya a la web principal aver si vosotros me podeis ayudar.

gracias.

yo busco lo mismo, poder añadir al menu principal un botón que enlace con lo que yo configure.

Lo más parecido que he encontrado es esto:
http://custom.simplemachines.org/mods/index.php?mod=827
Crea un botón llamado 'Chat room' tal vez modificandolo...

De todas maneras, si alguien tiene una solución más simple que lo ponga. Gracias.
SMF v. 1.1.2
Theme Aero 79
www.loquesurja.es/foro

SeAlVa

pero el 'texto' del boton tiene que ir cambiando o es fijo al estilo 'JUEGOS !!' o similar¿?

si es estático, es tan simple como editar el Index.template.php de cada uno de los themes que uses.

copia el del home (por ejemplo) y cambia los $txt['XXXXX'] por 'texto_correspondiente'

es decir... tu quieres algo como el botól que pone 'MENÚ' de esta web? http://multismf.100webspace.net/foro2/

aguavisual

#5
En mi caso sí, busco eso. Echaré un vistazo al index.template.

¿Vincularlo a un partado del foro es fácil?

No lo encuentro T_T
Puedes decir que código has puesto? http://multismf.100webspace.net/foro2/
SMF v. 1.1.2
Theme Aero 79
www.loquesurja.es/foro

SeAlVa

#6
busca esto en el index.template.php (en el default)
   // Show the [home] button.
   echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '">' , $txt[103] , '</a>
            </td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

ahí empiezan el menú

añade esto donde quieras poner el botón (orden)
   // Show the [custom] button.
   echo '
            <td valign="top" class="maintab_back">
               <a href="http://la_url_que_quieras">El_Titulo_del_boton</a>
            </td>';

aguavisual

Muchas gracias SeAlVa! Lo pruebo de inmediato ;)
SMF v. 1.1.2
Theme Aero 79
www.loquesurja.es/foro

Mrs_Robota

#8
Hola mi theme es Dilber MC , tiene instalado el flashchat y el mod para integrar el flashchat, pero al intentar que el botón de mi chat linkee hacia una nueva ventana con un link personalizado, me he dado cuenta que para el idioma español se desaparece el botón.

el codigo que he colocado ha sido



// Show the [chat] button.
echo'
<td align="center" class="menubg' , $current_action == 'chat' ? '2' : '' , '">
<a href="http://www.miweb/foro/chat/flashchat.php" ', $scripturl, '?action=chat"', (!empty($GLOBALS['modSettings']['fc_newWindow']) ? ' target="_blank"' : ''), '>', $txt['fc_chat'], (!empty($GLOBALS['modSettings']['fc_showUserCount']) && !empty($context['num_chat']) ? ' [<strong>' . $context['num_chat'] . ' ' . ($context['num_chat'] == 1 ? $txt['user'] : $txt['users']) . '</strong>]' : ''), '</a>


</td>';




funciona perfecto para el ingles, pero no para el español, por favor si alguien sabe como puedo corregir el problema, ayudenme

SeAlVa

$txt['fc_chat']

añade una traducción en el modifications.spanish.php (no se si es con mayus (Modif...) o si lleva o no s al final de tions, pero mas o menos...)

sería añadir una línea tal como esta

$txt['fc_chat'] = 'Texto traducido al español';


Mrs_Robota

#10
Quote from: SeAlVa on July 19, 2007, 07:02:26 PM
$txt['fc_chat']

añade una traducción en el modifications.spanish.php (no se si es con mayus (Modif...) o si lleva o no s al final de tions, pero mas o menos...)

sería añadir una línea tal como esta

$txt['fc_chat'] = 'Texto traducido al español';




Por fin!!, lo único que tenia que hacer era copiar las modificaciones que se generaban en el modifications.english.php del default para todos mis idiomas instalados, ahora parece que si funciona!!!  :D 8)
Gracias SeAlVa  en todo el foro lo único que me pudo ayudar fue tu sugerencia.

SeAlVa


Rolle

Yo tengo este index.template.html y no encuentro donde colocar el boton, serías tan amable de ayudarme por favor?

Gracias

Quote0) 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'] &gt; 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 />
'; } echo ' '; } // 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 class="middletext" style="MARGIN: 3px 1ex 1px 0px" onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
    <input style="WIDTH: 190px" name="search" />&nbsp; <input style="WIDTH: 11ex" type="submit" name="submit" value="', $txt[182], '" /> <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>
<div></div>
'; // Show the menu here, according to the menu sub template. template_menu(); // The main content should go here. echo '
<div id="bodyarea" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 2ex; PADDING-TOP: 1ex">'; } function template_main_below() { global $context, $settings, $options, $scripturl, $txt; echo ' </div>
'; // Show the &quot;Powered by&quot; and &quot;Valid&quot; logos, as well as the copyright. Remember, the copyright must be somewhere! echo '
<div id="footerarea" style="PADDING-BOTTOM: 1ex; TEXT-ALIGN: center; browser: 100%"><script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
         function smfFooterHighlight(element, value)
         {
            element.src = smf_images_url + "/" + (value ? "h_" : "") + hxxp:element.id [nonactive] + ".gif";
         }
      // ]]></script>
<table cellspacing="0" cellpadding="3" width="100%" align="center" border="0">
    <tbody>
        <tr>
            <td valign="middle" width="28%"><a target="_blank" href="hxxp:www.mysql.com/ [nonactive]"><img id="powered-mysql" onmouseover="smfFooterHighlight(this, true);" style="MARGIN: 5px 16px" onmouseout="smfFooterHighlight(this, false);" height="20" alt="', $txt['powered_by_mysql'], '" width="54" src="', $settings['images_url'], '/powered-mysql.gif" /></a> <a target="_blank" href="hxxp:www.php.net/ [nonactive]"><img id="powered-php" onmouseover="smfFooterHighlight(this, true);" style="MARGIN: 5px 16px" onmouseout="smfFooterHighlight(this, false);" height="20" alt="', $txt['powered_by_php'], '" width="54" src="', $settings['images_url'], '/powered-php.gif" /></a> </td>
            <td style="WHITE-SPACE: nowrap" valign="middle" align="center">', theme_copyright(), ' </td>
            <td valign="middle" width="28%"><a target="_blank" href="hxxp:validator.w3.org/check/referer [nonactive]"><img id="valid-xhtml10" onmouseover="smfFooterHighlight(this, true);" style="MARGIN: 5px 16px" onmouseout="smfFooterHighlight(this, false);" height="20" alt="', $txt['valid_xhtml'], '" width="54" src="', $settings['images_url'], '/valid-xhtml10.gif" /></a> <a target="_blank" href="hxxp:jigsaw.w3.org/css-validator/check/referer [nonactive]"><img id="valid-css" onmouseover="smfFooterHighlight(this, true);" style="MARGIN: 5px 16px" onmouseout="smfFooterHighlight(this, false);" height="20" alt="', $txt['valid_css'], '" width="54" src="', $settings['images_url'], '/valid-css.gif" /></a> </td>
        </tr>
    </tbody>
</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'] &amp;&amp; !$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.className == "code" || codeFix.className == "post" || codeFix.className == "signature") && codeFix.offsetHeight < 20)
                  codeFix.style.height = (codeFix.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.className == "code" && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0))
                  codeFix.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.currentStyle.overflow == "auto" && (codeFix.currentStyle.height == "" || codeFix.currentStyle.height == "auto") && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0) && (codeFix.offsetHeight != 0 || codeFix.className == "code"))
                  codeFix.style.height = (codeFix.offsetHeight + 36) + "px";
            }

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

      echo '
      // ]]></script>'; } echo ' </div>
'; // The following will be used to let the user know that some AJAX process is running echo '
<div id="ajax_in_progress" style="DISPLAY: none; browser: absolute">', $txt['ajax_in_progress'], '</div>
'; } // Show a linktree. This is that thing that shows &quot;My Community | General Category | General Discussion&quot;.. function theme_linktree() { global $context, $settings, $options; echo '
<div class="nav" style="MARGIN-TOP: 2ex; FONT-SIZE: smaller; MARGIN-BOTTOM: 2ex">'; // Each tree item has a URL and name. Some may have extra_before and extra_after. foreach ($context['linktree'] as $link_num =&gt; $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 '<strong>', $settings['linktree_link'] &amp;&amp; isset($tree['url']) ? '<a class="nav" href="' . $tree['url'] . '">' . $tree['name'] . '</a>' : $tree['name'], '</strong>'; // 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;&gt;&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']) &amp;&amp; $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin'; // Are we using right-to-left orientation? if ($context['right_to_left']) { $first = 'last'; $last = 'first'; } else { $first = 'first'; $last = 'last'; } // Show the start of the tab section. echo '
<table style="MARGIN-LEFT: 10px" cellspacing="0" cellpadding="0" border="0">
    <tbody>
        <tr>
            <td class="maintab_' , $first , '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '">' , $txt[103] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=help">' , $txt[119] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=search">' , $txt[182] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'admin' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] &gt; 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=login">' , $txt[34] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=register">' , $txt[97] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_active_' . $first . '">&nbsp;</td>
            <td class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '" valign="top"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a> </td>
            <td class="maintab_active_' . $last . '">&nbsp;</td>
            <td class="maintab_' , $last , '">&nbsp;</td>
        </tr>
    </tbody>
</table>
'; } // 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 =&gt; $value) { if (isset($value['test']) &amp;&amp; empty($context[$value['test']])) { unset($button_strip[$key]); continue; } elseif (!isset($buttons[$key]) || $force_reset) $buttons[$key] = '<a href="' . $value['url'] . '">
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>
&nbsp; &nbsp;'; } ?&gt;</a>

MaxterX

con solo agregar
// Show the [custom] button.
   echo '
            <td valign="top" class="maintab_back">
               <a href="http://la_url_que_quieras">El_Titulo_del_boton</a>
            </td>';


funciona en el idioma español verdad?
solo colocar eso??

johnnie

Quote from: MaxterX on October 05, 2007, 08:06:42 PM
con solo agregar
// Show the [custom] button.
   echo '
            <td valign="top" class="maintab_back">
               <a href="http://la_url_que_quieras">El_Titulo_del_boton</a>
            </td>';


funciona en el idioma español verdad?
solo colocar eso??

si asi lo hice yo

Casto

Y este mismo de agregar un link a algo exterior, en el theme dilbermc se me ve de otro color. ¿Qué puedo hacer?

Casto

Logré hacerlO

// Show the [custom] button.
   echo '
            <td align="center" class="menubg' , $current_action == 'pm' ? '2' : '' , '">
               <a href="http://200.27.150.182:8150/listen.pls">RADIO ONLINE</a>
            </td>';

johnnie


calla

Y como seria la forma para un "theme en general" para cualquiera... eh? porque yo lo puse en el mio y no funciona :/ Ayuda... porfavor. Muchas Gracias.

AWES0MN

Quote
THEME: VAGABOND

Buenas,miren:
Quote
<?php
// Version: 1.1.3; 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.3';

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

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

   // 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['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 + (mode ? "/upshrink2.gif" : "/upshrink.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 + (mode ? "/expand.gif" : "/collapse.gif");

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

            current_header_ic = mode;
         }
      // ]]></script>
</head>
<body>
  <div id="wrapper"/>
     <div id="header">
   <div id="head-l">
    <div id="head-r">
     <div id="userarea">';
   if ($context['user']['is_logged'])
   {
      echo '<b>', $txt['hello_member_ndt'], ' ', $context['user']['name'], '</b><br />';

      // Only tell them about their messages if they can read their messages!
      if ($context['allow_pm'])
         echo $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';

      echo '<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br /><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>';

   }
   // Otherwise they're a guest - this time ask them to either register or login - lazy bums...
   else
   {
      echo '            
      ', $txt['welcome_guest'], '
      <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: 4px 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" />
         <input type="submit" value="', $txt[34], '" />
         <input type="hidden" name="hash_passwrd" value="" />
      </form>', $context['current_time'],'<br />';
   }
   echo '
   </div>';
   echo '
      <a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
      echo '
     </div>      
    </div>
   </div>
     <div id="toolbar">
      ',template_menu(),'
     </div>
     <div id="bodyarea">';
}

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="footer">
    <div id="foot-l">
     <div id="foot-r">
         <div id="footerarea">
            <span class="smalltext">', theme_copyright(), '
            <br />Design by <a href="http://www.jr62.com"><b>Crip</b></a></span>';

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

   // 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.className == "code" || codeFix.className == "post" || codeFix.className == "signature") && codeFix.offsetHeight < 20)
                  codeFix.style.height = (codeFix.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.className == "code" && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0))
                  codeFix.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.currentStyle.overflow == "auto" && (codeFix.currentStyle.height == "" || codeFix.currentStyle.height == "auto") && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0) && (codeFix.offsetHeight != 0 || codeFix.className == "code"))
                  codeFix.style.height = (codeFix.offsetHeight + 36) + "px";
            }

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

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

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

   // The following will be used to let the user know that some AJAX process is running
   echo '
      <div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>';
echo '
</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: smaller; 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';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }
   
   // Show the start of the tab section.

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

   // How about the [home] button?
      echo '<li' , $current_action=='home' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '"><span class="menu_ar">'.$txt[103].'</span></a></span></li>';

   // How about the [help] button?
       echo '<li' , $current_action=='help' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=help" ><span class="menu_ar">', $txt[119], '</span></a></span></li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '<li' , $current_action=='search' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=search"><span class="menu_ar">', $txt[182] , '</span></a></span></li>';

   // Is the user allowed to administrate at all? ([admin])
        if ($context['allow_admin'])
      echo '<li' , $current_action=='admin' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=admin"><span class="menu_ar">', $txt[2], '</span></a></span></li>';
       
   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '<li' , $current_action=='profile' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=profile"><span class="menu_ar">', $txt[467], '</span></a></span></li>';

   // The [calendar]!
   if ($context['allow_calendar'])
      echo '<li' , $current_action=='calendar' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=calendar"><span class="menu_ar">', $txt['calendar24'], '</span></a></span></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '<li' , $current_action=='pm' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=pm"><span class="menu_ar">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></span></li>';
   
   // the [member] list button
   if ($context['allow_memberlist'])
      echo '<li' , $current_action=='mlist' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=mlist"><span class="menu_ar">' , $txt[331] , '</span></a></span></li>';

   // If the user is a guest, show [login] and [register] buttons.
   if ($context['user']['is_guest'])
   {
      echo '<li' , $current_action=='login' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=login"><span class="menu_ar">', $txt[34], '</span></a></span></li>
           <li' , $current_action=='register' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=register"><span class="menu_ar">', $txt[97], '</span></a></span></li>';
   }
   // Otherwise, they might want to [logout]...
   else
      echo '<li' , $current_action=='logout' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span class="menu_ar">', $txt[108], '</span></a></span></li>';
       echo '</ul>
<br class="clearit" />

</div>';

}

// 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' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

?>

No encuentro lode los botones^^ melo señalarian silo encuentran?? seguire buscandolo de todas formas,un saludo.
Entra ya ha Kebytes.eu - Foro de tecnología. Si es bueno, Why not?

http://kebytes.eu/

ElDon

***NUEVO*** 2,500 Vistas Youtube!!! [PREGUNTAS?]
Posicionamiento SEO
Necesitas Comprar Trafico?
Descarga Nuestro Reporte SEO Gratis!!!

puchitus

Quote from: falillista on September 12, 2008, 10:46:02 AM

THEME: VAGABOND


No encuentro lode los botones^^ melo señalarian silo encuentran?? seguire buscandolo de todas formas,un saludo.

estos?

// Show the start of the tab section.

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

   // How about the [home] button?
      echo '<li' , $current_action=='home' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '"><span class="menu_ar">'.$txt[103].'</span></a></span></li>';

   // How about the [help] button?
       echo '<li' , $current_action=='help' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=help" ><span class="menu_ar">', $txt[119], '</span></a></span></li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '<li' , $current_action=='search' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=search"><span class="menu_ar">', $txt[182] , '</span></a></span></li>';

y asi para abajo, están casi al final del archivo

AWES0MN

Entra ya ha Kebytes.eu - Foro de tecnología. Si es bueno, Why not?

http://kebytes.eu/

ElDon

#23
pero es que no te sirvio lo que te dijimos antes?

y no es en el index.php es en el index.template.php :D
***NUEVO*** 2,500 Vistas Youtube!!! [PREGUNTAS?]
Posicionamiento SEO
Necesitas Comprar Trafico?
Descarga Nuestro Reporte SEO Gratis!!!

AWES0MN

Esqe ese es el index.template jejeje
Entra ya ha Kebytes.eu - Foro de tecnología. Si es bueno, Why not?

http://kebytes.eu/

ElDon

vamos a ver entonces voy a verificar el index.template.php que pusiste jee como decia solo index pense que era solo ese archivo
***NUEVO*** 2,500 Vistas Youtube!!! [PREGUNTAS?]
Posicionamiento SEO
Necesitas Comprar Trafico?
Descarga Nuestro Reporte SEO Gratis!!!

ElDon

Quote// How about the [home] button?
      echo '<li' , $current_action=='home' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '"><span class="menu_ar">'.$txt[103].'</span></a></span></li>';

   // How about the [help] button?
       echo '<li' , $current_action=='help' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=help" ><span class="menu_ar">', $txt[119], '</span></a></span></li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '<li' , $current_action=='search' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=search"><span class="menu_ar">', $txt[182] , '</span></a></span></li>';

   // Is the user allowed to administrate at all? ([admin])
        if ($context['allow_admin'])
      echo '<li' , $current_action=='admin' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=admin"><span class="menu_ar">', $txt[2], '</span></a></span></li>';
       
   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '<li' , $current_action=='profile' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=profile"><span class="menu_ar">', $txt[467], '</span></a></span></li>';

   // The [calendar]!
   if ($context['allow_calendar'])
      echo '<li' , $current_action=='calendar' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=calendar"><span class="menu_ar">', $txt['calendar24'], '</span></a></span></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '<li' , $current_action=='pm' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=pm"><span class="menu_ar">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></span></li>';
   
   // the [member] list button
   if ($context['allow_memberlist'])
      echo '<li' , $current_action=='mlist' ? ' class="chosen"' : '' , '><span class="menu_r"><a href="', $scripturl, '?action=mlist"><span class="menu_ar">' , $txt[331] , '</span></a></span></li>';
***NUEVO*** 2,500 Vistas Youtube!!! [PREGUNTAS?]
Posicionamiento SEO
Necesitas Comprar Trafico?
Descarga Nuestro Reporte SEO Gratis!!!

kehaces

Tengo el Themes Modern Noteboor

Pero no lo veo para cambiar el inicio pero con el theme defaull  si funciona perfect


pero cual seria en este Themes Modern Noteboor

codigo--

<?php
// Version: 1.1.6; 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.6';

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

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

   // 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['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 + (mode ? "/upshrink2.gif" : "/upshrink.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 + (mode ? "/expand.gif" : "/collapse.gif");

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

            current_header_ic = mode;
         }
      // ]]></script>
</head>
<body><div class="bottom-line">
  <div id="wrapper"/>
     <div id="header">
   <div id="head-l">
  <div id="head-r">
<div id="userarea">';
   if ($context['user']['is_logged'])
   {
      echo '<b>', $txt['hello_member'], ' ', $context['user']['name'], '</b><br />';

      // Only tell them about their messages if they can read their messages!
      if ($context['allow_pm'])
         echo $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';

      echo '<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br /><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>';

   }
   // Otherwise they're a guest - this time ask them to either register or login - lazy bums...
   else
   {
      echo '            
      ', $txt['welcome_guest'], '
      <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: 4px 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" />
         <input type="submit" value="', $txt[34], '" />
         <input type="hidden" name="hash_passwrd" value="" />
      </form>', $context['current_time'],'<br />';
   }
      echo '
   </div>
   <div id="searcharea">';
      echo '
      <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
         <input class="inputs" type="text" name="search" value="', $txt[182], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt[182], '...\';" /> ';

       // 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>
   </div>';
   echo '
     <a href="'.$scripturl.'" title=""><span id="logo"> </span></a>';
      echo '
     </div>      
    </div>
   </div>';
    echo '
     ',template_menu(),'
       <div class="page">
        <div id="main-l">
         <div id="main-r">
          <div id="bodyarea">';
}

function template_main_below()

{
   global $context, $settings, $options, $scripturl, $txt;

        echo '
       </div>
     </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">
    <div id="foot-l">
       <div id="foot-r">
          <div id="footerarea"/>
            <span class="smalltext">&nbsp;<a href="http://validator.w3.org/check/referer" target="_blank" style="font-size:10px;">XHTML</a>&nbsp; | ', theme_copyright(), ' | ', $txt['c_copy'], '</span>';

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

   // 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.className == "code" || codeFix.className == "post" || codeFix.className == "signature") && codeFix.offsetHeight < 20)
                  codeFix.style.height = (codeFix.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.className == "code" && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0))
                  codeFix.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.currentStyle.overflow == "auto" && (codeFix.currentStyle.height == "" || codeFix.currentStyle.height == "auto") && (codeFix.scrollWidth > codeFix.clientWidth || codeFix.clientWidth == 0) && (codeFix.offsetHeight != 0 || codeFix.className == "code"))
                  codeFix.style.height = (codeFix.offsetHeight + 36) + "px";
            }

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

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

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

   // The following will be used to let the user know that some AJAX process is running
   echo '
      <div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>';
echo '
</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 '<span class="nav" style="font-size: 12px; margin-bottom: 2ex; margin-left: 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;&raquo;&nbsp;';
   }

   echo '</span>';
}

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

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }
   
   // Show the start of the tab section.
       echo '
           <ul id="nav-bar">';

   // How about the [home] button?
      echo '<li' , $current_action=='home' ? ' id="chosen"' : '' , '><a href="', $scripturl, '"><b>'.$txt[103].'</b></a></li>';

   // How about the [help] button?
       echo '<li' , $current_action=='help' ? ' id="chosen"' : '' , '><a href="', $scripturl, '?action=help" >', $txt[119], '</a></li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '<li' , $current_action=='search' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=search">', $txt[182] , '</a></li>';

   // Is the user allowed to administrate at all? ([admin])
        if ($context['allow_admin'])
      echo '<li' , $current_action=='admin' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=admin">', $txt[2], '</a></li>';
 
   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '<li' , $current_action=='profile' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=profile">', $txt[467], '</a></li>';

   // The [calendar]!
   if ($context['allow_calendar'])
      echo '<li' , $current_action=='calendar' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=calendar">
<span>', $txt['calendar24'], '</span></a></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '<li' , $current_action=='pm' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=pm">
<span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';
   
   // the [member] list button
   if ($context['allow_memberlist'])
      echo '<li' , $current_action=='mlist' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=mlist">
<span>' , $txt[331] , '</span></a></li>';

   // If the user is a guest, show [login] and [register] buttons.
   if ($context['user']['is_guest'])
   {
      echo '<li' , $current_action=='login' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=login">
<span>', $txt[34], '</span></a></li>
           <li' , $current_action=='register' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=register">
<span>', $txt[97], '</span></a></li>';
   }
   // Otherwise, they might want to [logout]...
   else
      echo '<li' , $current_action=='logout' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">
<span>', $txt[108], '</span></a></li>';
       echo '</ul>';

}

// 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' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}

?>




Pienso q debe estar en unos de esto

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

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }
   
   // Show the start of the tab section.
       echo '
           <ul id="nav-bar">';

   // How about the [home] button?
      echo '<li' , $current_action=='home' ? ' id="chosen"' : '' , '><a href="', $scripturl, '"><b>'.$txt[103].'</b></a></li>';

   // How about the [help] button?
       echo '<li' , $current_action=='help' ? ' id="chosen"' : '' , '><a href="', $scripturl, '?action=help" >', $txt[119], '</a></li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '<li' , $current_action=='search' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=search">', $txt[182] , '</a></li>';

   // Is the user allowed to administrate at all? ([admin])
        if ($context['allow_admin'])
      echo '<li' , $current_action=='admin' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=admin">', $txt[2], '</a></li>';
 
   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '<li' , $current_action=='profile' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=profile">', $txt[467], '</a></li>';

   // The [calendar]!
   if ($context['allow_calendar'])
      echo '<li' , $current_action=='calendar' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=calendar">
<span>', $txt['calendar24'], '</span></a></li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '<li' , $current_action=='pm' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=pm">
<span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';
   
   // the [member] list button
   if ($context['allow_memberlist'])
      echo '<li' , $current_action=='mlist' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=mlist">
<span>' , $txt[331] , '</span></a></li>';

   // If the user is a guest, show [login] and [register] buttons.
   if ($context['user']['is_guest'])
   {
      echo '<li' , $current_action=='login' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=login">
<span>', $txt[34], '</span></a></li>
           <li' , $current_action=='register' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=register">
<span>', $txt[97], '</span></a></li>';
   }
   // Otherwise, they might want to [logout]...
   else
      echo '<li' , $current_action=='logout' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">
<span>', $txt[108], '</span></a></li>';
       echo '</ul>';

dannbass

El boton de inicio seria este:
// How about the [home] button?
      echo '<li' , $current_action=='home' ? ' id="chosen"' : '' , '><a href="', $scripturl, '"><b>'.$txt[103].'</b></a></li>';


A que lo quieres cambiar?

kehaces

com dices el post  vincular un inicio a otra web

kehaces

ya lo hize jeje

aqui va para los q quieren modificar ese themes q esta bueno

quedaria asi

// How about the [home] button?
      echo '<li' , $current_action=='home' ? ' id="chosen"' : '' , '><a href="http://www.tulimkaqui"', $scripturl, '"><b>'.$txt[103].'</b></a></li>';


Solo modifica ese limk
linea  con ultraedit
392
393



suerte!!

dannbass

Revisa el codigo, porque no puedes usar el ', $scripturl, ' en el href

// Un nuevo boton?
      echo '<li' , $current_action=='home' ? ' id="chosen"' : '' , '><a href="el url de tu otra web"><b>El nombre del web que quieres usar</b></a></li>';


Solo que si hay usuarios que usan varios idiomas seria bueno que te inventaras $txt['algo'] y lo colocaras en cada index.spanish.php o index.english.php para evitar errores en el log.

izar


franco.14.08

gente pero hago el boton y como hago para editar a donde me llevaria ese boton?

RacHaV2

Quote from: kehaces on September 13, 2008, 11:31:36 PM
ya lo hize jeje

aqui va para los q quieren modificar ese themes q esta bueno

quedaria asi

// How about the [home] button?
      echo '<li' , $current_action=='home' ? ' id="chosen"' : '' , '><a href="http://www.tulimkaqui"', $scripturl, '"><b>'.$txt[103].'</b></a></li>';


Solo modifica ese limk
linea  con ultraedit
392
393



suerte!!

Cree algo Parecido solo que yo quiero que el Boton me Mande al forum asi que lo Mofique aa Mi Gusto para que entrara al forum lo que no se es como cambiarle el Nombre se que es con el $txt['algo'] Si Pongo Una Cantidad asi como 103 Coloca la Palabra Incio lo que quiero es que diga Foro Sip cual es el Code Me Pregunto un saludo

Mayeste

Me podrian ayudar con una consulta.. estoy puliendo un foro version 2.0 RC3 pero necesito agregarle un boton extra.. como esta en este foro pero pudiera estar ubicado despues de "usuarios" y antes de "salir".... he intentado segun lo que he averiguado en este foro pero me ha costado.. necesito su ayuda!! mi theme es RGBB Curve.. Muchas Gracias!!! ???

Advertisement: