Autor Tópico: Mod para Membro se registrar anunciado em todos os links  (Lida 7106 vezes)

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

Offline Darkness

  • VectorSeries.Net
  • Administrador
  • *
  • Mensagens: 337
  • Rank: 3
  • Sexo: Masculino
  • Vector Series
    • Vector Series
Mod para Membro se registrar anunciado em todos os links
« em: 27 de Junho de 2009, 22:17 »
Este mod faz com que todos os links do forum sejam ocultos a Visitantes mostrando-lhe uma mensagem que para ver o conteúdo ele precisa se logar ou se registrar.

./Themes/default/languages/Modifications.english.php

Encontre:
Código: [Seleccione]
?>
Adcione Antes:
Código: [Seleccione]
//Begin Reg Links
$txt['no_view_links'] = 'You are not allowed to view links.';
//END Reg Links Text Strings

./Themes/default/languages/Modifications.portuguese_pt.php (Ou mude portuguese_pt pela linguagem do seu forum)

Encontre:
Código: [Seleccione]
?>
Adcione Antes:
Código: [Seleccione]
//Begin Reg Links Translator By: Darkness
$txt['no_view_links'] = 'Você não tem Permissão para Exibir Links.';
//END Reg Links Text Strings

./Sources/Subs.php

Encontre:
Código: [Seleccione]
array(
'tag' => 'iurl',
'type' => 'unparsed_content',
'content' => '<a href="$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => '<a href="$1">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),

Substitua por:
Código: [Seleccione]
array(
'tag' => 'iurl',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Registre-se</a>&nbsp;o2&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' : '<a href="$1">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'iurl',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Registre-se</a>&nbsp;ou&nbsp;<a href="' . $scripturl . '?action=login">Login</a><div style="visibility:hidden">' : '<a href="$1">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (substr($data, 0, 1) == \'#\')
$data = \'#post_\' . substr($data, 1);'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $user_info['is_guest'] ?  '' :  ' ($1)',
),

Encontre:
Código: [Seleccione]
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" target="_blank">',
'after' => '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),

Substitua por:
Código: [Seleccione]
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Registre-se</a>&nbsp;ou&nbsp;<a href="' . $scripturl . '?action=login">Login</a>' : '<a href="$1" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => $user_info['is_guest'] ? $txt['no_view_links'] . "\n" . '<a href="' . $scripturl . '?action=register">Registre-se</a>&nbsp;ou&nbsp;<a href="' . $scripturl . '?action=login">Login</a><div style="visibility:hidden">' : '<a href="$1" target="_blank">',
'after' => $user_info['is_guest'] ?  '</div>' : '</a>',
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => $user_info['is_guest'] ?  '' : ' ($1)',
),

Translator SMF - Brazilian
Não respondo MP de ajuda, Poste sua duvida no forum para ajuda

Offline joomlamz

  • Fundador
  • *
  • Mensagens: 4265
  • Rank: 4877
  • Sexo: Masculino
  • Joomla!
    • Web Master !
Re:Mod para Membro se registrar anunciado em todos os links
« Responder #1 em: 30 de Junho de 2009, 08:09 »
Bom trabalho
 notworthy
Apllic   Alojamentos Profissionais de Moçambique!

Offline belvio

  • Iniciar SmfPt
  • *
  • Mensagens: 45
  • Rank: 0
  • Sexo: Masculino
    • Valasoft
Re:Mod para Membro se registrar anunciado em todos os links
« Responder #2 em: 06 de Julho de 2009, 17:33 »
muito obrigado nota 10 wink

sou eu...............o mesmo de sempre

Offline aalex

  • Smfpt em 10%
  • *
  • Mensagens: 258
  • Rank: 8
Re:Mod para Membro se registrar anunciado em todos os links
« Responder #3 em: 06 de Julho de 2009, 22:06 »
seria possivel um demo?? andei anos a procura deste mod lol

para que versao do smf funciona? eu precisava para smf 2.0rc1-1

Offline ferr@ri

  • Iniciar SmfPt
  • *
  • Mensagens: 138
  • Rank: 4
Re:Mod para Membro se registrar anunciado em todos os links
« Responder #4 em: 30 de Dezembro de 2009, 17:46 »
obrigado amigo estou a usar no smf 1.1.11, mas tem um problema é uso tambem o MOD hide tag especial e já funciona. só funciona com links directos.

há alguma forma de alterar para funcionar tambem com o hide tag especial??