Made to Order Software Corporation Logo

MO Poll: mo_poll.pages.inc File Reference

Module functions of the MO Poll module. More...

Functions

 _mo_poll_block_render ($poll)
 Render the poll we selected.

 _mo_poll_node ()
 The poll when rendering a node.

 _mo_poll_taxonomy ()
 Search poll based on taxonomy.

 _mo_poll_default ($delta)
 Generate the default poll.


Detailed Description

The mo_poll pages generates the actual content with the chosen poll.

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

http://www.m2osw.com/mo_poll 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_poll_block_render ( poll  ) 

This function calls the necessary Drupal core functions to render the specified poll as if it were a node.

Parameters:
[in] $poll The poll to render
Returns:
An array with the block as expected by the hook_block() function

Referenced by _mo_poll_default(), _mo_poll_node(), and _mo_poll_taxonomy().

_mo_poll_default ( delta  ) 

This function generates the default poll in case no related poll was chosen.

This can be a random poll, nothing, the default recent poll.

Parameters:
[in] $delta The poll to be presented, should always be 0.
Returns:
A block or NULL

References _mo_poll_block_render().

Referenced by mo_poll_block().

_mo_poll_node (  ) 

This function searches for the newest poll node with terms that are defined in the node being displayed. If such a node exists, then it is returned as a rendered block. Otherwise NULL is returned.

Returns:
NULL or the block array

References _mo_poll_block_render().

Referenced by mo_poll_block().

_mo_poll_taxonomy (  ) 

This function checks which taxonomy page is being looked at.

Returns:
NULL or the block array

References _mo_poll_block_render().

Referenced by mo_poll_block().

Documentation generated by Doxygen on Sat Mar 12 16:05:35 2011