Made to Order Software Corporation Logo

MO Paragraph Trimmer Filter: mo_trimmer_filter.module File Reference

mo_trimmer_filter.module File Reference

Main functions of the MO Paragraph trimmer filter. More...

Enumerations

enum  MO_TRIMMER_FILTER_VERSION
 

Define the version of the MO Trimmer Filter module.

More...

Functions

 mo_trimmer_filter_help ($section)
 Implementation of hook_help().

 mo_trimmer_filter_filter_tips ($delta, $format, $long=FALSE)
 Implementation of hook_filter_tips().

 mo_trimmer_filter_filter ($op, $delta=0, $format=-1, $text= '')
 Implementation of hook_filter().


Detailed Description

Implementation of the main functions of the MO Paragraph trimmer filter.

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

http://www.m2osw.com/mo_trimmer_filter 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 Trimmer Filter module. This will always be the same as the version defined in Drupal (throught the .info file.)


Function Documentation

mo_trimmer_filter_filter ( op,
delta = 0,
format = -1,
text = '' 
)

This function defines the filter.

We ignore the prepare operation (passthrough). The result of this filter can be cached.

Parameters:
[in] $op The operation to run
[in] $delta The filter to be applied
[in] $format The format where the filter is defined
[in] $text The text being filtered
Returns:
Mixed. The result depends on the $op parameter. If $op is 'list', return the name of the filter. If $op is 'description', return a description of the filter. If $op is 'prepare', return the $text as is. If $op is 'process', return the processed $text.

References _mo_trimmer_filter_process(), and _mo_trimmer_filter_settings().

mo_trimmer_filter_filter_tips ( delta,
format,
long = FALSE 
)

Returns quick tips about the trimmer filter. This help is shown when the filter can be chosen (short) and when the user selects a format (long).

Todo:
Display the current selection so we know whether all, start, end or middle are being removed.
Parameters:
[in] $delta Defines the filter in action
[in] $format Defines the format in action (i.e. Full Html, etc.)
[in] $long Defines whether short or long helps are to be returned
Returns:
The help string.
mo_trimmer_filter_help ( section  ) 

Gives brief help information about the MO Paragraph trimmer filter.

Parameters:
[in] $section Which help needs to be displayed
Returns:
Help string.
Documentation generated by Doxygen on Sat Mar 12 16:05:45 2011