SourceForge.net LogoPHPGallue
[ class tree: gallue ] [ index: gallue ] [ all elements ]

Class: GALSitemap

Source Location: /gallue/libgsitemap.inc.php

Class Overview


Generates a google sitemap.


Author(s):

Variables

Constants

Methods



Class Details



[ Top ]


Class Variables

$glb =

[line 47]

The global gallery object.



Tags:

access:  protected

Type:   GALGallery


[ Top ]

$minAge =

[line 55]

The minimal lastmod date.

This date overrides the <lastmod> tag for older items. It is introduced to make Google re-index the page after code updates which change the URL structure, page content or sitemap.




Tags:

var:  A UNIX timestamp
access:  protected

Type:   int


[ Top ]



Class Methods


constructor __construct [line 76]

GALSitemap __construct( $glb, [int $minAge = 0])

Constructor.

Initializes the $glb and $minAge properties.




Parameters:

GALGallery   $glb  
int   $minAge   UNIX timestamp

[ Top ]

method categoriesMap [line 230]

DOMDocument categoriesMap( $doc, mixed $page)

Sub-sitemap for categories.

The gallery views of categories should not be indexed, because they change too frequently.




Tags:

access:  protected


Parameters:

DOMDocument   $doc   an empty sitemap.

[ Top ]

method helpMap [line 324]

DOMDocument helpMap( $doc, mixed $page)

Sub-sitemap for help entries.

This sitemap suggests Google to index the "details" view.




Tags:

access:  protected


Parameters:

DOMDocument   $doc   an empty sitemap.

[ Top ]

method imagesMap [line 272]

DOMDocument imagesMap( $doc, mixed $page)

Sub-sitemap for images.

This sitemap suggests Google to index the "details" view. The "details"-URLs are change-resistant because the detailsItem GET parameter determines which image is displayed.




Tags:

access:  protected


Parameters:

DOMDocument   $doc   an empty sitemap.

[ Top ]

method masterMap [line 88]

DOMDocument masterMap( )

Returns a master map.

This method returns a master map as DOMDocument. It builds URLs for the gsitemap.php script which accepts "target" and "page" as GET parameters.




[ Top ]

method targetMap [line 144]

DOMDocument targetMap( $target, $page)

Returns a sub-sitemap.

This method returns a sub-sitemapmap as DOMDocument. It builds URLs for the web frontend. If a specialized method $target.'Map'() exists, this method returns it's return value. Otherwise it uses some default code for containers, i.e. groups, films and series. The sitemaps strongly depend on some code in the gallue web frontend which determines which GET parameters return which content. I am not quite sure how Google handles the URLs provided in a sitemap, but I guess that the URLs in the sitemap should match exactly those in the web frontend. Therefor you have to honor the "default value" behavior of GALGlobalVars and the exact order of variables, although the web frontend would also accept another order.




Parameters:

   $target  
   $page  

[ Top ]


Class Constants

CONTAINERS_PER_PAGE =  50

[line 69]

Number of conatiners per sub-sitemap.

A container leads to multiple URLs in one sitemap, especially if it contains many images, so this value is significantly lower.



[ Top ]

URLS_PER_PAGE =  10000

[line 62]

Number of URLs per sub-sitemap.

There's a limit of 1000 sub-sitemaps and 50.000 URLs (or 10 MB) per sub-sitemap set by Google.



[ Top ]



Documentation generated on Wed, 16 Aug 2006 15:36:18 +0200 by phpDocumentor 1.3.0RC6