Autor Tópico: Google BBC Tag  (Lida 3613 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Google BBC Tag
« em: 17 de Março de 2009, 11:06 »
$sourcedir/Subs.php

Pesquisar
Código: [Seleccione]
if (empty($modSettings['enableEmbeddedFlash']))
$disabled['flash'] = true;

Adicionar
Código: [Seleccione]
if (empty($modSettings['enableGoogleTag']))
$disabled['google'] = false;


Pesquisar
Código: [Seleccione]
array(
'tag' => 'glow',
'type' => 'unparsed_commas',
'test' => '[#0-9a-zA-Z\-]{3,12},([012]\d{1,2}|\d{1,2})(,[^]]+)?\]',
'before' => $context['browser']['is_ie'] ? '<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Glow(color=$1, strength=$2); font: inherit;">' : '<span style="background-color: $1;">',
'after' => $context['browser']['is_ie'] ? '</td></tr></table> ' : '</span>',
),

Adicionar
Código: [Seleccione]
array(
'tag' => 'google',
'type' => 'unparsed_content',
'content' => 'Google Search: <a href="http://www.google.com/search?q=$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
                'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_content' => '<span style="color: red;">Google Search: $1</span>',
),
array(
'tag' => 'google',
'type' => 'unparsed_equals',
'before' => 'Google Search: <a href="http://www.google.com/search?q=$1" target="_blank">',
                'after' => '</a>',
                'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_before' => '<span style="color: red;">Google Search: ',
                'disabled_after' => ' ($1)</span>',
),


$sourcedir/ManagePosts.php

Pesquisar
Código: [Seleccione]
'enableEmbeddedFlash' => empty($_POST['enableEmbeddedFlash']) ? '0' : '1',
Adicionar
Código: [Seleccione]
'enableGoogleTag' => empty($_POST['enableGoogleTag']) ? '0' : '1',

$themedir/Admin.template.php
Pesquisar
Código: [Seleccione]
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="enableEmbeddedFlash_check">', $txt['enableEmbeddedFlash'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=enableEmbeddedFlash" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">', $txt['enableEmbeddedFlash_warning'], '</div>
</th>
<td valign="top">
<input type="checkbox" name="enableEmbeddedFlash" id="enableEmbeddedFlash_check"', empty($modSettings['enableEmbeddedFlash']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr><tr class="windowbg2">

Em seguida, adicione a

Código: [Seleccione]
<th width="50%" align="right">
<label for="enableGoogleTag_check">', $txt['enableGoogleTag'], '</label>:
<div class="smalltext" style="font-weight: normal;">', $txt['enableGoogleTag_disabled'], '</div>
</th>
<td valign="top">
<input type="checkbox" name="enableGoogleTag" id="enableGoogleTag_check"', empty($modSettings['enableGoogleTag']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr><tr class="windowbg2">


$themedir/Post.template.php

Pesquisar
Código: [Seleccione]
$context['bbc_tags'][] = array(
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),

Em seguida, adicione a
Código: [Seleccione]
'google' => array('code' => 'google', 'before' => '[google=Enter Search Term]', 'after' => '[/google]', 'description' => $txt['google']),

$themedir/languages/Modifications.portuguese_pt.php

Código: [Seleccione]
$txt['google'] = 'Google Search';

$themedir/languages/Admin.portuguese_pt.php

Pesquisar
Código: [Seleccione]
$txt['enableEmbeddedFlash_warning'] = 'pode ser um risco de segurança!';
Adicionar

Código: [Seleccione]
$txt['enableGoogleTag'] = 'Activar o Google Search Tags';
$txt['enableGoogleTag_disabled'] = 'Desabilitar tags será em vermelho.';


a imagem pode colocar

google.gif teuthemes/images/bbc


correr o ficheiro add_sql_row.php