Cheetah
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ChWsbSiteMaps Class Reference
Inheritance diagram for ChWsbSiteMaps:
ChAdsSiteMaps ChBlogsSiteMapsPosts ChEventsSiteMaps ChFdbSiteMaps ChFilesSiteMapsFiles ChFilesSiteMapsFolders ChForumSiteMaps ChGroupsSiteMaps ChPhotosSiteMapsAlbums ChPhotosSiteMapsPhotos ChPollSiteMaps ChSitesSiteMaps ChSoundsSiteMapsAlbums ChSoundsSiteMapsSounds ChStoreSiteMaps ChVideosSiteMapsAlbums ChVideosSiteMapsVideos ChWsbSiteMapsPages ChWsbSiteMapsProfiles ChWsbSiteMapsProfilesInfo ChWsbSiteMapsSystem ChWsbTextSiteMaps

Public Member Functions

 generate ()
 

Static Public Member Functions

static getObjectInstance ($sObject)
 
static & getSystems ()
 
static generateAllSiteMaps ()
 
static deleteAllSiteMaps ()
 
static getSiteMapIndexUrl ()
 
static getSiteMapIndexPath ()
 

Protected Member Functions

 __construct ($aSystem)
 
 _genXmlUrlsBegin ()
 
 _genXmlUrlsEnd ()
 
 _genXmlUrl ($a)
 
 _genUrl ($a)
 
 _genDate ($a)
 
 _genChangeFreq ($a)
 
 _getCount ()
 
 _getRecords ($iStart)
 
 _getDateTimeStamp ($a)
 

Static Protected Member Functions

static _formatDate ($iTimestamp)
 
static _escape ($s)
 

Protected Attributes

 $_aSystem = array ()
 
 $_oQuery = null
 
 $_aQueryParts
 

Static Protected Attributes

static $BASE_PATH = CH_DIRECTORY_PATH_CACHE_PUBLIC
 
static $BASE_URL = CH_WSB_URL_CACHE_PUBLIC
 
static $BASE_PATH_INDEX = CH_DIRECTORY_PATH_ROOT
 
static $BASE_URL_INDEX = CH_WSB_URL_ROOT
 

Detailed Description

Sitemaps for search engines: http://www.sitemaps.org/protocol.html

To add sitemap to your module you need to add a record to 'sys_objects_site_maps' table and custom class:

id - autoincremented id for internal usage object - your unique module name, with vendor prefix, lowercase and spaces are underscored priority - priority, allowed values from 0.0 to 1.0 changefreq - how frequently contents change, allowed values: always, hourly, daily, weekly, monthly, yearly, never class_name - your custom class name class_file - file where your class_name is stored order - order in which this sitemap is generated active - is object active, allowed values 0 or 1

You can refer to Cheetah modules for sample record in this table.

Definition at line 31 of file ChWsbSiteMaps.php.

Constructor & Destructor Documentation

◆ __construct()

ChWsbSiteMaps::__construct (   $aSystem)
protected

Member Function Documentation

◆ _escape()

static ChWsbSiteMaps::_escape (   $s)
staticprotected

Definition at line 306 of file ChWsbSiteMaps.php.

◆ _formatDate()

static ChWsbSiteMaps::_formatDate (   $iTimestamp)
staticprotected

Definition at line 293 of file ChWsbSiteMaps.php.

◆ _genChangeFreq()

ChWsbSiteMaps::_genChangeFreq (   $a)
protected

Reimplemented in ChEventsSiteMaps.

Definition at line 263 of file ChWsbSiteMaps.php.

◆ _genDate()

ChWsbSiteMaps::_genDate (   $a)
protected

Definition at line 258 of file ChWsbSiteMaps.php.

◆ _genUrl()

ChWsbSiteMaps::_genUrl (   $a)
protected

◆ _genXmlUrl()

ChWsbSiteMaps::_genXmlUrl (   $a)
protected

Definition at line 225 of file ChWsbSiteMaps.php.

