Pagina 1 din 1

Cum pot sa pun google custom search pe forum

Scris: 13-Noi-2012, 15:49:54
de AndroidZone
Cum pot sa pun google custom search exact cum este aici pe forum?

Forum 3.0.11: Android Zone
Moduri: Automod, gymsitemaps
Tema: prosilver special edition

Am obtinut codul pentru forum:

Cod: Selectaţi tot

<!-- Put the following javascript before the closing </head> tag. -->
<script>
  (function() {
    var cx = '005088283772121899634:vlqmnlcust8';
    var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
  })();
</script>

<!-- Place this tag where you want both of the search box and the search results to render -->
<gcse:search></gcse:search>
Se poate proba aici

Re: Cum pot sa pun google custom search pe forum

Scris: 18-Noi-2012, 22:34:34
de bogdan
1. Creezi un fisier in root:

Cod: Selectaţi tot

<?php
    define('IN_PHPBB', true);
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);

    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup();
    page_header('Căutare - Google Search');

        $template->set_filenames(array(
            'body' => 'googlesearch.html',
        ));

    make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
    page_footer();
    ?>
2. Adaugi linia in overall_header:

Cod: Selectaţi tot

 <a href="search_google.php" title="Cautare cu Google Search">Google Search</a>
3. Creezi un fisier nou googlesearch.html in directorul template folosind codul furnizat de Google.

Re: Cum pot sa pun google custom search pe forum

Scris: 20-Noi-2012, 23:11:48
de AndroidZone
Multumesc pentru ajutorul acordat!