GoogleTagged

Started by karlbenson, August 07, 2007, 11:13:39 PM

Previous topic - Next topic

karlbenson

[N3rve] has now taken over active development of this mod.
I am therefore locking this topic. The new version of the mod can be found
http://custom.simplemachines.org/mods/index.php?mod=1245



GoogleTagged v1.2
By Karl Benson



Introduction
Every time a visitor is brought to a topic by a major search engine (Google/Yahoo/MSN/Ask/AOL/AllTheWeb), this modification grabs the search terms that were used and stores them.

Eg A visitor may have just searched for 'harry potter'.  If the visitor then clicked on a link to a topic on your forum, that url is often passed to the forum. eg http://www.google.co.uk/search?hl=en&q=harry+potter
The script then grabs 'harry potter' and stores them as tags.

A random selection of each topics tags are shown at the bottom each topic. The more visitors who are brought to the topic by the same search terms, the more hits each tag gets, the larger it appears.  Tags which the match those of the visiting users search are also shown in a different color.

This mod will ONLY function properly if your forum
- is public (eg Most/all of your topics/posts must be viewable to guests so they can be spidered)
- does NOT have a robots.txt which disallows all spiders (as spiders would not be able to spider your site)
- That your forum is relatively well spidered already

The http_referer header isn't always sent by the browser.
Not all servers accept http referrer. It doesn't require register_globals to be on.

Features
Includes two admin settings
o Enable/Disable GoogleTagged Mod
o Setting multiple searchterms are stored to individually or together (not recommended)
Admin Tag Management featuring..
o (Un)Ban tags
o Reset Tags (Sets hits for each tag at Zero)
o Optimize Tags (Removes tags for deleted topics and general optimization)
Filtering Of Keywords
o Words must be between 3 and 20 characters in length.  Bad characters are stripped allowing only [-a-Z0-9].
o Automatic removal of lots of Common/Bad Terms ('the','them','d**k' etc)
Per-Topic Tag Cloud
o Show random 20 tags of each topic
Random 50 Tags
Show All Topics Related To A Tag (Paginated), sorted by 'hits'.

Installation
Installs automatically on Default only.
Manual edits will be required for other themes.

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
0.5 ALPHA - 31st July 2007
o Brainwave
o Began work
0.9 BETA - 1st/2nd August 2007
o Packaged it up
o Wrote out the manual edits
o Documentation/this readme
o Improved 'character filtering'
o Added admin extra functions
- reset tags > resets all hits for tags to 0
- optimize tags > checks the tag for each tag, if topic is deleted, topics for it are deleted
1.0 BETA - 2nd August 2007
o First Public Beta
1.1 - 7th October 2007
o Fixed utf-8 bug (Thanks GazOutEast)
1.2 - 29th October 2007
o Fixed missing permissions language strings bug (Thanks GazOutEast)

ArkServer

doesn't work for me on both forums i own.
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$'

Chantal Matar

I got the same thing when I clicked to enter a topic:


Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /home/*******/public_html/ps3smalltalk/Sources/Display.php on line 115

Why do you think it's not working?  I am using the default theme on 1.1.3.

Tounsilyon

Hy guy,
I am trying to install it
I have fixed the problem,
In the file Dysplay.php, you have to remove the chracter &

// RE-CASE EACH SEARCH TERM AND REMOVE IGNORE WORDS
         foreach($search_terms as $key => &$term) {

After that I that it should be ok!
But I have not finished installing it,
I will keep you informed if I succeed.
I am working on 1.1.RC3

Tounsilyon

Yes I have finished, it works well
thanks for this mod.
But what's exactly main goal oh this mod ? is it to increase the search engines visibility ?

karlbenson

that & is meant to be there.  It maybe that it won't work on all php versions.  I'll have to re-write some of the code.

well its to automatically tag topics by what tags search engines have found it useful.

I'm unsure as to whether there is much benefit in the search engines.

karlbenson

I've now uploaded a new version which changes how that bit works so it should work for many other php versions.


karlbenson

Thanks Valodim,

I'd already found out that usign the & sign is for php5 only.

Valodim

can't wait til php5 is standard enough to be used in code like this... :)

Tounsilyon

I have a question,
this mod will help to improve the google visibility for the tagged words or not ?

karlbenson

I'm not completely certain.

But there maybe LIMITED SEO (Search Engine Optimization) benefit to having these tags.
They mostly are for users, rather than spiders.

For this mod to work, you need to be spidered ALOT already by search engines and are receiving traffic from search engines.  So for newish boards, it is a pointless mod.
But for large/veteran boards, there should be some benefit.

It is very early in the development of this mod, so in future we may discover how useful this mod is or not.

Mick.

OK.   It seems to be working fine on DilberMC theme.  I have 'bout 7 keywords stored in "Google tagged" so far.

At the bottom of the topic shows "google tagged" and the keywords.............where do i go to change where it says: "google tagged" so it displays "keywords" instead?


I think im using this mod for keywords in topics instead of what is intended to do ;D

karlbenson

modifications.english.php

alter $txt['googletagged']

(although I'm not sure whether that string was re-used in the admin area, so you may end up with 'keywords' in there aswell)

Mick.

Quote from: karlbenson on August 11, 2007, 04:48:45 PM
modifications.english.php

alter $txt['googletagged']

(although I'm not sure whether that string was re-used in the admin area, so you may end up with 'keywords' in there aswell)

cool.  i'll give it a shot!

3nd3r

Is there a way to aply this mod to other theme than default one?

karlbenson


3nd3r

Sure...  :-X O:) I need more sleep time...  ;)

ArkServer

is it possible to change the limit of 50 random tags? I changed the:



      $query = db_query("
            SELECT g.tag, g.ID_TAG, g.hits, g.status, g.ID_TOPIC, t.ID_TOPIC
            FROM {$db_prefix}googletagged as g, {$db_prefix}topics as t
            WHERE g.ID_TOPIC = t.ID_TOPIC
               AND g.status != 0
            GROUP BY g.tag
            ORDER BY RAND()
            LIMIT 100
      ", __FILE__, __LINE__);

but it doesn't work for some reason..

vehla_jatt_4_u

hey i have successfull installed this mode on smf 1.1.3,google tagged option is not visible,in user area,i m using a diff theme not default,which edits i need.plz help me

Advertisement: