b2evolution PHP Cross Reference Blogging Systems

Source: /skins/touch/_skin.class.php - 118 lines - 3239 bytes - Summary - Text - Print

Description: This file implements a class derived of the generic Skin class in order to provide custom code for the skin in this folder. This file is part of the b2evolution project - {@link http://b2evolution.net/}

   1  <?php
   2  /**

   3   * This file implements a class derived of the generic Skin class in order to provide custom code for

   4   * the skin in this folder.

   5   *

   6   * This file is part of the b2evolution project - {@link http://b2evolution.net/}

   7   *

   8   * @package skins

   9   * @subpackage touch

  10   *

  11   * @version $Id: _skin.class.php 992 2012-03-06 07:25:35Z yura $

  12   */
  13  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  14  
  15  /**

  16   * Specific code for this skin.

  17   *

  18   * ATTENTION: if you make a new skin you have to change the class name below accordingly

  19   */
  20  class touch_Skin extends Skin
  21  {
  22    /**

  23       * Get default name for the skin.

  24       * Note: the admin can customize it.

  25       */
  26  	function get_default_name()
  27      {
  28          return 'Touch';
  29      }
  30  
  31  
  32    /**

  33       * Get default type for the skin.

  34       */
  35  	function get_default_type()
  36      {
  37          return 'mobile';
  38      }
  39  
  40  
  41      /**

  42       * Get definitions for editable params

  43       *

  44       * @see Plugin::GetDefaultSettings()

  45       * @param local params like 'for_editing' => true

  46       */
  47  	function get_param_definitions( $params )
  48      {
  49          $r = array_merge( array(
  50                  'display_post_date' => array(
  51                      'label' => T_('Post date'),
  52                      'note' => T_('Display the date of each post'),
  53                      'defaultvalue' => 1,
  54                      'type' => 'checkbox',
  55                  ),
  56                  'colorbox' => array(
  57                      'label' => T_('Colorbox Image Zoom'),
  58                      'note' => T_('Check to enable javascript zooming on images (using the colorbox script)'),
  59                      'defaultvalue' => 1,
  60                      'type' => 'checkbox',
  61                  ),
  62                  'gender_colored' => array(
  63                      'label' => T_('Display gender'),
  64                      'note' => T_('Use colored usernames to differentiate men & women.'),
  65                      'defaultvalue' => 0,
  66                      'type' => 'checkbox',
  67                  ),
  68                  'bubbletip' => array(
  69                      'label' => T_('Username bubble tips'),
  70                      'note' => T_('Check to enable bubble tips on usernames'),
  71                      'defaultvalue' => 0,
  72                      'type' => 'checkbox',
  73                  ),
  74              ), parent::get_param_definitions( $params )    );
  75  
  76          return $r;
  77      }
  78  
  79  
  80      /**

  81       * Get ready for displaying the skin.

  82       *

  83       * This may register some CSS or JS...

  84       */
  85  	function display_init()
  86      {
  87          // call parent:

  88          parent::display_init();
  89  
  90          // Add CSS:

  91          // fp> Note: having those here should allow

  92          // 1) Requesting them earlier as if they are @import'ed

  93          // 2) Allow bundling

  94          // fp> I am not 100% sure though. Comments welcome :)

  95          /*require_css( 'basic_styles.css', 'blog' ); // the REAL basic styles

  96          require_css( 'basic.css', 'blog' ); // Basic styles

  97          require_css( 'blog_base.css', 'blog' ); // Default styles for the blog navigation

  98          require_css( 'item_base.css', 'blog' ); // Default styles for the post CONTENT

  99          require_css( 'item.css', 'relative' );

 100          require_css( 'style.css', 'relative' );*/
 101  
 102          // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images:

 103          if( $this->get_setting( 'colorbox' ) )
 104          {
 105              require_js_helper( 'colorbox', 'blog' );
 106          }
 107  
 108          require_css( 'basic_styles.css', 'blog' ); // the REAL basic styles

 109          require_css( 'basic.css', 'blog' ); // Basic styles

 110          require_css( 'style.css', 'relative' );
 111  
 112          require_js( 'js/core.js', 'relative' );
 113          require_js( 'navigation.js', 'blog' );
 114      }
 115  
 116  }
 117  
 118  ?>

title

Description

title

Description

title

Description

title

title

Body