Página 1 de 1

Mod Para No Avatar En Phpbb3

Publicado: 05 Jul 2008, 19:22
por billybones
Con este modo daremos un avatar po defecto a los usuarios que no lo tengan.


Nivel de instalación fácil
Tiempo de instalación: 1 minuto
Autor: IHMUN
Archivos a editar 1
* root/includes/functions_display.php

Archivos Incluídos
ninguno, solo elije la imagen de no avatar que gustes y
ponle como nombre: no_avatar.gif




1.
Copiar la imagen no_avatar.gif
A: root/images/no_avatar.gif


NO OLVIDES RESPALDAR EL ARCHIVO QUE VAYAS A MODIFICAR

Abrir: root/includes/functions_display.php

Buscar:

Código: Seleccionar todo


   if (empty($avatar) || !$avatar_type)
   {
      return '';
   }
Remplazar por:

Código: Seleccionar todo

if (empty($avatar) || !$avatar_type)
   {
      if (empty($avatar_width) && empty($avatar_height))
      {
         return '<img src="' . $phpbb_root_path . 'images/no_avatar.gif"  alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
      }
      elseif ( empty($avatar_height) )
      {
         return '<img src="' . $phpbb_root_path . 'images/no_avatar.gif" width="' . $avatar_width . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
      }
      elseif ( empty($avatar_width) )
      {
         return '<img src="' . $phpbb_root_path . 'images/no_avatar.gif" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
      }
   }
            
            

Guardar y sube el archivo.

Fin del MOD.