Simple Machines Community Forum

SMF Support => Language Specific Support => Italiano (Italian) => Topic started by: pr0xy00 on October 10, 2010, 01:01:50 PM

Title: Problema aggiunta bottone "HomePortale
Post by: pr0xy00 on October 10, 2010, 01:01:50 PM
Ragazzi ho aggiunto il bottone per reindirizzare smf sul portale ma non riesco a inserire il link per farlo arrivare sul portale, cioè il link lo riesco a inserire ma ma reindirizza su www.sito.it/fourm/www.sito.it e pure ho fatto tutto correttamente.

Questo è il codice del bottone

// Show the [home_portale] button.
   echo ($current_action=='home_portale' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'home_portale' ? 'active_back' : 'back' , '">
               <a href="www.sito.it">', "Home Portale" , '</a>
            </td>' , $current_action == 'home_portale' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' :


sapete aiutarmi?
Title: Re: Problema aggiunta bottone "HomePortale
Post by: emanuele on October 10, 2010, 03:37:30 PM
Quote from: pr0xy00 on October 10, 2010, 01:01:50 PM
pure ho fatto tutto correttamente.
Se avessi fatto tutto correttamente funzionerebbe... :P ;)

Se in un tag "a" non metti "http://", il link viene interpretato come "relativo" (magari le parole non sono il massimo di tecnicismo (dato che nemmeno io son sicuro di quel che scrivo), ma rendono l'idea) e quindi viene aggiunto all'inizio l'indirizzo della pagina che stai visualizzando, quindi il codice "corretto" può essere:

// Show the [home_portale] button.
   echo ($current_action=='home_portale' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'home_portale' ? 'active_back' : 'back' , '">
               <a href="http://www.sito.it">', "Home Portale" , '</a>
            </td>' , $current_action == 'home_portale' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' :


oppure:
// Show the [home_portale] button.
   echo ($current_action=='home_portale' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'home_portale' ? 'active_back' : 'back' , '">
               <a href="/">', "Home Portale" , '</a>
            </td>' , $current_action == 'home_portale' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' :
Title: Re: Problema aggiunta bottone "HomePortale
Post by: pr0xy00 on October 10, 2010, 05:15:45 PM
Infatti ho risolto mettendo solo "/ " grazie tante