Loading...
 
 Note
This page is to document "what Tiki should do". For feature documentation (what Tiki does), please see corresponding page on doc site

Object Attributes and Relations

This feature was started in Tiki5 and will be more & more used in Tiki6

Attributes should be used to create cross-feature functionality.

Attributes

To implement transversal features such as geolocalization of objects in tiki, Object Attributes were introduced. Not unlike user preferences, they are key-value pairs stored in the database and are associated to the type and itemId (same as object permissions).

To avoid the inconsistencies seen in the preference naming conventions, the attribute library enforces a few conventions.

  1. Attribute names may only contain lowercase letters and dots.
  2. Two levels of scoping are required. First level for bundled attributes must be tiki. Custom extensions can use an other prefix. Second level must be some sort of package name. The rest is up to the implementor.


Valid attributes would be tiki.geo.lat or tiki.geo.lon

Library code is located in lib/attributes/attributelib.php. The library allows to:

  • Get all attributes for an object as a map using get_attributes().
  • Set a single attribute on an object using set_attribute().


Because all values are fetched at once, the length of the content must remain small. The limit of the size of attribute and relation names is 25 characters.

Current attribute usage in the tiki.* namespace


Please document namespace use here as you start using new attributes in Tiki features

AttributeUsage
tiki.article.*Custom attribute fields for articlesNot appropriate! Attributes should be applicable to all object types
tiki.comment.rangesRange information for annotatorjs for inline comments (since 17)
tiki.content.urlFile gallery files location of remote content
tiki.content.expiresFile gallery files expiration of remote content
tiki.content.lastcheckFile gallery files last check time of remote content
tiki.content.sourceSame as tiki.content.url if not a "reference"?
tiki.content.etag File gallery files etag of remote content
tiki.geo.latLatitude coordinate of the object
tiki.geo.lonLongitude coordinate of the object
tiki.geo.google.zoomZoom level of an object used in Google Maps
tiki.icon.srcIcon url for object such as trackeritems
tiki.object.lockUsername of who locked the object (since 15)
tiki.object.imageUsed in forums?
tiki.object.layoutPage layout to be used (used in wiki pages)
tiki.proposal.accept Proposal plugin +1 vote
tiki.proposal.undecided Proposal plugin 0 vote
tiki.proposal.reject Proposal plugin -1 vote
*.rating.overrideRatings?
tiki.relation.targetLabel to be used when referring to the target of a relation
tiki.relation.sourceLabel to be used when referring to the source of a relation
tiki.sync.providerRemote tracker sync providor
tiki.sync.sourceRemote tracker sync source
tiki.sync.lastRemote tracker sync last sync time
tiki.tracker.pretty.views Invalid and probably unused (from r34097)
tiki.wiki.autotocOverride the global pref for autotoc per wiki page
tiki.wiki.page_hide_titleOverride the global pref for show title per wiki page
tiki.wiki.namespaceNamespace of a wiki page

Relations

The Object Relations allow to qualify a relationship between any two objects in the system or with external resources (URLs). Just like attributes, the qualified name of the relationship must be scoped.

Relations are managed with lib/attributes/relationlib.php.

Because all values are fetched at once, the length of the content must remain small. The limit of the size of attribute and relation names is 25 characters.

Current relation usage in the tiki.* namespace

Please document any relations used in Tiki features here

Relation Usage
tiki.article.attribute Relationship between an article type and its related custom attribute fields
tiki.article.attach Used in the Articles tracker field to attach articles to a tracker item
tiki.file.attach Attaches File Gallery files to objects (tracker items so far?)
tiki.friend.follow used by the friends feature to indicate a friendship/following relationship
tiki.friend.request used by the friends feature to indicate a request to be friends
tiki.general.related Any generic relationship not specific to any feature/module
tiki.link.$type Links wiki pages ($types are probably semantic etc)
tiki.mustread.complete Used by the Must Reads feature to indicate that a Must Read is complete
tiki.mustread.required Used by the Must Reads feature to indicate that a Must Read is required by a user
tiki.mustread.comment Used by the Must Reads feature to indicate that a Must Read is requires a comment by a user
tiki.mustread.respond_privately Used by the Must Reads feature to indicate that a Must Read needs a private reply by a user
tiki.mustread.circulation Used by the Must Reads feature to indicate that a Must Read requires a user to circulate it
tiki.social.like used by PluginLike for liking of objects
tiki.source.creator used by PluginInsert to keep track of which page created the Tracker Item via this plugin
tiki.sheet.$type Relates sheets and trackers
tiki.user.favorite Links users to favourite objects (wiki pages only so far?)
tiki.user.banned To ban users from objedcts (groups initially for 8.x could be extended)
tiki.wiki.linkeditem used by the Wiki tracker field type to link a wiki page with a tracker
tiki.wiki.linkedfield used by the Wiki tracker field type to link a wiki page with a tracker


A smarty tag like this will show a link to the object that is at the target end of the relation. The text of the link will be the "tiki.relation.target" attribute set for that relation (i.e. the attribute for an object of type 'relation' and relationId, if any. If there is no such attribute set for that relation, then it will show the usual link as per the normal behavior of the object_link tag.

Copy to clipboard
{object_link type=relation_target id=x}



alias

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Kanban
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Federated Timesheets
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools