[ class tree: plugins ] [ index: plugins ] [ all elements ]

Procedural File: sitemap-extended.php

Source Location: /zp-extensions/sitemap-extended.php

Page Details

Generates individually sitemap.org compatible XML files for use with Google and other search engines. It supports albums and images as well as optionally Zenpage pages, news articles and news categories.

Sitemaps need to be generated via the button on the admin overview page and then are cached as static files in the /cache_html/sitemap/ folder. There are individual sitemaps for all of the above item types generated as well as a sitemapindex file. Album sitemaps are splitted into individual sitemaps per album (incl. all albums pages) and image sitemaps into individual sitemaps per album.

The sitemapindex file can be referenced via "www.yourdomain.com/zenphoto/index.php?sitemap" or with modrewrite "www.yourdomain.com/zenphoto/?sitemap".

NOTE: The index links may not match if using the options for "Zenpage news on index" or a "custom home page" that some themes provide! Also it does not "know" about "custom pages" outside Zenpage or any special custom theme setup!

IMPORTANT: A multilingual sitemap requires the seo_locale plugin and mod_rewrite.

Author:  Malte Müller (acrylian) based on the plugin by Jeppe Toustrup (Tenzer) http://github.com/Tenzer/zenphoto-sitemap and on contributions by timo, Blue Dragonfly and Francois Marechal (frankm)
Classes
Class Description
sitemap Plugin option handling class
Constants
SITEMAP_CHUNK  [line 33]

SITEMAP_CHUNK = getOption('sitemap_processing_chunk')

[ Top ]


Functions
clearSitemapCache  [line 823]

Cleans out the cache folder.


void clearSitemapCache( )

[ Top ]
generateSitemapCacheFile  [line 206]

Generates a sitemap file.

Parameters:
string   $filename:  How the file should be named. ".xml" is appended automatically
string   $data:  The actual sitemap data as generated by the appropiate functions


void generateSitemapCacheFile( string $filename, string $data  )

[ Top ]
generateSitemapIndexCacheFile  [line 220]

Generates the sitemap index file that points to the individual sitemaps from the content of the sitemap cache.

It is always named "sitemapindex.xml"


void generateSitemapIndexCacheFile( )

[ Top ]
getSitemapAlbumList  [line 370]

Enter description here ...

Parameters:
object   $obj:  the starting point
array   $albumlist:  the container for the results
string   $gateway:  name of validation function
   &$albumlist: 


void getSitemapAlbumList( object $obj, &$albumlist, string $gateway, array $albumlist  )

[ Top ]
getSitemapAlbums  [line 409]

Places album and all of its album pages on one sitemap

Gets links to all albums incl. pagination and if the Google image video extension is enabled for images using this as well. This is independent from the images fetched by getSitemapImages().

NOTE: Using the Google extension is currently NOT recommended if you have a huge gallery.


string getSitemapAlbums( )

[ Top ]
getSitemapGoogleImageVideoExtras  [line 585]

Helper function to get the image/video extra entries for albums if the Google video extension is enabled

Parameters:
   $page: 
   $loop_index: 
   $albumobj: 
   $images: 


string getSitemapGoogleImageVideoExtras( $page, $loop_index, $albumobj, $images  )

[ Top ]
getSitemapGoogleLoopIndex  [line 566]

Helper function to get the loop index if the Google video extension is enabled

Parameters:
   $imageCount: 
   $pageCount: 


void getSitemapGoogleLoopIndex( $imageCount, $pageCount  )

[ Top ]
getSitemapImages  [line 507]

currently this splitts only sitemaps for albums and its images. Spliting the images itself requires a major rework...

Gets links to all images for all albums (album by album)


string getSitemapImages( )

[ Top ]
getSitemapIndexLinks  [line 315]

TODO index links are not splitted into several sitemaps yet

Gets the links to the index of a Zenphoto gallery incl. index pagination


string getSitemapIndexLinks( )

[ Top ]
getSitemapZenpageNewsArticles  [line 725]

Gets to the Zenpage news articles

Parameters:
string   $changefreq:  One of the supported changefrequence values regarding sitemap.org. Default is empty or wrong is "daily".


string getSitemapZenpageNewsArticles( [string $changefreq = One of the supported changefrequence values regarding sitemap.org. Default is empty or wrong is "daily".]  )

[ Top ]
getSitemapZenpageNewsCategories  [line 765]

Gets links to Zenpage news categories incl. pagination


string getSitemapZenpageNewsCategories( )

[ Top ]
getSitemapZenpageNewsIndex  [line 674]

Gets links to the main Zenpage news index incl. pagination


string getSitemapZenpageNewsIndex( )

[ Top ]
getSitemapZenpagePages  [line 633]

Gets links to all Zenpage pages


string getSitemapZenpagePages( )

[ Top ]
passAlbums  [line 386]

gateway check for albums (no refinement of the criteria)

Parameters:
object   $album: 


void passAlbums( object $album  )

[ Top ]
passImages  [line 394]

gateway function for images (screens out dynamic albums and password protected albums)

Parameters:
object   $album: 


void passImages( object $album  )

[ Top ]
sitemap_button  [line 168]

creates the Utilities button to purge the static sitemap cache

Parameters:
array   $buttons: 


array sitemap_button( array $buttons  )

[ Top ]
sitemap_echonl  [line 195]

Simple helper function which simply outputs a string and ends it of with a new-line.

Parameters:
string   $string:  text string


string sitemap_echonl( string $string  )

[ Top ]
sitemap_getChangefreq  [line 246]

Checks the changefreq value if entered manually and makes sure it is only one of the supported regarding sitemap.org

Parameters:
string   $changefreq:  One of the supported changefrequence values regarding sitemap.org. Default is empty or wrong is "daily".


string sitemap_getChangefreq( [string $changefreq = '']  )

[ Top ]
sitemap_getDateformat  [line 271]

Gets the dateformat for images and albums only.

Parameters:
object   $obj:  image or album object
string   $option:  "date" or "mtime". If "mtime" is discovered to be not set, the date values is taken instead so we don't get 1970-01-10 dates


string sitemap_getDateformat( object $obj, string $option  )

[ Top ]
sitemap_getDBLimit  [line 299]

Gets the limit and offset for the db queries for sitemap splitting.

Parameters:
int   $items_per_sitemap:  Number of items per sitemap


string sitemap_getDBLimit( [int $items_per_sitemap = 2]  )

[ Top ]
sitemap_getISO8601Date  [line 853]

Returns an ISO-8601 compliant date/time string for the given date/time.

While PHP5 can use the date format constant DATE_ISO8601, this function is designed to allow PHP4 use as well. Eventually it can be deprecated, by:

  1. Replacing parameterless references to this function with date(DATE_ISO8601)
  2. Replacing references to this function in sitemap_getDateformat as documented there

Parameters:
   $date: 


void sitemap_getISO8601Date( [ $date = '']  )

[ Top ]
sitemap_multilingual  [line 186]

Returns true if the site is set to "multilingual" and mod_rewrite and and the seo_locale plugin are enabled.


void sitemap_multilingual( )

[ Top ]


Documentation generated on Tue, 20 Dec 2011 16:08:08 +0100 by phpDocumentor 1.4.3