Inheritance diagram for BaseTags:

A class that simplifies the management, adding/editing of tags, and other things dealing with tagging of items.
Definition at line 8 of file base-tags.inc.php.
Public Member Functions | |
| __construct ($id, $tagTable, $joinerTable) | |
| our constructor | |
| getPagesXml () | |
| get our xml... | |
| initViewPage () | |
| this is our view page... | |
| drawViewPage () | |
| here we draw it. | |
| drawRelatedTags () | |
| draws the tags related to a tag | |
| initMainPage () | |
| our main page is a cloud of all the cool tags we have. | |
| drawMainPage () | |
| this draws a paragraph of the popular tags. | |
| addTag ($tag) | |
| this function adds the tag to the database. | |
| deleteTag ($tag) | |
| this function deletes a tag from the database | |
| findTag ($tag) | |
| here we are looking to see if a tag exists. | |
| getTags () | |
| this function gets a list of tags that a our object is associated with | |
| delete () | |
| getPrettyTags () | |
| gets an array of tags for our object, except formated for humans | |
| getObjectsSql ($tagId) | |
| this function gets the ids of all the objects with a certain tag. | |
| getPopularTags ($count=30) | |
| this function gets a list of popular tags for use in a tag cloud or whatnot. | |
| getPopularTagsList ($count=60) | |
| this gets a list of all the popular tags. | |
| getWeightedPopularTagsList ($count=100) | |
| this gets a weighted list of all the popular tags. | |
| updateTagsForm ($form) | |
| update our object's tags from a form object | |
| updateTags ($data) | |
| update our object's tags in the database. | |
| addTagLink ($tag) | |
| this function links a tag to our object. | |
| removeTagLink ($tag) | |
| this function removes a tag from our object. | |
| removeTagLinkDb ($tagId) | |
| removes the link between our tag and the object in the db | |
| getRelatedTags ($tag) | |
| this function gets tags that are related to a tag. | |
| getLinkedTags ($tags) | |
| this function links up our tags to their view pages. | |
| getTagList ($tags=null) | |
| this function gets a list of our object's tags. | |
| getRelatedTagsList ($tag) | |
| this function gets a list of related tags. | |
| addTagField ($form) | |
| this function adds our tag field to our form. | |
| addPopularTagField ($form) | |
| this function adds our popular tags field to our object. | |
| addTagFields ($form) | |
| this function adds both the tag area and the popular tags field to our form. | |
| getCreateTableSql () | |
| gets the table creation sql for the tags | |
| getTagFieldsArray () | |
| get an array of fields in the table that stores the tags. | |
| getTagIndexesArray () | |
| get an array of indexes on fields in the tag table | |
| getJoinerFieldsArray () | |
| get an array of fields in the table that joins tags to objects | |
| getJoinerIndexesArray () | |
| get an array of indexes on fields in the table that joins tags to objects | |
Static Public Member Functions | |
| cleanTag ($tag) | |
| this function cleans a tag for insertion into a database. | |
| prettyTag ($tag) | |
| this function takes a database tag and makes it pretty. | |
Public Attributes | |
| $plural | |
| plural form of the word of what the tags are... | |
| $objectId = 0 | |
| the id of the object we're associating with. | |
Static Public Attributes | |
| $cachePopularTags = true | |
| do we cache our array of popular tags? | |
| $popularTagsCacheLife = 3600 | |
| how long do we cache our popular tags for? | |
| $cacheRelatedTags = true | |
| do we cache our array of related tags? | |
| $relatedTagsCacheLife = 3600 | |
| how long do we cache our related tags for? | |
| $weightStyles | |
| our styles for the weighted tags page | |
Protected Member Functions | |
| insertTag ($tag) | |
| this function inserts the tag into the database. | |
| getTagsWhere () | |
| this gets sql code to get tags from the db for a certain object. | |
| getTagFieldParams () | |
| this function gets the parameters for our tag entry field. | |
| getPopularFieldParams () | |
| this function gets the parameters for our popular tag field. | |
| addTagLinkDb ($tagId) | |
| add a link in the db between our object and this tag | |
| getFormPopularCloud () | |
| this function is for our tag form. | |
Protected Attributes | |
| $tagTable | |
| protected this is the table where we store our tags. | |
| $joinerTable | |
| protected this is the table we use to store relations between tags and objects. | |
|
||||||||||||||||
|
our constructor
Definition at line 68 of file base-tags.inc.php. |
|
|
this function adds our popular tags field to our object.
Definition at line 785 of file base-tags.inc.php. References BaseModule::needsJs(). Referenced by addTagFields(). |
|
|
this function adds the tag to the database. if it exists, then the id is returned.
Definition at line 188 of file base-tags.inc.php. References findTag(), and insertTag(). Referenced by addTagLink(). |
|
|
this function adds our tag field to our form.
Definition at line 775 of file base-tags.inc.php. Referenced by addTagFields(). |
|
|
this function adds both the tag area and the popular tags field to our form.
Definition at line 797 of file base-tags.inc.php. References addPopularTagField(), and addTagField(). |
|
|
this function links a tag to our object. it will also create the tag.
Definition at line 570 of file base-tags.inc.php. References addTag(), and addTagLinkDb(). Referenced by updateTags(). |
|
|
add a link in the db between our object and this tag
Definition at line 591 of file base-tags.inc.php. References dbExecute(). Referenced by addTagLink(). |
|
|
this function cleans a tag for insertion into a database. spaces and whitespace will be replaced with underscores, and any non-alphanumeric characters will be removed.
Definition at line 154 of file base-tags.inc.php. |
|
|
Definition at line 310 of file base-tags.inc.php. References dbExecute(). |
|
|
this function deletes a tag from the database
Definition at line 232 of file base-tags.inc.php. References dbExecute(). |
|
|
this draws a paragraph of the popular tags.
Reimplemented from BaseModule. Definition at line 140 of file base-tags.inc.php. References getWeightedPopularTagsList(). |
|
|
draws the tags related to a tag
Definition at line 121 of file base-tags.inc.php. References getRelatedTagsList(). Referenced by drawViewPage(). |
|
|
here we draw it. provided by default is the list of related tags. Definition at line 113 of file base-tags.inc.php. References drawRelatedTags(). |
|
|
here we are looking to see if a tag exists.
Definition at line 254 of file base-tags.inc.php. References dbFetchAssoc(), dbGetNumRows(), and dbQuery(). Referenced by addTag(), getRelatedTags(), initViewPage(), and removeTagLink(). |
|
|
gets the table creation sql for the tags
Reimplemented from BaseModule. Definition at line 808 of file base-tags.inc.php. |
|
|
this function is for our tag form. it shows popular tags that are clickable and when clicked will add them to the form.
Definition at line 748 of file base-tags.inc.php. References getPopularTags(), and getTags(). |
|
|
get an array of fields in the table that joins tags to objects
Definition at line 856 of file base-tags.inc.php. |
|
|
get an array of indexes on fields in the table that joins tags to objects
Definition at line 871 of file base-tags.inc.php. |
|
|
this function links up our tags to their view pages.
Definition at line 692 of file base-tags.inc.php. References BaseModule::getLink(). Referenced by getPopularTagsList(), getRelatedTagsList(), getTagList(), and getWeightedPopularTagsList(). |
|
|
this function gets the ids of all the objects with a certain tag.
Definition at line 349 of file base-tags.inc.php. Referenced by getRelatedTags(). |
|
|
get our xml... see BaseModule::getPagesXml() for more info.
Reimplemented from BaseModule. Definition at line 83 of file base-tags.inc.php. |
|
|
this function gets the parameters for our popular tag field. it is a labelfield that has our popular tags as javascript that adds them to the tag field.
Definition at line 501 of file base-tags.inc.php. |
|
|
this function gets a list of popular tags for use in a tag cloud or whatnot.
Definition at line 367 of file base-tags.inc.php. References dbFetchAssoc(), dbQuery(), CacheBot::get(), and CacheBot::set(). Referenced by getFormPopularCloud(), getPopularTagsList(), and getWeightedPopularTagsList(). |
|
|
this gets a list of all the popular tags.
Definition at line 412 of file base-tags.inc.php. References getLinkedTags(), and getPopularTags(). |
|
|
gets an array of tags for our object, except formated for humans
Definition at line 332 of file base-tags.inc.php. References getTags(). |
|
|
this function gets tags that are related to a tag. that is, other tags that objects with this tag are related to.
Definition at line 638 of file base-tags.inc.php. References dbFetchAssoc(), dbQuery(), findTag(), CacheBot::get(), getObjectsSql(), and CacheBot::set(). Referenced by getRelatedTagsList(). |
|
|
this function gets a list of related tags. see getRelatedTags() for more info.
Definition at line 732 of file base-tags.inc.php. References getLinkedTags(), and getRelatedTags(). Referenced by drawRelatedTags(). |
|
|
this function gets the parameters for our tag entry field.
Definition at line 482 of file base-tags.inc.php. |
|
|
get an array of fields in the table that stores the tags.
Definition at line 826 of file base-tags.inc.php. |
|
|
get an array of indexes on fields in the tag table
Definition at line 841 of file base-tags.inc.php. |
|
|
this function gets a list of our object's tags.
Definition at line 712 of file base-tags.inc.php. References getLinkedTags(), and getTags(). |
|
|
this function gets a list of tags that a our object is associated with
Definition at line 282 of file base-tags.inc.php. References dbFetchAssoc(), dbQuery(), and getTagsWhere(). Referenced by getFormPopularCloud(), getPrettyTags(), getTagList(), and updateTags(). |
|
|
this gets sql code to get tags from the db for a certain object.
Definition at line 322 of file base-tags.inc.php. Referenced by getTags(). |
|
|
this gets a weighted list of all the popular tags.
Definition at line 430 of file base-tags.inc.php. References getLinkedTags(), and getPopularTags(). Referenced by drawMainPage(). |
|
|
our main page is a cloud of all the cool tags we have.
Reimplemented from BaseModule. Definition at line 130 of file base-tags.inc.php. |
|
|
this is our view page... view info on a tag. Definition at line 97 of file base-tags.inc.php. References findTag(), and BaseModule::params(). |
|
|
this function inserts the tag into the database. it does the actual insertion.
Definition at line 210 of file base-tags.inc.php. References dbExecute(). Referenced by addTag(). |
|
|
this function takes a database tag and makes it pretty. aka replaces underscores with spaces
Definition at line 175 of file base-tags.inc.php. |
|
|
this function removes a tag from our object.
Definition at line 606 of file base-tags.inc.php. References findTag(), and removeTagLinkDb(). Referenced by updateTags(). |
|
|
removes the link between our tag and the object in the db
Definition at line 621 of file base-tags.inc.php. References dbExecute(). Referenced by removeTagLink(). |
|
|
update our object's tags in the database.
Definition at line 529 of file base-tags.inc.php. References addTagLink(), getTags(), and removeTagLink(). Referenced by updateTagsForm(). |
|
|
update our object's tags from a form object
Definition at line 514 of file base-tags.inc.php. References updateTags(). |
|
|
do we cache our array of popular tags?
Definition at line 33 of file base-tags.inc.php. |
|
|
do we cache our array of related tags?
Definition at line 43 of file base-tags.inc.php. |
|
|
protected this is the table we use to store relations between tags and objects.
Definition at line 18 of file base-tags.inc.php. |
|
|
the id of the object we're associating with.
Definition at line 28 of file base-tags.inc.php. |
|
|
plural form of the word of what the tags are...
Definition at line 23 of file base-tags.inc.php. |
|
|
how long do we cache our popular tags for?
Definition at line 38 of file base-tags.inc.php. |
|
|
how long do we cache our related tags for?
Definition at line 48 of file base-tags.inc.php. |
|
|
protected this is the table where we store our tags.
Definition at line 13 of file base-tags.inc.php. |
|
|
Initial value: array(
'font-size: 35px;',
'font-size: 25px;',
'font-size: 20px;',
'font-side: 16px;',
'font-size: 11px;'
)
Definition at line 53 of file base-tags.inc.php. |
1.3.9.1