Verfasst: 06.06.2003 08:26
ich muss mich mal eben Sihtam anschliessen, gibt es eine zusammenfassung vom wichtigsten ?
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
lso ich hab den hack ein bischen umgeschrieben... jetzt werden auch überhaupt keine sessions mehr für den google bot erstellt:
common.php:
suche:
Code:
?>
davor einfügen:
Code:
define('NO_SID', ( strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') || strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'], 'slurp@inktomi.com;') ) );
includes/sessions.php:
suche:
Code:
function session_pagestart($user_ip, $thispage_id)
{
global $db, $lang, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
$current_time = time();
unset($userdata);
danach einfügen:
Code:
if ( NO_SID )
{
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE user_id = " . ANONYMOUS;
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not get anonymous user data', '', __LINE__, __FILE__, $sql);
}
$userdata = $db->sql_fetchrow($result);
$userdata['session_logged_in'] = false;
$SID = '';
return $userdata;
}
suchen:
Code:
if ( !empty($SID) && !preg_match('#sid=#', $url) )
ersetzen durch:
Code:
if ( !NO_SID && !empty($SID) && !preg_match('#sid=#', $url) )
ah
Code: Alles auswählen
// Header control for bots RKA
$bot_url = strstr($REQUEST_URI ,'viewtopic') || strstr($REQUEST_URI ,'contenttopic');
$follow_url = strstr($REQUEST_URI ,'index.php') || strstr($REQUEST_URI ,'viewforum.php') ||
strstr($REQUEST_URI ,'content.php') || strstr($REQUEST_URI ,'contentforum.php');
//print "URI:" . $REQUEST_URI . ", Is a bot url:" . $bot_url . "Is a follow url:" . $follow_url;
if ($bot_url)
{
$robots_meta = "<meta name=\"robots\" content=\"index,follow\">\n";
}
else if ($follow_url)
{
$robots_meta = "<meta name=\"robots\" content=\"noindex,follow\">\n";
}
else
{
$robots_meta = "<meta name=\"robots\" content=\"noindex,nofollow\">\n";
}
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
$template->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'SITE_DESCRIPTION' => $board_config['site_desc'],
'ROBOTS_META' => $robots_meta,
...
Code: Alles auswählen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="keywords" content="{PAGE_TITLE}">
<meta name="description" content="{SITE_DESCRIPTION}">
{ROBOTS_META} <- Das da ist neu
{META}
{NAV_LINKS}
<title>{SITENAME} - {PAGE_TITLE}</title>
...