Recordad que para pedir soporte alguno, debéis facilitar los datos de soporte oportunos por favor, mirad aquí y leer las Normas generales del foro, esto nos servirá de ayuda para dar el mejor soporte..

Gracias.

La Administración de phpBB España.

Ocultar enlaces a los invitadosTema Solucionado

Soporte de MODs para phpBB 3.0.x
Dudas sobre AutoMOD aquí por favor.
Cerrado
Avatar de Usuario
ThE KuKa
Administrador
Mensajes: 10374
Registrado: 04 Ene 2004, 19:27
Género:
Edad: 49

Ocultar enlaces a los invitados  Tema Solucionado

#1

Mensaje por ThE KuKa »

Hola,

Creo que debería hacerlo sin problemas.

Abrir el archivo /language/es/common.php

BUSCAR:

Código: Seleccionar todo

    'BBCODE_GUIDE'    => 'Guía BBCode', 
DESPUÉS, AÑADIR:

Código: Seleccionar todo

   'BBCODE_GIZLI_LINK'         => '<b><font color=red>Debe registrarse para ver este enlace.</font> Gracias por su visita.</b>', 
(Cambiar este texto a vuestro gusto y demás...)

Abrir el archivo /includes/bbcode.php

BUSCAR: (Linea 458 aprox.)

Código: Seleccionar todo

    function bbcode_tpl_replace($tpl_name, $tpl)
    {
        global $user;

        static $replacements = array(
            'quote_username_open'    => array('{USERNAME}'    => '$1'),
            'color'                    => array('{COLOR}'        => '$1', '{TEXT}'            => '$2'),
            'size'                    => array('{SIZE}'        => '$1', '{TEXT}'            => '$2'),
            'img'                    => array('{URL}'        => '$1'),
            'flash'                    => array('{WIDTH}'        => '$1', '{HEIGHT}'            => '$2', '{URL}'    => '$3'),
            'url'                    => array('{URL}'        => '$1', '{DESCRIPTION}'    => '$2'),
            'email'                    => array('{EMAIL}'        => '$1', '{DESCRIPTION}'    => '$2')
        );

        $tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);

        if (!empty($replacements[$tpl_name]))
        {
            $tpl = strtr($tpl, $replacements[$tpl_name]);
        }

        return trim($tpl);
    } 
REEMPLAZAR POR:

Código: Seleccionar todo

    function bbcode_tpl_replace($tpl_name, $tpl)
    {
        global $user;

        static $replacements = array(
            'quote_username_open' => array('{USERNAME}' => '$1'),
            'color' => array('{COLOR}' => '$1', '{TEXT}' => '$2'),
            'size' => array('{SIZE}' => '$1', '{TEXT}' => '$2'),
            'img' => array('{URL}' => '$1'),
            'flash' => array('{WIDTH}' => '$1', '{HEIGHT}' => '$2', '{URL}' => '$3'),
            'url' => array('{URL}' => '$1', '{DESCRIPTION}' => '$2'),
            'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
        );

        static $replacements2 = array(
            'quote_username_open' => array('{USERNAME}' => '$1'),
            'color' => array('{COLOR}' => '$1', '{TEXT}' => '$2'),
            'size' => array('{SIZE}' => '$1', '{TEXT}' => '$2'),
            'img' => array('{URL}' => '$1'),
            'flash' => array('{WIDTH}' => '$1', '{HEIGHT}' => '$2', '{URL}' => '$3'),
            'url' => array('{URL}' => 'ucp.php?mode=register', '{DESCRIPTION}' => 'warn_link'),
            'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
        );

        $tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);

        if ($user->data['user_id'] != ANONYMOUS) 
        {
            if (!empty($replacements[$tpl_name])) 
            {
                $tpl = strtr($tpl, $replacements[$tpl_name]);
            }
        }
                else
        {
            if (!empty($replacements2[$tpl_name]))
            {
                $tpl = strtr($tpl, $replacements2[$tpl_name]);
            }
            $tpl = str_replace("warn_link", $user->lang["BBCODE_GIZLI_LINK"], $tpl);
        }

        return trim($tpl);
    }  
Abrir el archivo viewtopic.php

BUSCAR:

Código: Seleccionar todo

    $message = censor_text($row['post_text']);  
DESPUÉS, AÑADIR:

Código: Seleccionar todo

    if ($user->data['user_id'] == ANONYMOUS)
    {
        $message = preg_replace( '/<.*href="(.*?)">(.*?)(<\/a>)/', '<a href="ucp.php?mode=register">'.$user->lang["BBCODE_GIZLI_LINK"].'</a>', $message );
    }  
Guardar los archivos, subirlos y todo listo.

📌 Raul [ThE KuKa] en phpBB 📌
✅ Jr. Extension Validator - Jr. Styles Validator - Style Customisations - Translator - International Support Team
✅

Si te gustan mis estilos, traducciones, etc. y quieres mostrar algo de aprecio, no dudes en hacer una donación Imagen
:flag_es: phpBB España - En línea desde 2003 :heart:



Cerrado

Volver a “Soporte de MODs”