Anubis   22 Mar, 2010, 6:49 pm
#1
-Titulo: poner foto
-URL: www.searz-online.com/forum
-Version del Foro: Actual
-Actualizacion: 1.4
-Informacion del problema: Quisiera saver como poner una imagen para todos los nuevos usuario que se registran, para que no aparescan sin imagen
Invitado   22 Mar, 2010, 7:13 pm
#2
Hola.

Mira este plugin te servirá

http://mods.mybboard.net/view/default-profile

Ese le da un Avatar, firma a los nuevos registrados

Saludos.
Anubis   22 Mar, 2010, 10:02 pm
#3
no me sirvio ese plugin
Chava   22 Mar, 2010, 10:04 pm
#4
si sirve, instalalo bien y en ajustes generales pon la direccion de tu avatar
Anubis   23 Mar, 2010, 8:22 pm
#5
no hay otro? xk creo que este no me sirvio
Aquilez   23 Mar, 2010, 9:43 pm
#6
Hace cosa de 1 semana hice este plugin para que siempre se vea un avatar. Obviamente como estaba destinado para uso personal, no le agregue ningun campo de configuracion ni nada.
Solo sube la imagen que quieres que se muestre por defecto a "images/avatars/invalid_url.gif" (O cambia la url en el codigo).

default_avatar.php

<?php

/**
 * MyBB 1.4
 * Copyright © 2008 MyBB Group, All Rights Reserved
 *
 * Default Avatar by Santiago Dimattia
 * http://www.teleportz.com.ar
 * 
 */

if(!defined("IN_MYBB"))
{
	die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("postbit", "add_default_avatar_postbit");
$plugins->add_hook("member_profile_end", "add_default_avatar_memberpage");

function default_avatar_info()
{
	/**
	 * Array of information about the plugin.
	 * name: The name of the plugin
	 * description: Description of what the plugin does
	 * website: The website the plugin is maintained at (Optional)
	 * author: The name of the author of the plugin
	 * authorsite: The URL to the website of the author (Optional)
	 * version: The version number of the plugin
	 * guid: Unique ID issued by the MyBB Mods site for version checking
	 * compatibility: A CSV list of MyBB versions supported. Ex, "121,123", "12*". Wildcards supported.
	 */
	return array(
				"name" => "Default avatar",
				"description" => "Show a default avatar is the user dosn't have one",
				"website" => "",
				"author" => "Santiago Dimattia",
				"authorsite" => "http://www.teleportz.com.ar",
				"version" => "0.1",
				"guid" => "",
				"compatibility" => "14*"
			);
}

function default_avatar_activate()
{
	return TRUE;
}


function default_avatar_deactivate()
{
	return TRUE;
}

function add_default_avatar_postbit(&$post)
{
	global $mybb, $templates;
	
	if($post['useravatar'] == '')
	{
		$post['avatar'] = 'images/avatars/invalid_url.gif';
		$avatar_width_height = 'width="84" height="84"';
		eval("\$avatar .= \"".$templates->get("postbit_avatar")."\";");
		$post['useravatar'] = $avatar;
	}
	
	return $post;
}

function add_default_avatar_memberpage()
{
	global $mybb, $templates, $memprofile, $avatar;
	
	if($avatar == '')
	{
		$avatar = '<img src="images/avatars/invalid_url.gif" alt="" width="84" height="84" />';
	}
	
	return true;
}

?>

PS: Si usas el "Default Profile", cualquier usuario puede borrar su avatar cuando lo desee, y no se va a ver.
Cluster   24 Mar, 2010, 12:32 pm
#7
muy bueno aquilez gracias ^^

Smile
  
Powered By MyBB, © 2002-2025 MyBB Group.
Made with by Curves UI.