Moderátor: Moderátori


##############################################################
## MOD Title: Simple Show bots
## MOD Author: dcz / the phpBB SEO Team <n/a> http://www.phpbb-seo.com/
## MOD Description: Adds the bots browsing the forum in the index viewonline, one entry per bot.
##
## MOD Version: 0.0.2
##
## Installation Level: (EASY)
## Installation Time: 5 Minutes
## Files To Edit: (5)
## includes/page_header.php
## includes/functions.php
## language/lang_english/lang_main.php
## templates/subSilver/index_body.tpl
##
## Included Files: (0)
##
##############################################################
## Author Notes:
## _____________
##
## This mod will add the bots name currently browsing the forum pages in the who is online block on forum index.
## Each bots uses a special color.
##
## Example :
## In total there is 25 user online :: 8 Registered, 2 Hidden, 11 Guests and 4 Bots
## ^^^^^^^^^
## Bots : Google , Yahoo! (2), MSN
##
## As you can see, if a bot is crawling your forum with several IPs, it won't be listed several times.
## The number of occurrences will be added after the bot's name, if applicable.
##
## Bot detection is performed using IP ranges for a lot faster and handier use.
## For example Google can be detected with this range : 66.249.xx.xx
## Ip range test means a lot less tests and a lot less IP updates.
## Some will argue there could be false positive, as even if the whole ip Range is owned by Google,
## not all IPs are used to crawl.
## Our answer is this is a cosmetic mod, not a bot tracking mod, would you prefer to perform hundreds of IP
## tests within this range and Check UAs to make sure you're being crawled on each page load ?
## Would this be worth it for the few times you could get false positives ?
##
## Of course it could occur that a search engine starts using new IP ranges. And thus an IP range list update
## on this mod, but, this is rather a rare occurrence.
##
## The default Ip range list will allow for Google, Yahoo! and MSN bot recognition.
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## MOD History:
##
## 2007-01-19 - 0.0.2
## - First Release
##
## 2006-12-23 - 0.0.1
## - Internal beta version.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
______________________________
NOTE : VERSION UPDATE CHECKING
______________________________
if you are using XS mod ( http://www.phpbbstyles.com/viewtopic.php?t=356 ), by the way you should,
Upload :
contrib/xs_simple_show_bots.cfg
in your forum's admin/ folder, XS mod version checking will be extended to this mod.
________________
FRENCH INSTALL :
________________
The French install file is located in the translations/fr/ folder of this release.
The French lang code changes are the following :
OPEN :
______
language/lang_french/lang_main.php
FIND :
______
$lang['Hidden_users_zero_total'] = '0 Invisible et ';
$lang['Hidden_user_total'] = '%d Invisible et ';
$lang['Hidden_users_total'] = '%d Invisibles et ';
$lang['Guest_users_zero_total'] = '0 Invité';
$lang['Guest_users_total'] = '%d Invités';
$lang['Guest_user_total'] = '%d Invité';
REPLACE WITH :
______________
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$lang['Hidden_users_zero_total'] = '0 Invisible, ';
$lang['Hidden_user_total'] = '%d Invisible, ';
$lang['Hidden_users_total'] = '%d Invisibles, ';
$lang['Guest_users_zero_total'] = '0 Invité et ';
$lang['Guest_users_total'] = '%d Invités et ';
$lang['Guest_user_total'] = '%d Invité et ';
$lang['Bot_online'] = 'Bots : ';
$lang['Bot_nul'] = '0 Bots';
$lang['Bot_total'] = '%d Bots';
$lang['Bot_one'] = '%d Bot';
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ OPEN ]----------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]----------------------------------------------
#
define('HEADER_INC', TRUE);
#
#-----[ AFTER, ADD ]----------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN - BOTS
$bots_online = array();
$online_botlist = '';
$bot_count = 0;
$bot_style = array( 'Google' => 'style="color:#2159D6;font-weight:bold"', 'MSN' => 'style="color:#52BA18;font-weight:bold"', 'Yahoo!' => 'style="color:#FF0031;font-weight:bold"' );
$bot_to_style = array( 'Google', 'Yahoo!', 'Yahoo!' , 'Yahoo!', 'MSN', 'MSN', 'MSN', 'MSN');
$bot_ips = array( '66.249', '74.6', '66.196', '66.142', '64.4', '65.5', '131.107', '207.46' );
// www.phpBB-SEO.com SEO TOOLKIT END - BOTS
#
#-----[ FIND ]----------------------------------------------
#
}
else
{
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;
#
#-----[ AFTER, ADD ]----------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$bot_id = is_bot(decode_ip($row['session_ip']));
if ( $bot_id >=0 ) {
$guests_online--;
$bot_count++;
if ( !array_key_exists($bot_to_style[$bot_id], $bots_online) ) {
$bots_online[$bot_to_style[$bot_id]] = 1;
} else {
$bots_online[$bot_to_style[$bot_id]] ++;
}
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ FIND ]----------------------------------------------
#
if ( empty($online_userlist) )
{
$online_userlist = $lang['None'];
}
#
#-----[ BEFORE, ADD ]----------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( !empty($bots_online) ) {
foreach ( $bots_online as $bot => $bot_num) {
$bot_cnt = ( $bot_num > 1) ? "($bot_num)" : '';
$online_botlist .= (($online_botlist!='') ? ', ' : '') . "<span ".$bot_style[$bot].">$bot $bot_cnt</span>";
}
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ FIND ]----------------------------------------------
#
$total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online;
#
#-----[ AFTER, ADD ]----------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$total_online_users += $bot_count;
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ FIND ]----------------------------------------------
#
else
{
$l_g_user_s = $lang['Guest_users_total'];
}
#
#-----[ AFTER, ADD ]----------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( $bot_count == 0 ) {
$l_bot = $lang['Bot_nul'];
} else if ( $bot_count == 1 ) {
$l_bot = $lang['Bot_one'];
} else {
$l_bot = $lang['Bot_total'];
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ FIND ]----------------------------------------------
#
$l_online_users .= sprintf($l_g_user_s, $guests_online);
#
#-----[ AFTER, ADD ]----------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$l_online_users .= sprintf($l_bot, $bot_count);
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ FIND ]----------------------------------------------
#
'LOGGED_IN_USER_LIST' => $online_userlist,
#
#-----[ AFTER, ADD ]----------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
'BOT_LIST' => $lang['Bot_online'] . ( ($online_botlist != '') ? $online_botlist : $lang['None']),
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ OPEN ]----------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]----------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]----------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
/**
* tell if user is a bot on ip match
*/
function is_bot($user_ip) {
global $bot_ips;
if ( !empty($bot_ips) ) {
foreach ( $bot_ips as $bot_id => $bot_ip) {
if ( strpos(trim($user_ip), $bot_ip) === 0) {
return $bot_id;
}
}
}
return -1;
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ OPEN ]----------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]----------------------------------------------
#
$lang['Hidden_users_zero_total'] = '0 Hidden and ';
$lang['Hidden_user_total'] = '%d Hidden and ';
$lang['Hidden_users_total'] = '%d Hidden and ';
$lang['Guest_users_zero_total'] = '0 Guests';
$lang['Guest_users_total'] = '%d Guests';
$lang['Guest_user_total'] = '%d Guest';
#
#-----[ REPLACE WITH ]----------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$lang['Hidden_users_zero_total'] = '0 Hidden, ';
$lang['Hidden_user_total'] = '%d Hidden, ';
$lang['Hidden_users_total'] = '%d Hidden, ';
$lang['Guest_users_zero_total'] = '0 Guests and ';
$lang['Guest_users_total'] = '%d Guests and ';
$lang['Guest_user_total'] = '%d Guest and ';
$lang['Bot_online'] = 'Online Bots : ';
$lang['Bot_nul'] = '0 Bots';
$lang['Bot_total'] = '%d Bots';
$lang['Bot_one'] = '%d Bot';
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ OPEN ]----------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]----------------------------------------------
#
{LOGGED_IN_USER_LIST}
#
#-----[ IN-LINE FIND ]----------------------------------------------
#
{LOGGED_IN_USER_LIST}
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------------------
#
<br />{BOT_LIST}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

phpbb3 podpora
phpbb3 podpora
podla toho ake pouzivas na fore!unskillednoobz píše:a este otazocka... ktore kodovanie odporucas?



phpbb3 podpora
phpbb3 podpora
Užívatelia prezerajúci fórum: Žiadny registrovaný užívateľ nie je prítomný a 0 hostia