Resultados 1 al 2 de 2

Actualizar GTSearch para vB4

Esta es una discusión en el tema Actualizar GTSearch para vB4 dentro del foro vB4 Soporte General, parte de la categoría vBulletin 4x; Hola, Tengo el siguiente código del GTSearch, pero no me funciona en vB4 y dudo que el desarrollador lo actualice ya que es para 3.6x y no tiene soporte. Cómo sería este código en vB4? Código PHP: <?php /* ====================================================================== /*   GTSEARCH: GOOGLE ™  CUSTOM SEARCH ENGINE v 1.0.0   -------------------------------------------------------------------   Copyright ©2005 - 2007, GO-TOTAL, LLC. All Rights Reserved.   Copyright ©2000-2005 Jelsoft Enterprises Ltd. All Rights Reserved.   To be used with vBulletin 3.6.0+.   This file may not be redistributed in whole or significant part.    -------------------------------------------------------------------   http://mygtblog.org | http://www.google.com/coop/docs/cse/tos.html /* ====================================================================== */ /* ==========[ SET PHP ENVIRONMENT ]===================================== */ error_reporting ...

  1. #1
    Usuario
    Fecha de ingreso
    14/dic/2009
    Mensajes
    1
    Gracias
    0
    Agradecido 0 veces en 0 mensajes
    Poder de Credibilidad
    0

    Predeterminado Actualizar GTSearch para vB4

    Hola,

    Tengo el siguiente código del GTSearch, pero no me funciona en vB4 y dudo que el desarrollador lo actualice ya que es para 3.6x y no tiene soporte.

    Cómo sería este código en vB4?

    Código PHP:
    <?php
    /* ====================================================================== /*
      GTSEARCH: GOOGLE ™  CUSTOM SEARCH ENGINE v 1.0.0
      -------------------------------------------------------------------
      Copyright ©2005 - 2007, GO-TOTAL, LLC. All Rights Reserved.
      Copyright ©2000-2005 Jelsoft Enterprises Ltd. All Rights Reserved.
      To be used with vBulletin 3.6.0+.
      This file may not be redistributed in whole or significant part.
       -------------------------------------------------------------------
      http://mygtblog.org | http://www.google.com/coop/docs/cse/tos.html
    /* ====================================================================== */

    /* ==========[ SET PHP ENVIRONMENT ]===================================== */
    error_reporting(E_ALL & ~E_NOTICE);

    /* ==========[ DEFINE IMPORTANT CONSTANTS ]============================== */
    define('THIS_SCRIPT''gtsearch');

    /* ==========[ PRE-CACHE TEMPLATES AND DATA ]============================ */
    // get special phrase groups
    $phrasegroups = array('search');

    // get special data templates from the datastore
    $specialtemplates = array();

    // pre-cache templates used by all actions
    $globaltemplates = array(
      
    'GTSEARCH_GOOGLE',
      );

    // pre-cache templates used by specific actions
    $actiontemplates = array();

    /* ==========[ REQUIRE BACK-END ]======================================== */
    require_once('./global.php');   

    /* ====================================================================== */
    /* ==========[ START MAIN SCRIPT ]======================================= */
    /* ====================================================================== */
    if (!$vbulletin->options['gtsearch_enable'] OR !$vbulletin->options['gtsearch_search_box_code'])
    {
      
    print_no_permission(); 
    }

    $vbulletin->input->clean_array_gpc('r', array( 
      
    'q'  => TYPE_NOHTML,
      
    'sa' => TYPE_NOHTML,
    ));   
       
    $gtgoogle = array();   
    $gtgoogle['query'] = $vbulletin->GPC['q'];
    $gtgoogle['qencode'] = urlencode($gtgoogle['query']);           
          
    if (
    $vbulletin->GPC['sa'] AND empty($gtgoogle['query']))
    {
      
    $show['errors'] = true
    }

    $navbits[] = $gtgoogle['query'] ? construct_phrase($vbphrase['search_for_x'], $gtgoogle['query']) : $vbphrase['errors_occured_with_search'];
     
    /* ==========[ PRINT PAGE ]============================================== */  
    // print navbar
    $navbits construct_navbits($navbits);   
    eval(
    '$navbar = "' fetch_template('navbar') . '";');
    // print shell
    eval('print_output("' fetch_template('GTSEARCH_GOOGLE') . '");');    
    ?>
    Gracias



    Temas Similares:

  2. #2
    Administrador Avatar de Jhonnyf
    Fecha de ingreso
    13/jun/2009
    Ubicación
    In my mind
    Mensajes
    1.360
    Gracias
    60
    Agradecido 1.100 veces en 562 mensajes
    Entradas de Blog
    1
    Poder de Credibilidad
    10

    Predeterminado Respuesta: Actualizar GTSearch para vB4

    Básicamente es reescribir la plantilla GTSEARCH_GOOGLE y cambiar
    Código PHP:
    // print shell
    eval('print_output("' fetch_template('GTSEARCH_GOOGLE') . '");'); 
    por el nuevo sistema que seria

    Código PHP:
    $templater vB_Template::create('GTSEARCH_GOOGLE');
    $templater->register_page_templates();
    $templater->register('navbar'$navbar);
    $templater->register('pagetitle'$pagetitle);
    print_output($templater->render()); 
    Es sistema de plantillas en vb4 es muy diferente que a las versiones anteriores

    [GRACIAS] -> es Boton magico que hace que siempre recibas soporte, USALO!!!

Etiquetas de este tema

Foro | Chat y Juegos | Hello Kitty | Programacion | Foro Cristiano | XAT | Chat Foro | Perú | SummArg