Scheduled Maintenance:  10-11-2025 Electricity company maintenance between 09:00 and 15:00.
<span class="qte-attr qte_31_32-qte">3.1.x & 3.2.x</span>
			
		
		
			
				
								dmzx 							 
						Founder 			
		Posts:  6469 		Joined:  13 Jan 2014, 21:45 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by dmzx   »  10 Jan 2019, 15:42 
			
			
			
			
			
			ninowebs  wrote: 10 Jan 2019, 15:33  
ninowebs  wrote: 08 Jan 2019, 03:25 
hi I have a little problem sometimes, maybe if I do not flip and when there is google bot I see it
no help, for this annoying
please 
 
try this listener.php
Code: Select all 
<?php
/**
*
* @package phpBB Extension - Online users avatar
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace dmzx\onlineusersavatar\event;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class listener implements EventSubscriberInterface
{
	/** @var \phpbb\user */
	protected $user;
	/**
	* Constructor
	*
	* @param \phpbb\user		$user
	*
	*/
	public function __construct(\phpbb\user $user)
	{
		$this->user = $user;
	}
	static public function getSubscribedEvents()
	{
		return array(
			'core.obtain_users_online_string_sql'		=> 'obtain_users_online_string_sql',
			'core.obtain_users_online_string_modify'	=> 'obtain_users_online_string_modify',
		);
	}
	public function obtain_users_online_string_sql($event)
	{
		$sql_ary = $event['sql_ary'];
		$sql_ary['SELECT'] .= ', u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height';
		$event['sql_ary'] = $sql_ary;
	}
	public function obtain_users_online_string_modify($event)
	{
		$u_online = $event['user_online_link'];
		$online_users = $event['online_users'];
		$online_userlist = $event['online_userlist'];
		$username = $replace = array();
		foreach ($event['rowset'] as $row)
		{
			if (!isset($u_online[$row['user_id']]))
			{
				continue;
			}
			// User is logged in and therefore not a guest
			if ($row['user_id'] != ANONYMOUS)
			{
				if (isset($online_users['hidden_users'][$row['user_id']]))
				{
					$row['username'] = '<em>' . $row['username'] . '</em>';
				}
			}
			if (!empty($row['user_avatar']))
			{
				$replace_avatar = '<span class="useravatar">' . phpbb_get_user_avatar($row) . '</span> ' . $row['username'] .	'';
			}
			else
			{
				$no_avatar = generate_board_url() . "/styles/" . rawurlencode($this->user->style['style_path']) . '/theme/images/no_avatar.gif';
				$replace_avatar = '<span class="useravatar"><img src="' . phpbb_get_user_avatar($row) . '" alt="" /></span> ' . $row['username'];  // $no_avatar
			}
			$username[] = $row['username'];
			$replace[] = $replace_avatar;
		}
		if (sizeof($username))
		{
			$online_userlist = str_replace($username, $replace, $online_userlist);
		}
		$event['online_userlist'] = $online_userlist;
	}
}
backup old listener.php first 
Clear cache and try
 
			
			
									
						
										
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								ninowebs 							 
						Users 			
		Posts:  29 		Joined:  04 Jun 2015, 23:44 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by ninowebs   »  10 Jan 2019, 15:52 
			
			
			
			
			
			Ok lo testo, grazie mille,, vi farò sapere  
 
			
			
									
						
										
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								ninowebs 							 
						Users 			
		Posts:  29 		Joined:  04 Jun 2015, 23:44 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by ninowebs   »  11 Jan 2019, 13:15 
			
			
			
			
			
			Now you see it so, not annoying, even if the bots have no image no avatar
			
			
						You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
			
						
										
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								Sniper_E  Online 							 
						VIP 			
		Posts:  1157 		Joined:  14 Oct 2014, 19:01 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by Sniper_E   »  11 Jan 2019, 20:19 
			
			
			
			
			
			My bots have an avatar 
 Find one you like and give your bots an avatar.
 
			
			
									
						
							 
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™  			
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								ninowebs 							 
						Users 			
		Posts:  29 		Joined:  04 Jun 2015, 23:44 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by ninowebs   »  11 Jan 2019, 21:11 
			
			
			
			
			
			Yes, it is good idea, thank you 
 
			
			
									
						
										
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								Fast_Eddie 							 
						Users 			
		Posts:  279 		Joined:  15 Aug 2015, 20:25 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by Fast_Eddie   »  04 Jun 2019, 00:05 
			
			
			
			
			
			kaspir  wrote: 22 Jan 2017, 13:32 
Looks like this still works on 3.2, however I can't use it until I figure out what structure and field names to use for CAMO SSL Image Proxy Configuration. Any idea mate? Some image exts are easier than others to figure out. :(
Would love to use this!
Has anyone had any luck using this in 3.2x ?
 
			
			
									
						
							 Retirement 2024!
 			
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								martin 							 
						Admin 			
		Posts:  5106 		Joined:  06 Apr 2014, 16:12 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by martin   »  04 Jun 2019, 00:15 
			
			
			
			
			
			Just tested it yes it works on 3.2.7  
 
			
			
									
						
										
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								Fast_Eddie 							 
						Users 			
		Posts:  279 		Joined:  15 Aug 2015, 20:25 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by Fast_Eddie   »  04 Jun 2019, 00:33 
			
			
			
			
			
			Thank you Martin. Worked for me also. ( Need to install a test board for this kind of stuff )
			
			
									
						
										
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								TheDjRider 							 
						Users 			
		Posts:  13 		Joined:  13 May 2019, 18:24 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by TheDjRider   »  04 Sep 2021, 00:29 
			
			
			
			
			
			I've encounter strange glitch where my avatar duplicate - 
 
			
			
									
						
										
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								TheDjRider 							 
						Users 			
		Posts:  13 		Joined:  13 May 2019, 18:24 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by TheDjRider   »  12 Sep 2021, 18:39 
			
			
			
			
			
			TheDjRider  wrote: 04 Sep 2021, 00:29 
I've encounter strange glitch where my avatar duplicate - 
 
Somehow after updating Gravatar now show properly only 1 image.
 
			
			
									
						
										
						 
		 
				
								
		 
		 
	 
	 
				
		
		
			
				
 				
								BBBenj 							 
						Users 			
		Posts:  48 		Joined:  10 Mar 2017, 10:59 		
		
						
							 
		 
		
						
			
		
													
							
						
				
											Post  
									 
				by BBBenj   »  08 Jan 2022, 22:14 
			
			
			
			
			
			Thanks, 
 
Also works for me in phpBB 3.3.5.