News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Programatic test for SE?

Started by Deprecated, August 11, 2008, 03:40:49 PM

Previous topic - Next topic

Deprecated

In index.php when showing topic, is there any way I can test for Google or other search engines.

When Google is viewing a topic I want to have an alternate behavior. It would be okay for Yahoo, MSN, etc. to get the same alternate behavior.

I'm not sure if there is a way to tell between a guest and Google, but somewhere there is because SEs show up in my users online and are recognized for who they are. I hope that is available in some context.

karlbenson

It is very possible.

What are you wanting to do with it though?
(the reason i ask, is because several ways in which the information can be used, are against google and other search engines terms of service,)
eg for example, showing content to google and other robots, while showing normal guests a registration page, WOULD be against their tos.

Deprecated

I'm writing a program to log which pages are indexed by who. I want to ignore regular guests.


Looks like $user_info['possibly_robot'] is probably the thing to check.

karlbenson

yeah, although $user_info['possibly_robot'] is limited to google/yahoo on 1.1.x
In 2.x it also ties into the search engines section (detecting any you add).

Also for 1.1.x if your using the googlebot and spiders mod that function can tell better.

Deprecated

Well it's a big nevermind anyway. I was looking at the code and discovered a new feature. Search engine tracking. I should have RTFM. :)

Anyway I don't have to write any code now. :D


I keep discovering features that had disappointed me that SMF didn't have them, and then one day I discover it's just that the feature is turned off, that's why I couldn't see it or use it.

karlbenson

Yeah lol.

You might also want to look into my More Spiders mod for that.
http://custom.simplemachines.org/mods/index.php?mod=1157

Detects a load more ;)

Deprecated

Hey, that's a kewl mod! I like the idea that it just dumps it's list into the db and doesn't actually change any code. Whoever wrote that must be a pretty kewl guy! ;)

ccbtimewiz

Quote from: karlbenson on August 11, 2008, 04:48:19 PM
Yeah lol.

You might also want to look into my More Spiders mod for that.
http://custom.simplemachines.org/mods/index.php?mod=1157

Detects a load more ;)

Quote from: Deprecated on August 11, 2008, 04:51:13 PM
Hey, that's a kewl mod! I like the idea that it just dumps it's list into the db and doesn't actually change any code. Whoever wrote that must be a pretty kewl guy! ;)

He's the one who wrote it. :P

Deprecated

I know that dammit CCB. Can't you pick up on a subtle joke? :)

And like the winkie? ;)

ccbtimewiz

Quote from: Deprecated on August 11, 2008, 06:09:38 PM
I know that dammit CCB. Can't you pick up on a subtle joke? :)

I hate internet sarcasm. :P

Deprecated


Advertisement: