b2evolution PHP Cross Reference Blogging Systems

Source: /skins/dating_mood/_skin.class.php - 133 lines - 3374 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 dating_mood
  10   *
  11   * @version $Id: _skin.class.php 3328 2013-03-26 11:44:11Z 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 dating_mood_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 'Dating Mood';
  29      }
  30  
  31  
  32    /**
  33       * Get default type for the skin.
  34       */
  35  	function get_default_type()
  36      {
  37          return 'normal';
  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                  'body_bg_color' => array(
  51                      'label' => T_('Background Color'),
  52                      'note' => T_('E-g: #000000 for black'),
  53                      'defaultvalue' => '#000',
  54                      'type' => 'color',
  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          require_css( 'basic_styles.css', 'blog' ); // the REAL basic styles
  92          require_css( 'basic.css', 'blog' ); // Basic styles
  93          require_css( 'blog_base.css', 'blog' ); // Default styles for the blog navigation
  94          require_css( 'item_base.css', 'blog' ); // Default styles for the post CONTENT
  95  
  96          // Make sure standard CSS is called ahead of custom CSS generated below:
  97          require_css( 'style.css', true );
  98  
  99          // Add custom CSS:
 100          $custom_css = '';
 101  
 102          if( $body_bg_color = $this->get_setting( 'body_bg_color') )
 103          {    // Custom Header background color:
 104              $custom_css .= '    body { background-color: '.$body_bg_color." }\n";
 105          }
 106  
 107          if( !empty( $custom_css ) )
 108          {
 109              $custom_css = '<style type="text/css">
 110      <!--
 111  '.$custom_css.'    -->
 112      </style>';
 113              add_headline( $custom_css );
 114          }
 115  
 116          // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images:
 117          if($this->get_setting("colorbox")) 
 118          {
 119              require_js_helper( 'colorbox', 'blog' );
 120          }
 121      }
 122  
 123      /**
 124       * Credits to Dating Mood skin
 125       */
 126  	function display_skin_credits()
 127      {
 128          $skin_links = array( '' => array( 'http://www.datingmood.com/', array( array( 50, 'dating skin'), array( 80, 'Dating Mood'), array( 100, 'dating'), ) ) );
 129          display_param_link( $skin_links );
 130      }
 131  }
 132  
 133  ?>

title

Description

title

Description

title

Description

title

title

Body