sharethis
[ class tree: sharethis ] [ index: sharethis ] [ all elements ]

Source for file SharethisSystem.php

Documentation is available at SharethisSystem.php

  1. <?php
  2. /**
  3.  * $Header$
  4.  * @package sharethis
  5.  */
  6.  
  7. /**
  8.  * @package sharethis
  9.  */
  10. class SharethisSystem {
  11.  
  12.     // master list of all possible style kernel configs, this list matches options in admin_sharethis_inc.php
  13.     var $mStyleOptions;
  14.  
  15.     // active styles
  16.     var $mStyles;
  17.  
  18.     function SharethisSystem({
  19.         $this->mStyleOptions = array(
  20.             'button' => array(
  21.                 'sharethis_style_button'
  22.             ),
  23.             'tabs' => array(
  24.                 'sharethis_style_tab_web',
  25.                 'sharethis_style_tab_post',
  26.                 'sharethis_style_tab_email',
  27.             ),
  28.             'colors' => array(
  29.                 'sharethis_style_color_linkfg',
  30.                 'sharethis_style_color_headerbg',
  31.                 'sharethis_style_color_inactivebg',
  32.                 'sharethis_style_color_inactivefg',
  33.             ),
  34.         );
  35.     }
  36.  
  37.     /**
  38.      * assembles a hash of active style settings
  39.      * this provides a simple hash the tpl can easily
  40.      * loop over to assemble the request to the
  41.      * sharethis service
  42.      **/
  43.  
  44.     function getStyles(){
  45.         if!isset$this->mStyles ) ){
  46.             global $gBitSystem;
  47.  
  48.             foreach$this->mStyleOptions as $type => $options ){
  49.                 foreach $options as $val ){
  50.                     if$gBitSystem->getConfig$val && $gBitSystem->getConfig$val != "n" ){
  51.                         $this->mStyles[$type][$val$gBitSystem->getConfig$val );
  52.                     }
  53.                 }
  54.             }
  55.         }
  56.         
  57.         return $this->mStyles;
  58.     }
  59.  
  60.     function isShareable&$pServiceHash ){
  61.         global $gBitSystem;
  62.         if !empty$pServiceHash['content_type_guid') ) {
  63.             return $gBitSystem->isFeatureActive'sharethis_'.$pServiceHash['content_type_guid');
  64.         }
  65.         return false;
  66.     }
  67. }

Documentation generated on Wed, 29 Jul 2015 13:57:27 +0000 by phpDocumentor 1.5.0-lsces