Bom dia..
Fizeram um MOD, manualmente para bloquear os links em codigo [CODE! aos visitantes, e so esses links..
Eu gostava, de converte-lo para versão 1.1.8 se ainda nao estiver, e para portuguese a minha linguagem!..
passo a citar o codigo aqui:
Registered CODE
Make my friend Jaa(c) :o
File Edits:
./Themes/default/languages/index.english-utf8.php
Find:
$txt['quote'] = 'Quote';
Add After:
// Registered code
$txt['smula_hoste'] = "Hello,";
$txt['smula_hoste_reg'] = ' only the <a href="' . $scripturl . '?action=login">logged</a> users can see the characters hidden in CODE. <br /> If you are not registered, you can do it <a href="' . $scripturl . '?action=register">THERE</a>.';
// Registered code
File Edits:
./Themes/default/languages/index.czech-utf8.php
Find:
$txt['quote'] = 'Citace';
Add After:
// Registered code
$txt['smula_hoste'] = "Dobrý den,";
$txt['smula_hoste_reg'] = ' pouze <a href="' . $scripturl . '?action=login">přihlášení</a> uživatelé mohou vidět znaky ukryté v CODE. <br />Pokud nejste ještě zaregistrováni, toto můžete zcela zdarma a bez závazků provést <a href="' . $scripturl . '?action=register">ZDE</a>.';
// Registered code
./Sources/Subs.php
Find:
'tag' => 'code',
'type' => 'unparsed_content',
'content' => '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',
// !!! Maybe this can be simplified?
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $context;
if (!isset($disabled[\'code\']))
{
$php_parts = preg_split(\'~(<\?php|\?>)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
{
Replace With:
'tag' => 'code',
'type' => 'unparsed_content',
// Registered code
'content' => $user_info['is_guest'] ? '<div class="codeheader">' . $txt['code'] . ': </div><code>' . $txt['smula_hoste'] . $txt['smula_hoste_reg'] . '</code>' : '<div class="codeheader">' . $txt['code'] . ': <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation">' . $txt['code_select'] . '</a></div><code>$1</code>',
// !!! Maybe this can be simplified?
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $context;
if (!isset($disabled[\'code\']))
{
$php_parts = preg_split(\'~(<\?php|\?>)~\', $data, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
{
Does not yet support SMF 2.0
For SMF 2.0 RC1 ;)
Obrigado desde já! wink