[INFO] How gogle PHPBB!

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
Zeena
Registered User
Posts: 13
Joined: Wed Nov 24, 2004 9:12 pm
Location: Norway
Contact:

Post by Zeena »

I have the same code as Quarterbore.

Running 2.0.11.

How will the MOD be for us...
Best regards...
User avatar
globetrotting
Registered User
Posts: 198
Joined: Thu Jan 15, 2004 8:14 pm
Location: globetrotting
Contact:

phpBB seo - session remover et al.

Post by globetrotting »

After spending nearly 2 days going through all the google-related threads here an in other fora, I still have no working code for the newer phpBB versions.
Maybe somebody could be so kind and post an updated version that complies with phpBB 2.0.11 ?
Last edited by globetrotting on Fri Dec 10, 2004 10:45 pm, edited 1 time in total.
Das Sein ändert das Bewußtsein
Cronikeys
Registered User
Posts: 6
Joined: Tue Sep 14, 2004 11:18 pm

Post by Cronikeys »

Which mod? The session remover or the url shortener?

I have 2.0.11 and the url shortener works GREAT :)

http://forums.ifobos.com/ for a demo of it ;) notice it works on a subdomain as well

if this is the mod you want I will show you all the edited files :)
Zeena
Registered User
Posts: 13
Joined: Wed Nov 24, 2004 9:12 pm
Location: Norway
Contact:

Post by Zeena »

Sure - go ahead... :D

I think there will be more people who need something that works...
Best regards...
User avatar
globetrotting
Registered User
Posts: 198
Joined: Thu Jan 15, 2004 8:14 pm
Location: globetrotting
Contact:

Post by globetrotting »

Cronikeys wrote: Which mod? The session remover or the url shortener?


I mean the mod this whole thread started with and all codes that deal with seo, especially the SID- remover, which still allows guests to answer to existing posts.

BTW, your forum seems to carry the SID in the url.
Das Sein ändert das Bewußtsein
cerebri
Registered User
Posts: 75
Joined: Thu Sep 23, 2004 4:27 pm

Post by cerebri »

Hello

In phpBB v2.0.11 [in sessions.php]
it does not say

=============
global $SID;

if ( !empty($SID) && !eregi('sid=', $url) )
=============

As in the KB-text
http://www.phpbb.com/kb/article.php?article_id=29

insted it says

=============
global $SID;

if ( !empty($SID) && !preg_match('#sid=#', $url) )
=============

What changes do have to do to the google-fix-code?

Thanks!

EDIT: It was a lot more changes in the org. phpbb v2.0.11 code...would be nice if someone could help :)
Jeroen_
Registered User
Posts: 7
Joined: Thu Dec 09, 2004 4:15 pm

Post by Jeroen_ »

I'd like to know that too. :)
StalkR
Registered User
Posts: 17
Joined: Tue Jan 08, 2002 9:58 pm
Location: France
Contact:

Post by StalkR »

Code: Select all

############################################################## 
## MOD Title: enhance-google-indexing 
## MOD Author: Showscout & R. U. Serious 
## MOD Description: If the User_agent includes the string 'Googlebot', then no session_ids are appended to links, which will (hopefully) allow google to index more than just your index-site. 
## MOD Version: 0.9.2 
## 
## Installation Level: easy 
## Installation Time: 2 Minutes 
## Files To Edit: includes/sessions.php 
## Included Files: n/a 
############################################################## 
## Author Notes: There may be issues with register globals on newer 
##       PHP version. If you know for sure and also how to fix it post in 
##       this thread: http://www.phpbb.com/phpBB/viewtopic.php?t=32328 
## 
##       Obviously, if someone thinks it's funny to surf around with a 
##       user_agent containing Googlebot and at the same time does not 
##       allow cookies, he will loose his session/login on every pageview. 
##       Should he complain to you, tell him to eat your shorts. 
## 
##       If you want to add further crawlers look at the appropiate line and 
##       feel free to add part of the user_agent which should be _unique_ 
##       unique to that, so a user is never confused with a bot. 
##
##       
## 
############################################################## 
## Version History: 0.9.0 initial release, only googlebot 
##                         0.9.1 added inktomi (MSN-search/crawler-bot) 
##                         0.9.2 fixed replace for phpBB v2.0.11 (by StalkR)
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#-----[ OPEN  ]------------------------------------------ 
includes/sessions.php 

#-----[ FIND ]------------------------------------------ 
   global $SID; 

   if ( !empty($SID) && !preg_match('#sid=#', $url) )

#-----[ REPLACE WITH ]------------------------------------------ 
   global $SID, $HTTP_SERVER_VARS; 

   if ( !empty($SID) && !preg_match('#sid=#', $url) && !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot') && !strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'slurp@inktomi.com;')) 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
here is the new code for phpBB v2.0.11, it works on my forum :)
the thing to do was to replace

Code: Select all

!eregi('sid=', $url)
with the new string in includes/sessions.php of the phpBB version 2.0.11

Code: Select all

!preg_match('#sid=#', $url) )

Hope this can help you guys ;)
... and it was not very difficult to find :roll:
cerebri
Registered User
Posts: 75
Joined: Thu Sep 23, 2004 4:27 pm

Post by cerebri »

Are you sure that this was the only thing you changed?

in the
## MOD Title: GoogleSingleSession (Add-On to enhance-google-indexing )
there are some changes in the orgiinal phpbb files :\
StalkR
Registered User
Posts: 17
Joined: Tue Jan 08, 2002 9:58 pm
Location: France
Contact:

Post by StalkR »

Thuis change was only for MOD enhance-google-indexing

I didn't installed the GoogleSingleSession Add-On, I think it's not necessary, if googlebot is browsing the forum simultaneously with 5 sessions, then I'll see 5 guests, no prob :)
Jeroen_
Registered User
Posts: 7
Joined: Thu Dec 09, 2004 4:15 pm

Post by Jeroen_ »

Thanks for the code StalkR. :D
cerebri
Registered User
Posts: 75
Joined: Thu Sep 23, 2004 4:27 pm

Post by cerebri »

StalkR wrote: Thuis change was only for MOD enhance-google-indexing

I didn't installed the GoogleSingleSession Add-On, I think it's not necessary, if googlebot is browsing the forum simultaneously with 5 sessions, then I'll see 5 guests, no prob :)



But if google use a LOT more sessions? :)
StalkR
Registered User
Posts: 17
Joined: Tue Jan 08, 2002 9:58 pm
Location: France
Contact:

Post by StalkR »

then good luck with the PHP :D

I'll try to make a new version of the MOD "enhance-google-indexing" for all known indexing robots (I'll take the awstats robots list for base), stay tuned :)
http://stalkr.net & #StalkR on irc.stalkr.net
Zeena
Registered User
Posts: 13
Joined: Wed Nov 24, 2004 9:12 pm
Location: Norway
Contact:

Post by Zeena »

@ StalkR:

GREAT :D
Best regards...
cerebri
Registered User
Posts: 75
Joined: Thu Sep 23, 2004 4:27 pm

Post by cerebri »

StalkR wrote: then good luck with the PHP :D

I'll try to make a new version of the MOD "enhance-google-indexing" for all known indexing robots (I'll take the awstats robots list for base), stay tuned :)


That would be grrrrrreat :D
Locked

Return to “[2.0.x] MODs in Development”