Ver Mensaje Individual
  #10 (permalink)  
Antiguo 10/03/2010, 16:27
AlexJB
 
Fecha de Ingreso: marzo-2010
Mensajes: 16
Antigüedad: 14 años, 1 mes
Puntos: 0
Respuesta: Como insertar este codigo a un archivo php.

Vamos a ver si ahora alguien me lo puede solucionar.

Tengo que introducir el siguiente codigo

Cita:
<script type="text/javascript">

var wr_host = "aimfar";

var wr_site = xxx;

var wr_page = xxxx;

var wr_board = xxxx;

var wr_boardsize = "1x1";

var wr_floating = x;

var wr_detail = '';

var wr_thema = 0;

</script>

<script type="text/javascript" src="http://cstatic.weborama.fr/js/publisher/customers/aimfar.js"></script>
antes de </body> en el archivo index.template.php que muestro a continuación el final del mismo ya que es demasiado largo para un mensaje.

Código PHP:
         // 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>' '';

    
// How about the [search] button?
    
if ($context['allow_search'])
        echo (
$current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
                    <a href="'
$scripturl'?action=search">' $txt[182] , '</a>
                </td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

    
// Is the user allowed to administrate at all? ([admin])
    
if ($context['allow_admin'])
        echo (
$current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'admin' 'active_back' 'back' '">
                    <a href="'
$scripturl'?action=admin">' $txt[2] , '</a>
                </td>' 
$current_action == 'admin' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

    
// Edit Profile... [profile]
    
if ($context['allow_edit_profile'])
        echo (
$current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'profile' 'active_back' 'back' '">
                    <a href="'
$scripturl'?action=profile">' $txt[79] , '</a>
                </td>' 
$current_action == 'profile' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

    
// Go to PM center... [pm]
    
if ($context['user']['is_logged'] && $context['allow_pm'])
        echo (
$current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'pm' 'active_back' 'back' '">
                    <a href="'
$scripturl'?action=pm">' MENSAJES ' '$context['user']['unread_messages'] > '[<strong>'$context['user']['unread_messages'] . '</strong>]' '' '</a>
                </td>' 
$current_action == 'pm' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

    
// The [calendar]!
    
if ($context['allow_calendar'])
        echo (
$current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'calendar' 'active_back' 'back' '">
                    <a href="'
$scripturl'?action=calendar">' $txt['calendar24'] , '</a>
                </td>' 
$current_action == 'calendar' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

    
// the [member] list button
    
if ($context['allow_memberlist'])
        echo (
$current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
                    <a href="'
$scripturl'?action=mlist">' $txt[331] , '</a>
                </td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';            

    
// If the user is a guest, show [login] button.
    
if ($context['user']['is_guest'])
        echo (
$current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'login' 'active_back' 'back' '">
                    <a href="'
$scripturl'?action=login">' $txt[34] , '</a>
                </td>' 
$current_action == 'login' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


    
// If the user is a guest, also show [register] button.
    
if ($context['user']['is_guest'])
        echo (
$current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'register' 'active_back' 'back' '">
                    <a href="'
$scripturl'?action=register">' $txt[97] , '</a>
                </td>' 
$current_action == 'register' '<td class="maintab_active_' $last '">&nbsp;</td>' '';


    
// Otherwise, they might want to [logout]...
    
if ($context['user']['is_logged'])
        echo (
$current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'logout' 'active_back' 'back' '">
                    <a href="'
$scripturl'?action=logout;sesc='$context['session_id'], '">' $txt[108] , '</a>
                </td>' 
$current_action == 'logout' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

    
// The end of tab section.
    
echo '
                <td class="maintab_' 
$last '">&nbsp;</td>
            </tr>    
        </table>'
;

    
// Show the start of the tab section.
    
echo '        
                <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 210px;">
                <tr>
                    <td class="maintab_' 
$first '">&nbsp;</td>';
  
  
// the [member] list button
    
if ($context['allow_memberlist'])
        echo (
$current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'mlist' 'active_back' 'back' '">
                    <a href="http://climamas.com/index.htm" title="">' 
CLIMAMAS '</a>
                </td>' 
$current_action == 'mlist' '<td class="maintab_active_' $last '">&nbsp;</td>' '';                

    
// 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="http://climamas.com/webcams/index.htm" title="">' 
WEBCAMS '</a>
                </td>' 
$current_action == 'home' '<td class="maintab_active_' $last '">&nbsp;</td>' '';

    
// How about the [search] button?
    
if ($context['allow_search'])
        echo (
$current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
                    <a href="http://www.climamas.com/Unha/Current_Monitor.htm" title="">' 
UNHA '</a>
                </td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';
                
        
// How about the [search] button?
    
if ($context['allow_search'])
        echo (
$current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
                    <a href="http://www.climamas.com/Montgarri/Current_Monitor.htm" title="">' 
MONTGARRI '</a>
                </td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';
                
        
// How about the [search] button?
    
if ($context['allow_search'])
        echo (
$current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' $first '">&nbsp;</td>' '' '
                <td valign="top" class="maintab_' 
$current_action == 'search' 'active_back' 'back' '">
                    <a href="http://www.climamas.com/Banhs/Current_Monitor.htm" title="">' 
BANHS '</a>
                </td>' 
$current_action == 'search' '<td class="maintab_active_' $last '">&nbsp;</td>' '';                        

    
// The end of tab section.
    
echo '
                <td class="maintab_' 
$last '">&nbsp;</td>
            </tr>    
        </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 => $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>';
}

?> 
En el siguiente mensaje pongo la perte debody que falta

Gracias por el que lo intente