rdfs:comment
| - You should read the user documentation first, make sure you understand the difference between a group and a tag. UserTags modules are straightforward to create, modules are objects that implement the following interface: UserTagsJS.extensions.MyModule = { start: function(config, username, logger, lang) { // Start up code // Return Values: // [Array of group strings] // A jQuery promise // An object literal: { tags: {}, groups: [], promise: $.Deferred().promise(), ajax: [{}] } // undefined/null/false/0/ }, generate: function(json1, json2, json3, ...) { // AJAX completion callback // Return Values: // [Groups Array] // Object literal: { tags: {}, groups: [] } // undefined/null/false/0/ },f generateFailed: function() { // AJAX failure callback // Return values are the same as generate() }, d
|
abstract
| - You should read the user documentation first, make sure you understand the difference between a group and a tag. UserTags modules are straightforward to create, modules are objects that implement the following interface: UserTagsJS.extensions.MyModule = { start: function(config, username, logger, lang) { // Start up code // Return Values: // [Array of group strings] // A jQuery promise // An object literal: { tags: {}, groups: [], promise: $.Deferred().promise(), ajax: [{}] } // undefined/null/false/0/ }, generate: function(json1, json2, json3, ...) { // AJAX completion callback // Return Values: // [Groups Array] // Object literal: { tags: {}, groups: [] } // undefined/null/false/0/ },f generateFailed: function() { // AJAX failure callback // Return values are the same as generate() }, derive: function(groups) { // Derivation function, you receive a HASH containing all generated // groups. You can examine the hash to create derivative groups. // Return values: // [Array of new groups] // undefined/null/false/0/ }, filter: function(groups) { // Filtering function for removing groups // Return values: // [groups to remove array] // undefined/null/false/0/ } }; All functions are optional, although you do need to use start() in order for generate() and generateFailed() to be called. Modules that have just start(), filter(), or derive() are fine. Modules are installed by adding them to the extensions field of the configuration block. The UserTagsJS configuration block actually has more fields than are mentioned in the user documentation since they aren't relevant there:
|