b2evolution PHP Cross Reference Blogging Systems

Source: /inc/items/model/_itemsettings.class.php - 93 lines - 2885 bytes - Summary - Text - Print

Description: This file implements the  ItemSettings class which handles item_ID/name/value triplets for collections/items. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file implements the  ItemSettings class which handles
   4   * item_ID/name/value triplets for collections/items.
   5   *
   6   * This file is part of the evoCore framework - {@link http://evocore.net/}
   7   * See also {@link http://sourceforge.net/projects/evocms/}.
   8   *
   9   * @copyright (c)2003-2014 by Francois PLANQUE - {@link http://fplanque.net/}
  10   *
  11   * {@internal License choice
  12   * - If you have received this file as part of a package, please find the license.txt file in
  13   *   the same folder or the closest folder above for complete license terms.
  14   * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  15   *   then you must choose one of the following licenses before using the file:
  16   *   - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  17   *   - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  18   * }}
  19   *
  20   * {@internal Open Source relicensing agreement:
  21   * }}
  22   *
  23   * @package evocore
  24   *
  25   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  26   * @author efy-asimo: Attila Simo
  27   *
  28   * @version $Id: _itemsettings.class.php 6136 2014-03-08 07:59:48Z manuel $
  29   */
  30  
  31  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  32  
  33  load_class( 'settings/model/_abstractsettings.class.php', 'AbstractSettings' );
  34  
  35  /**
  36   * Class to handle the settings for collections/items
  37   *
  38   * @package evocore
  39   */
  40  class ItemSettings extends AbstractSettings
  41  {
  42      /**
  43       * The default settings to use, when a setting is not defined in the database.
  44       *
  45       * @access protected
  46       */
  47      var $_defaults = array(
  48          'editor_code'           => NULL, // Plugin code of the editor which was last used to edit this post
  49          'hide_teaser'           => '0',  // Setting to show/hide teaser when displaying -- more --
  50          'post_custom_headers'   => NULL, // Meta keywords for this post
  51          'post_metadesc'         => NULL, // Meta Description tag for this post
  52          'post_expiry_delay'     => NULL, // Post comments are not displayed and post ratings are not counted after they are older then this expiry delay value. If this value is null then comments will never expire.
  53  
  54          // Location & google map settings:
  55          'latitude' => NULL,
  56          'longitude' => NULL,
  57          'map_zoom' => NULL,
  58          'map_type' => NULL,
  59  
  60          // Add new default here.
  61          );
  62  
  63  
  64      /**
  65       * Constructor
  66       */
  67  	function ItemSettings()
  68      {
  69          parent::AbstractSettings( 'T_items__item_settings', array( 'iset_item_ID', 'iset_name' ), 'iset_value', 1 );
  70      }
  71  
  72  
  73      /**
  74       * Loads the settings. Not meant to be called directly, but gets called
  75       * when needed.
  76       *
  77       * @access protected
  78       * @param string First column key
  79       * @param string Second column key
  80       * @return boolean
  81       */
  82  	function _load( $item_ID, $arg )
  83      {
  84          if( empty( $item_ID ) )
  85          {
  86              return false;
  87          }
  88  
  89          return parent::_load( $item_ID, $arg );
  90      }
  91  }
  92  
  93  ?>

title

Description

title

Description

title

Description

title

title

Body