Afficher les robots des moteurs de recherche dans phpbb

Tous les benchmarks, vos résultats, vos tests.
Vos programmes, vos conseils logiciel
Votre matos, vos problèmes
Avatar de l’utilisateur
Aurelienazerty
Webmaster / Président
LAN : 127
Réactions :
Messages : 25544
Inscription : septembre 27, 2002, 9:41 pm

Afficher les robots des moteurs de recherche dans phpbb

Message par Aurelienazerty »

Voilà le mod qui est sur le site:

Code : Tout sélectionner

##############################################################
## MOD Title: Show Search Bot
## MOD Author: W. Aurelien < aurelien.willem AT team-azerty.com > http://www.team-azerty.com
## MOD Description: This mod add Search Bot in the liste of connected user, in the "who is online" page, and in the administration index.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 1 Minute
## Files To Edit: viewonline.php, includes/page_header.php,  admin/index.php
## Included Files: 0
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes: This mod was tested on phpBB version 2.0.17
##               This MOD is EasyMOD Friendly!
## 
##############################################################
## MOD History:
##
##   2005-08-22 - Version 1.0.0
##      - Initial version.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#

includes/bbcode.php
 
#
#-----[ FIND ]------------------------------------------
#

		if ( $row['session_ip'] != $prev_ip )
		{
			$username = $lang['Guest'];

#
#-----[ AFTER, ADD ]------------------------------------------
#

			//MOD Show Search Bot
			$tmp_list = explode(".", decode_ip($row['session_ip']));
			if ($tmp_list[0] == "66" && $tmp_list[1] == "249") {
				//Google
				$username = "Google";
			}
			if ( ($tmp_list[0] == "207" && $tmp_list[1] == "66" && $tmp_list[2] == "146") ||
			   ($tmp_list[0] == "207" && $tmp_list[1] == "46") ){
				//MSN
				$username = "MSN";
			}
			if ( ($tmp_list[0] == "66" && $tmp_list[1] == "196") ||
			   ($tmp_list[0] == "68" && $tmp_list[1] == "142") ) {
				//Yahoo
				$username = "Yahoo";
			}
			if ($tmp_list[0] == "195" && $tmp_list[1] == "101" && $tmp_list[2] == "94") {
				//Voilà
				$username = "Voilà";
			}
			if ($tmp_list[0] == "65" && $tmp_list[1] == "19" && $tmp_list[2] == "150" && $tmp_list[3] >= 193 && $tmp_list[3] <= 256) {
				//Omni-Explorer
				$username = "Omni-Explorer";
			}
			if ($tmp_list[0] == "212" && $tmp_list[1] == "27" && $tmp_list[2] == "41" && $tmp_list[3] >= 20 && $tmp_list[3] <= 50) {
				//Pompos
				$username = "Pompos";
			}
			//End Show Search Bot
 
#
#-----[ OPEN ]------------------------------------------
#

includes/page_header.php
 
#
#-----[ FIND ]------------------------------------------
#

			// Skip multiple sessions for one user
			if ( $row['session_ip'] != $prev_session_ip )
			{
				$guests_online++;

#
#-----[ AFTER, ADD ]------------------------------------------
#

				//MOD Show Search Bot
				$tmp_list = explode(".", decode_ip($row['session_ip']));
				if ($tmp_list[0] == "66" && $tmp_list[1] == "249") {
					//Google
					$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span style="color:#' . $theme['body_link'] . '">Google</span>' : '<span style="color:#' . $theme['body_link'] . '">Google</span>';
				}
				if ( ($tmp_list[0] == "207" && $tmp_list[1] == "66" && $tmp_list[2] == "146") ||
				   ($tmp_list[0] == "207" && $tmp_list[1] == "46") ){
					//MSN
					$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span style="color:#' . $theme['body_link'] . '">MSN</span>' : '<span style="color:#' . $theme['body_link'] . '">MSN</span>';
				}
				if ( ($tmp_list[0] == "66" && $tmp_list[1] == "196") ||
				   ($tmp_list[0] == "68" && $tmp_list[1] == "142") ) {
					//Yahoo
					$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span style="color:#' . $theme['body_link'] . '">Yahoo</span>' : '<span style="color:#' . $theme['body_link'] . '">Yahoo</span>';
				}
				if ($tmp_list[0] == "195" && $tmp_list[1] == "101" && $tmp_list[2] == "94") {
					//Voilà
					$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span style="color:#' . $theme['body_link'] . '">Voilà</span>' : '<span style="color:#' . $theme['body_link'] . '">Voilà</span>';
				}
				if ($tmp_list[0] == "65" && $tmp_list[1] == "19" && $tmp_list[2] == "150" && $tmp_list[3] >= 193 && $tmp_list[3] <= 256) {
					//Omni-Explorer
					$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span style="color:#' . $theme['body_link'] . '">Omni-Explorer</span>' : '<span style="color:#' . $theme['body_link'] . '">Omni-Explorer</span>';
				}
				if ($tmp_list[0] == "212" && $tmp_list[1] == "27" && $tmp_list[2] == "41" && $tmp_list[3] >= 20 && $tmp_list[3] <= 50) {
					//Pompos
					$online_userlist .= ( $online_userlist != '' ) ? ', ' . '<span style="color:#' . $theme['body_link'] . '">Pompos</span>' : '<span style="color:#' . $theme['body_link'] . '">Pompos</span>';
				}
				//End Show Search Bot

#
#-----[ OPEN ]------------------------------------------
#

admin/index.php
 
#
#-----[ FIND ]------------------------------------------
#

			$guest_ip = decode_ip($onlinerow_guest[$i]['session_ip']);

#
#-----[ AFTER, ADD ]------------------------------------------
#

			//MOD Show Search Bot
			$name_guest = $lang['Guest'];
			$tmp_list = explode(".", $guest_ip);
			if ($tmp_list[0] == "66" && $tmp_list[1] == "249") {
				//Google
				$name_guest = "Google";
			}
			if ( ($tmp_list[0] == "207" && $tmp_list[1] == "66" && $tmp_list[2] == "146") ||
			   ($tmp_list[0] == "207" && $tmp_list[1] == "46") ){
				//MSN
				$name_guest = "MSN";
			}
			if ( ($tmp_list[0] == "66" && $tmp_list[1] == "196") ||
			   ($tmp_list[0] == "68" && $tmp_list[1] == "142") ) {
				//Yahoo
				$name_guest = "Yahoo";
			}
			if ($tmp_list[0] == "195" && $tmp_list[1] == "101" && $tmp_list[2] == "94") {
				//Voilà
				$name_guest = "Voilà";
			}
			if ($tmp_list[0] == "65" && $tmp_list[1] == "19" && $tmp_list[2] == "150" && $tmp_list[3] >= 193 && $tmp_list[3] <= 256) {
				//Omni-Explorer
				$name_guest = "Omni-Explorer";
			}
			if ($tmp_list[0] == "212" && $tmp_list[1] == "27" && $tmp_list[2] == "41" && $tmp_list[3] >= 20 && $tmp_list[3] <= 50) {
				//Pompos
				$name_guest = "Pompos";
			}
			//End Show Search Bot
			
#
#-----[ FIND ]------------------------------------------
#
			
			"USERNAME" => $lang['Guest'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
		
			"USERNAME" => $name_guest,
	
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
# 
# EoM