Made to Order Software Corporation Logo

MO Glossary: mo_glossary.module File Reference

Definition of the MO Glossary filter. More...

Enumerations

enum  MO_GLOSSARY_VERSION
 

Define the version of the MO Glossary module.

More...

Functions

 mo_glossary_init ()
 Set the CSS file.
 mo_glossary_perm ()
 Set of permissions for the MO Glossary filter.
 mo_glossary_help ($section)
 Implementation of the hook_help() for the MO Glossary filter.
 mo_glossary_filter_tips ($delta, $format, $long=FALSE)
 Implementation of hook_filter_tips() for the MO Glossary filter.
 mo_glossary_taxonomy ($op, $type, $term=NULL)
 Delete taxonomy terms in our glossary table.
 mo_glossary_form_taxonomy_form_vocabulary_alter (&$form, $form_state)
 Form alteration hook for the taxonomy terms window.
 _mo_glossary_taxonomy_form_submit ($form, &$form_state)
 Save the data submited by the vocabulary form.
 mo_glossary_form_taxonomy_form_term_alter (&$form, $form_state)
 Form alteration hook for the taxonomy terms window.
 _mo_glossary_terms_form_submit ($form, &$form_state)
 Callback saving the data of the terms.
 mo_glossary_filter ($op, $delta=0, $format=-1, $text= '')
 Implementation of hook_filter().
 mo_glossary_link ($type, $node=NULL, $teaser=FALSE)
 Implementation of hook_link()

Detailed Description

The MO Glossary filter encapsulates abbreviations (i.e. SQL, HTML, etc.) in an 'abbr' tag including a title taken from the description of a term in a taxonomy. It is also possible to have them in an anchor to send the user to the term.

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

http://www.m2osw.com/mo_glossary 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.


Enumeration Type Documentation

This variable defines the version of the MO Glossary module. This will always be the same as the version defined in Drupal (throught the .info file.)


Function Documentation

_mo_glossary_taxonomy_form_submit ( form,
&$  form_state 
)

Implementation of the submit function for the mo_glossary_form_taxonomy_form_vocabulary_alter() function.

Parameters:
[in]$formThe form being submitted
[in,out]$form_stateThe current state of the form
_mo_glossary_terms_form_submit ( form,
&$  form_state 
)

This function saves the data submitted for the MO Glossary module to our database.

Parameters:
[in]$formThe form being submitted
[in,out]$form_stateThe current state of the form
mo_glossary_filter ( op,
delta = 0,
format = -1,
text = '' 
)

This is the actual filter definition.

Note:
The returned value is as expected by the calling system function.
Parameters:
[in]$opThe filter operation
[in]$deltaThe filter being applied, ignore if $op = "list"
[in]$formatThe format referencing our filter, -1 if undefined
[in]$textThe text to be filtered
Returns:
The returned value depends on the operation.

References _mo_glossary_process(), and _mo_glossary_settings_form().

mo_glossary_filter_tips ( delta,
format,
long = FALSE 
)

Provide the short and long help for the MO Glossary filter.

Parameters:
[in]$deltaThe filter in use.
[in]$formatThe format that defines this filter.
[in]$longWhether to return the short or long tip.
Returns:
NULL or a short or long tip.
mo_glossary_form_taxonomy_form_term_alter ( &$  form,
form_state 
)

Implementation of hook_form_taxonomy_form_term_alter().

This function adds a few entries to the taxonomy term form.

Parameters:
[in,out]$formThe form to alter
[in]$form_statewhat state the form is in (i.e. submitted?)
See also:
_mo_glossary_terms_form()

References _mo_glossary_terms_form().

mo_glossary_form_taxonomy_form_vocabulary_alter ( &$  form,
form_state 
)

Implementation of hook_form_taxonomy_form_vocabulary_alter().

This function adds a few entries to the taxonomy term form.

Parameters:
[in,out]$formThe form to alter
[in]$form_statewhat state the form is in (i.e. submitted?)
See also:
_mo_glossary_terms_form()

References _mo_glossary_taxonomy_form().

mo_glossary_help ( section)

This function returns help information about the MO Glossary filter.

Parameters:
[in]$sectionThe name of the section we return help for.
Returns:
NULL or a help message
mo_glossary_init ( )

This function initializes the CSS file. We have to do it here in case the website uses the cache.

See file mo_glossary.css

mo_glossary_link ( type,
node = NULL,
teaser = FALSE 
)

This function adds a link to the Glossary list of terms. It makes use of Taxonomy VTN. If the Taxonomy VTN module is not installed, the link will not be added.

Parameters:
[in]$typeThe type of link being generated
[in]$nodeThe node receiving the link
[in]$teaserWhether the link is created for the node teaser
Returns:
An array of links to add at the bottom of the page
mo_glossary_perm ( )

This function returns an array of permissions used by the MO Glossary filter.

Returns:
Array of permissions.
mo_glossary_taxonomy ( op,
type,
term = NULL 
)

This function ensures synchrony of deleted glossary terms.

Parameters:
[in]$opThe operation conducted on the taxonomy term.
[in]$typeWhether the term or vocabulary is being deleted.
[in]$termThe term being worked on.
Documentation generated by Doxygen on Sat Mar 24 2012 23:03:00