Start page

Mykola Zharkikh (Kyiv)

Personal site

?

Static smeretags

Static smeretags not depend on the context node – they always return a value for the site configuration.

GetDomainURL

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: returns the domain name in the context of invocation. Value end with slash (/).

Example call: <Smereka Func="GetDomainURL" />

Example result: http://example.com/

GetFavicon

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: for a given node generates HTML code for the icon value set for subdomains, to which the node belongs (if exists and contains icon definition) or domain (if it contains icon definition). If the icon is not specified neither in the subdomain nor in domain – returns empty string.

Example call: <Smereka Func="GetFavicon" />

Example result:

<link rel="shortcut icon" media="all"
href="http://example.com/favicom.ico"
type="image/x-icon" />
<link rel="icon" media="all"
href="http://example.com/favicom.ico"
type="image/x-icon" />

GetHomeURL

Module: smeretags/substfields.php (available by default)

Options: LangAware, Subdomain.

Purpose: Returns the URL of the root page in the invocation context. Value end with. If the DEFAULT_SUBDOMAIN (Eg www) site constant is defined, then the resulting address will always contain this subdomain. If the parameter Subdomain explicitly defined, the resulting address will contain it. If given the option LangAware resulting address will contain the current language suffix (the language, which is calculated in the invocation context). If the current language matches the default language, this suffix is not included.

Example call: <Smereka Func="GetHomeURL" />

Example result: http://www.example.com/

Example call: <Smereka Func="GetHomeURL" Subdomain="lib" LangAware="1" />

Example result: http://lib.example.com/uk/

GetLang

Module: smeretags/substfields.php (available by default)

Options: No.

Purpose: Returns the current language (the language of invocation context).

Example call: <Smereka Func="GetLang" />

Example result: uk

GetMainURL

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: returns URL of the «personal» directory of the Smereka site (directory, that contain static files for this site). Value end with slash (/).

Example call: <Smereka Func="GetMainURL" />

Example result: http://example.com/files/Exmpl/

GetSmerekaVersion

Module: smeretags/substfields.php (available by default)

Options: no.

Purpose: returns the current Smereka version.

Example call: <Smereka Func="GetSmerekaVersion" />

Example result: Smereka 1.7 beta

GetSubdomName

Module: smeretags/substfields.php (available by default)

Options: No.

Purpose: Returns the current subdomain.

Example call: <Smereka Func="GetSubdomName" />

Example result: www