Made to Order Software Corporation Logo

MO Tag: mo_tag.install File Reference

mo_tag.install File Reference

Install the mo_tag module. More...

Functions

 mo_tag_schema ()
 Defines the MO Tag database tables.

 _mo_tag_taxonomy ()
 Add a taxonomy for MO Tag.

 mo_tag_install ()
 Mark the term HTML edit area to pure text.

 mo_tag_uninstall ()
 Implementation of hook_uninstall().


Detailed Description

Implementation of the MO Tag module installation.

Copyright (c) 2009-2011 Made to Order Software Corp.

http://www.m2osw.com/mo_tag contact@m2osw.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Function Documentation

_mo_tag_taxonomy (  ) 

This function adds the taxonomy named mo_tag.

Note that we do not offer any specific node type. This vocabulary is actually expected to be used for the tags, not for nodes.

Referenced by mo_tag_install().

mo_tag_install (  ) 

This function is called on installation to mark the text area used to setup the tag value to text only instead of being WYSIWYG.

This is particularly important for tags such as those used to add an AdSense or Amazon HTML snippet since we do not want those to be interpreted whenever the editor runs.

Todo:
Avoiding the FCKeditor feature does not work yet. We'd need to drill down inside the FCK editor to see how we can cancel its usage in the terms. Each term having a specific number, it is not viable to do that here. However, note that we currently have a strip_tag() which should work in many cases (although we want to have a flag, I think, to decide whether or not one can bypass that strip_tag() call.)

Implementation of hook_install(). This function installs the MO Tag module.

This includes adding a table of tag name & value pairs and tweaking the FCK editor setup (when already installed) so that the edit area of our settings does not get WYSIWYG capabilities.

References _mo_tag_taxonomy().

mo_tag_schema (  ) 

Implementation of hook_schema().

This function declares:

  • A table to extend the taxonomy terms
Returns:
An array of database table schemas.
mo_tag_uninstall (  ) 

This function removes the different variables and the table that we saved in the database.

Documentation generated by Doxygen on Sat Mar 12 16:25:23 2011