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

Procedural File: sitemap-extended.php

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

Page Details

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

<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">   <url>     <loc>http://www.example.com/</loc>     <lastmod>2005-01-01</lastmod> // except for index, Zenpage news index and news categories as they don't have a date attached (optional anyway)     <changefreq>monthly</changefreq>  </url> </urlset>

Renders the sitemap if called via "www.yourdomain.com/zenphoto/sitemap.php". The sitemap is cached as a xml file within the root "cache_html/sitemap" folder.

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 and Blue Dragonfly
Classes
Class Description
sitemap Plugin option handling class
Includes
require_once (dirname(dirname(__FILE__)).'/folder-definitions.php') [line 25]
[ Top ]

require_once (dirname(dirname(__FILE__)).'/admin-globals.php') [line 27]
[ Top ]

require_once (dirname(dirname(__FILE__)).'/admin-functions.php') [line 26]
[ Top ]


Functions
clearSitemapCache  [line 618]

Cleans out the cache folder.


void clearSitemapCache( )

[ Top ]
endSitemapCache  [line 597]

Ends the static RSS caching.


void endSitemapCache( )

[ Top ]
printSitemapAlbumsAndImages  [line 300]

Prints links to all albums incl. pagination and their images

Parameters:
array   $albumsperpage:  In case your theme performes custom option settings that are different from the admin option, use an array to set the number here for albums individudially. Example: $albumsperpage = array('<album1name>' => <desired albums per page>, '<album2name>' => <desired albums per page>);
array   $imagessperpage:  In case your theme performes custom option settings that are different from the admin option, use an array to set the number here for albums individudially. (see example above)
string   $albumchangefreq:  One of the supported changefrequence values regarding sitemap.org. Default is empty or wrong is "daily".
string   $imagechangefreq:  One of the supported changefrequence values regarding sitemap.org. Default is empty or wrong is "daily".
string   $albumlastmod:  "date or "mtime"
string   $imagelastmod:  "date or "mtime"
   $imagesperpage: 


string printSitemapAlbumsAndImages( [array $albumsperpage = ''], [ $imagesperpage = ''], [string $albumchangefreq = ''], [string $imagechangefreq = ''], [string $albumlastmod = ''], [string $imagelastmod = ''], array $imagessperpage  )

[ Top ]
printSitemapIndexLinks  [line 245]

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

Parameters:
int   $albumsperpage:  In case your theme performes custom option settings that are different from the admin option, set the number here.
string   $changefreq:  One of the supported changefrequence values regarding sitemap.org. Default is empty or wrong is "daily".


string printSitemapIndexLinks( [int $albumsperpage = ''], [string $changefreq = '']  )

[ Top ]
printSitemapZenpageNewsArticles  [line 487]

Prints 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 printSitemapZenpageNewsArticles( [string $changefreq = '']  )

[ Top ]
printSitemapZenpageNewsCategories  [line 523]

Prints links to Zenpage news categories incl. pagination

Parameters:
array   $albumsperpage:  In case your theme performes custom option settings that are different from the admin option, use an array to set the number here for categories individudially. Example: $albumsperpage = array('<category1name>' => <desired articles per page>, '<category2name>' => <desired articles per page>);
string   $changefreq:  One of the supported changefrequence values regarding sitemap.org. Default is empty or wrong is "daily".
   $articlesperpage: 


string printSitemapZenpageNewsCategories( [ $articlesperpage = ''], [string $changefreq = ''], array $albumsperpage  )

[ Top ]
printSitemapZenpageNewsIndex  [line 445]

Prints links to the main Zenpage news index incl. pagination

Parameters:
int   $articlesperpage:  In case your theme performes custom option settings that are different from the admin option, set the number here.
string   $changefreq:  One of the supported changefrequence values regarding sitemap.org. Default is empty or wrong is "daily".


string printSitemapZenpageNewsIndex( [int $articlesperpage = ''], [string $changefreq = '']  )

[ Top ]
printSitemapZenpagePages  [line 411]

Prints links to all Zenpage pages

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


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

[ Top ]
sitemap_cache_purgebutton  [line 155]

creates the Utilities button to purge the static sitemap cache

Parameters:
array   $buttons: 


array sitemap_cache_purgebutton( array $buttons  )

[ Top ]
sitemap_echonl  [line 185]

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 193]

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 217]

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_getISO8601Date  [line 648]

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 172]

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


void sitemap_multilingual( )

[ Top ]
startSitemapCache  [line 574]

Starts static sitemap caching


void startSitemapCache( )

[ Top ]


Documentation generated on Mon, 09 Aug 2010 17:24:11 +0200 by phpDocumentor 1.4.1