Public Member Functions | |
__construct () | |
setProductId ($sProductId) | |
setLanguageId ($iLangId) | |
setExtendedMode ($blExtended) | |
getLanguageId () | |
getProductId () | |
isExtended () | |
getCloudArray ($sProductId=null, $blExtended=null, $iLang=null) | |
getTagLink ($sTag) | |
getTagTitle ($sTag) | |
getTagSize ($sTag) | |
getTags ($sArtId=null, $blExtended=false, $iLang=null) | |
_fixTagLength ($sTag) | |
stripMetaChars ($sText) | |
prepareTags ($sTags) | |
trimTags ($sTags) | |
resetTagCache ($iLang=null) | |
canBeTagged ($sTagTitle) | |
Protected Member Functions | |
_getMaxHit () | |
_sortTags ($aTags, $iLang=null) | |
_getFontSize ($iHit, $iMaxHit) | |
_getCacheKey ($blExtended, $iLang=null) | |
Protected Attributes | |
$_sCacheKey = "tagcloud_" | |
$_blExtended = false | |
$_sProductId = null | |
$_iLangId = null | |
$_iMaxHit = null | |
$_aCloudArray = null | |
$_sSeparator = ' ' | |
$_aMetaChars = array('+','-','>','<','(',')','~','*','"','\'','\\') |
Class dedicateg to tag cloud handling
Definition at line 17 of file oxtagcloud.php.
oxTagCloud.__construct | ( | ) |
Object constructor. Initializes separator.
Reimplemented from oxSuperCfg.
Definition at line 81 of file oxtagcloud.php.
oxTagCloud._fixTagLength | ( | $ | sTag | ) |
Takes tag string and makes shorter tags longer by adding underscore.
string | $sTag given tag |
Definition at line 381 of file oxtagcloud.php.
oxTagCloud._getCacheKey | ( | $ | blExtended, | |
$ | iLang = null | |||
) | [protected] |
Returns tag cache key name.
bool | $blExtended Whether to display full list | |
int | $iLang preferred language [optional] |
Definition at line 496 of file oxtagcloud.php.
oxTagCloud._getFontSize | ( | $ | iHit, | |
$ | iMaxHit | |||
) | [protected] |
Returns font size value for current occurence depending on max occurence.
int | $iHit hit count | |
int | $iMaxHit max hits count |
Definition at line 354 of file oxtagcloud.php.
oxTagCloud._getMaxHit | ( | ) | [protected] |
oxTagCloud._sortTags | ( | $ | aTags, | |
$ | iLang = null | |||
) | [protected] |
Sorts passed tag array. Using MySQL for sorting (to keep user defined ordering way).
array | $aTags tags to sort | |
int | $iLang preferred language [optional] |
Definition at line 316 of file oxtagcloud.php.
oxTagCloud.canBeTagged | ( | $ | sTagTitle | ) |
Checks if tags was already tagged for the same product
string | $sTagTitle given tag |
Definition at line 508 of file oxtagcloud.php.
oxTagCloud.getCloudArray | ( | $ | sProductId = null , |
|
$ | blExtended = null , |
|||
$ | iLang = null | |||
) |
Returns extended tag cloud array
string | $sProductId product id [optional] | |
bool | $blExtended extended clour array mode [optional] | |
int | $iLang language id [optional] |
Definition at line 166 of file oxtagcloud.php.
oxTagCloud.getLanguageId | ( | ) |
oxTagCloud.getProductId | ( | ) |
Returns current tag cloud product id (if available)
Definition at line 142 of file oxtagcloud.php.
oxTagCloud.getTagLink | ( | $ | sTag | ) |
Returns tag url (seo or dynamic depends on shop mode)
string | $sTag tag title |
Definition at line 203 of file oxtagcloud.php.
oxTagCloud.getTags | ( | $ | sArtId = null , |
|
$ | blExtended = false , |
|||
$ | iLang = null | |||
) |
Returns tag array
string | $sArtId article id | |
bool | $blExtended if can extend tags | |
int | $iLang preferred language [optional] |
Definition at line 266 of file oxtagcloud.php.
oxTagCloud.getTagSize | ( | $ | sTag | ) |
Returns tag size
string | $sTag tag title |
Definition at line 247 of file oxtagcloud.php.
oxTagCloud.getTagTitle | ( | $ | sTag | ) |
Returns html safe tag title
string | $sTag tag title |
Definition at line 222 of file oxtagcloud.php.
oxTagCloud.isExtended | ( | ) |
oxTagCloud.prepareTags | ( | $ | sTags | ) |
Takes tags string, checks each tag length and makes shorter tags longer if needed. This is needed for FULLTEXT index
string | $sTags given tag |
Definition at line 422 of file oxtagcloud.php.
oxTagCloud.resetTagCache | ( | $ | iLang = null |
) |
Resets tag cache
int | $iLang preferred language [optional] |
Definition at line 477 of file oxtagcloud.php.
oxTagCloud.setExtendedMode | ( | $ | blExtended | ) |
Tag cloud mode setter (extended or not)
bool | $blExtended if true - extended cloud array will be returned |
Definition at line 119 of file oxtagcloud.php.
oxTagCloud.setLanguageId | ( | $ | iLangId | ) |
Tag cloud language id setter
int | $iLangId language id |
Definition at line 107 of file oxtagcloud.php.
oxTagCloud.setProductId | ( | $ | sProductId | ) |
Tag cloud product id setter
string | $sProductId product id |
Definition at line 95 of file oxtagcloud.php.
oxTagCloud.stripMetaChars | ( | $ | sText | ) |
Strips any mysql FULLTEXT specific meta characters.
string | $sText given text |
Definition at line 401 of file oxtagcloud.php.
oxTagCloud.trimTags | ( | $ | sTags | ) |
Trims underscores and spaces from tags.
string | $sTags given tag |
Definition at line 450 of file oxtagcloud.php.
oxTagCloud.$_aCloudArray = null [protected] |
Definition at line 59 of file oxtagcloud.php.
oxTagCloud.$_aMetaChars = array('+','-','>','<','(',')','~','*','"','\'','\\') [protected] |
Definition at line 75 of file oxtagcloud.php.
oxTagCloud.$_blExtended = false [protected] |
Definition at line 31 of file oxtagcloud.php.
oxTagCloud.$_iLangId = null [protected] |
Definition at line 45 of file oxtagcloud.php.
oxTagCloud.$_iMaxHit = null [protected] |
Definition at line 52 of file oxtagcloud.php.
oxTagCloud.$_sCacheKey = "tagcloud_" [protected] |
Definition at line 24 of file oxtagcloud.php.
oxTagCloud.$_sProductId = null [protected] |
Definition at line 38 of file oxtagcloud.php.
oxTagCloud.$_sSeparator = ' ' [protected] |
Definition at line 67 of file oxtagcloud.php.