◆ _genXmlUrlsBegin()

ChWsbSiteMaps::_genXmlUrlsBegin ( )
protected

Definition at line 213 of file ChWsbSiteMaps.php.

◆ _genXmlUrlsEnd()

ChWsbSiteMaps::_genXmlUrlsEnd ( )
protected

Definition at line 220 of file ChWsbSiteMaps.php.

◆ _getCount()

ChWsbSiteMaps::_getCount ( )
protected

Reimplemented in ChWsbSiteMapsSystem.

Definition at line 283 of file ChWsbSiteMaps.php.

◆ _getDateTimeStamp()

ChWsbSiteMaps::_getDateTimeStamp (   $a)
protected

Definition at line 298 of file ChWsbSiteMaps.php.

◆ _getRecords()

ChWsbSiteMaps::_getRecords (   $iStart)
protected

Reimplemented in ChWsbSiteMapsSystem.

Definition at line 288 of file ChWsbSiteMaps.php.

◆ deleteAllSiteMaps()

static ChWsbSiteMaps::deleteAllSiteMaps ( )
static

delete all sitemaps

Definition at line 136 of file ChWsbSiteMaps.php.

◆ generate()

ChWsbSiteMaps::generate ( )

generate files for current

Definition at line 173 of file ChWsbSiteMaps.php.

◆ generateAllSiteMaps()

static ChWsbSiteMaps::generateAllSiteMaps ( )
static

it is called on cron every day or similar period to generate sitemaps from all modules

Definition at line 97 of file ChWsbSiteMaps.php.

◆ getObjectInstance()

static ChWsbSiteMaps::getObjectInstance (   $sObject)
static

Get sitemap object instance by object name

Parameters
$sObjectobject name
Returns
object instance or false on error

Definition at line 61 of file ChWsbSiteMaps.php.

◆ getSiteMapIndexPath()

static ChWsbSiteMaps::getSiteMapIndexPath ( )
static

get sitemaps index file path

Definition at line 165 of file ChWsbSiteMaps.php.

◆ getSiteMapIndexUrl()

static ChWsbSiteMaps::getSiteMapIndexUrl ( )
static

get sitemaps index file url

Definition at line 157 of file ChWsbSiteMaps.php.

◆ getSystems()

static& ChWsbSiteMaps::getSystems ( )
static

get all systems

Definition at line 88 of file ChWsbSiteMaps.php.

Member Data Documentation

◆ $_aQueryParts

ChWsbSiteMaps::$_aQueryParts
protected
Initial value:
= array (
'fields' => "",
'field_date' => "",
'field_date_type' => "timestamp",
'table' => "",
'join' => "",
'where' => "",
'order' => "",
)

Definition at line 40 of file ChWsbSiteMaps.php.

◆ $_aSystem

ChWsbSiteMaps::$_aSystem = array ()
protected

Definition at line 38 of file ChWsbSiteMaps.php.

◆ $_oQuery

ChWsbSiteMaps::$_oQuery = null
protected

Definition at line 39 of file ChWsbSiteMaps.php.

◆ $BASE_PATH

ChWsbSiteMaps::$BASE_PATH = CH_DIRECTORY_PATH_CACHE_PUBLIC
staticprotected

Definition at line 33 of file ChWsbSiteMaps.php.

◆ $BASE_PATH_INDEX

ChWsbSiteMaps::$BASE_PATH_INDEX = CH_DIRECTORY_PATH_ROOT
staticprotected

Definition at line 35 of file ChWsbSiteMaps.php.

◆ $BASE_URL

ChWsbSiteMaps::$BASE_URL = CH_WSB_URL_CACHE_PUBLIC
staticprotected

Definition at line 34 of file ChWsbSiteMaps.php.

◆ $BASE_URL_INDEX

ChWsbSiteMaps::$BASE_URL_INDEX = CH_WSB_URL_ROOT
staticprotected

Definition at line 36 of file ChWsbSiteMaps.php.


The documentation for this class was generated from the following file: