Ignore:
Timestamp:
Sep 4, 2012, 3:15:26 PM (12 years ago)
Author:
grum
Message:

version 3.5.4 - fix minor bug & add new functions to framework

Location:
extensions/GrumPluginClasses/classes
Files:
28 added
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/GrumPluginClasses/classes/GPCCore.class.inc.php

    r17562 r17735  
    33/* -----------------------------------------------------------------------------
    44  class name     : GPCCore
    5   class version  : 1.4.2
    6   plugin version : 3.5.3
     5  class version  : 1.4.3
     6  plugin version : 3.5.4
    77  date           : 2012-07-27
    88  ------------------------------------------------------------------------------
     
    7474|         |            |
    7575| 1.4.2   | 2012/07/27 | * AddHeaderContent can manage 'raw' content
     76|         |            |
     77| 1.4.3   | 2012/08/29 | * Add js objects: inputTreeList + inputExportBox + download
     78|         |            |
     79|         |            | * Update js objects: inputText (bug fix)
     80|         |            |
     81|         |            | * Add urlBuild function
    7682|         |            |
    7783|         |            |
     
    102108    - static function setTemplateToken
    103109    - static function addHeaderContent
     110    - static function urlBuild
    104111   ---------------------------------------------------------------------- */
    105112
     
    144151        Array('name' => "GPCAjax", 'version' => "3.1.0"),
    145152        Array('name' => "GPCCategorySelector", 'version' => "1.0.1"),
    146         Array('name' => "GPCCore", 'version' => "1.4.2"),
     153        Array('name' => "GPCCompress", 'version' => "1.4.0"),
     154        Array('name' => "GPCCore", 'version' => "1.4.3"),
    147155        //Array('name' => "GPCCss", 'version' => "3.1.0"),  removed with v1.4.1
     156        Array('name' => "GPCExport", 'version' => "1.0.0"),
    148157        Array('name' => "GPCPagesNavigation", 'version' => "2.0.0"),
    149158        Array('name' => "GPCPublicIntegration", 'version' => "2.0.0"),
     
    151160        Array('name' => "GPCTables", 'version' => "1.5.0"),
    152161        Array('name' => "GPCTabSheet", 'version' => "1.1.2"),
    153         Array('name' => "GPCTranslate", 'version' => "2.1.1"),
    154         Array('name' => "GPCUsersGroups", 'version' => "2.1.0"),
    155         Array('name' => "GPCUserAgent", 'version' => "1.0.0")
     162        //Array('name' => "GPCTranslate", 'version' => "2.1.1"), doesn't exist anymore
     163        Array('name' => "GPCUserAgent", 'version' => "1.0.1"),
     164        Array('name' => "GPCUsersGroups", 'version' => "2.1.0")
    156165      )
    157166    );
     
    669678          break;
    670679        case 'canvasDraw.graph':
     680          self::addHeaderCSS('gpc.canvasDraw', GPC_PATH.'css/canvasDraw.css');
    671681          self::addHeaderCSS('gpc.canvasDrawT', sprintf($themeFile, 'canvasDraw'));
    672682          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     
    746756          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
    747757          self::addHeaderJS('gpc.inputDotArea', GPC_PATH.'js/ui.inputDotArea.js', array('jquery.ui.widget'));
     758          break;
     759        case 'inputExportBox':
     760          self::addHeaderCSS('gpc.inputText', GPC_PATH.'css/inputText.css');
     761          self::addHeaderCSS('gpc.inputTextT', sprintf($themeFile, 'inputText'));
     762          self::addHeaderCSS('gpc.inputList', GPC_PATH.'css/inputList.css');
     763          self::addHeaderCSS('gpc.inputListT', sprintf($themeFile, 'inputList'));
     764          self::addHeaderCSS('gpc.inputExportBox', GPC_PATH.'css/inputExportBox.css');
     765          self::addHeaderCSS('gpc.inputExportBoxT', sprintf($themeFile, 'inputExportBox'));
     766
     767          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     768          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     769
     770          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     771          self::addHeaderJS('jquery.ui.mouse', 'themes/default/js/ui/jquery.ui.mouse.js', array('jquery.ui.widget'));
     772          self::addHeaderJS('jquery.ui.position', 'themes/default/js/ui/jquery.ui.position.js', array('jquery.ui.mouse'));
     773          self::addHeaderJS('jquery.ui.resizable', 'themes/default/js/ui/jquery.ui.resizable.js', array('jquery.ui.position'));
     774          self::addHeaderJS('jquery.ui.draggable', 'themes/default/js/ui/jquery.ui.draggable.js', array('jquery.ui.resizable'));
     775          self::addHeaderJS('jquery.ui.sortable', 'themes/default/js/ui/jquery.ui.sortable.js', array('jquery.ui.draggable'));
     776          self::addHeaderJS('jquery.ui.dialog', 'themes/default/js/ui/jquery.ui.dialog.js', array('jquery.ui.sortable'));
     777
     778          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText.js', array('jquery.ui.dialog'));
     779          self::addHeaderJS('gpc.inputList', GPC_PATH.'js/ui.inputList.js', array('jquery.ui.dialog'));
     780          self::addHeaderJS('gpc.inputExportBox', GPC_PATH.'js/ui.inputExportBox.js', array('jquery.ui.dialog'));
    748781          break;
    749782        case 'inputFilterBox':
     
    802835          self::addHeaderJS('gpc.inputPages', GPC_PATH.'js/ui.inputPages.js', array('jquery','jquery.ui.widget'));
    803836          break;
     837        case 'inputPath':
     838          self::addHeaderCSS('gpc.inputPath', GPC_PATH.'css/inputPath.css');
     839          self::addHeaderCSS('gpc.inputPathT', sprintf($themeFile, 'inputPath'));
     840          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     841          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     842          self::addHeaderJS('gpc.inputPath', GPC_PATH.'js/ui.inputPath.js', array('jquery','jquery.ui.widget'));
     843          break;
    804844        case 'inputPosition':
    805845          self::addHeaderCSS('gpc.inputPosition', GPC_PATH.'css/inputPosition.css');
     
    854894          self::addHeaderJS('gpc.inputText', GPC_PATH.'js/ui.inputText.js', array('jquery.ui.widget'));
    855895          break;
     896        case 'inputTreeList':
     897          self::addHeaderCSS('gpc.inputTreeList', GPC_PATH.'css/inputTreeList.css');
     898          self::addHeaderCSS('gpc.inputTreeListT', sprintf($themeFile, 'inputTreeList'));
     899          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     900          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
     901          self::addHeaderJS('gpc.inputTreeList', GPC_PATH.'js/ui.inputTreeList.js', array('jquery.ui.widget'));
     902          break;
    856903        case 'simpleTip':
    857904          self::addHeaderCSS('gpc.simpleTip', GPC_PATH.'css/simpleTip.css');
     
    860907          self::addHeaderJS('jquery.ui.widget', 'themes/default/js/ui/jquery.ui.widget.js', array('jquery.ui'));
    861908          self::addHeaderJS('gpc.simpleTip', GPC_PATH.'js/simpleTip.js', array('jquery.ui.widget'));
     909          break;
     910        case 'download':
     911          self::addHeaderJS('jquery.ui', 'themes/default/js/ui/jquery.ui.core.js', array('jquery'));
     912          self::addHeaderJS('gpc.download', GPC_PATH.'js/ui.download.js', array('jquery'));
    862913          break;
    863914        case 'dynamicTable':
     
    918969      }
    919970    }
     971  }
     972
     973
     974  /**
     975   * build an url from given properties
     976   *
     977   * @param String $urlType: type of url to build
     978   * @param Array $properties: properties used to build url
     979   * @return String: url, or empty string if not possible to build it
     980   */
     981  static public function urlBuild($type, $properties=array())
     982  {
     983    $returned='';
     984    switch($type)
     985    {
     986      case 'admin.picture':
     987        if(isset($properties['pictureId']))
     988        {
     989          $returned='./admin.php?page=photo-'.$properties['pictureId'];
     990        }
     991        break;
     992      case 'admin.category':
     993      case 'admin.album':
     994        if(isset($properties['categoryId']))
     995        {
     996          $returned='./admin.php?page=album-'.$properties['categoryId'];
     997        }
     998        break;
     999    }
     1000    return($returned);
    9201001  }
    9211002
  • extensions/GrumPluginClasses/classes/GPCUserAgent.class.inc.php

    r17562 r17735  
    11<?php
     2/* -----------------------------------------------------------------------------
     3  class name: GPCUserAgent
     4  class version  : 1.0.1
     5  plugin version : 3.5.4
     6  date           : 2012-09-04
     7  ------------------------------------------------------------------------------
     8  author: grum at piwog.org
     9  << May the Little SpaceFrog be with you >>
     10  ------------------------------------------------------------------------------
     11
     12
     13| release | date       |
     14| 1.0.1   | 2012/09/04 | * Fix some bot definition
     15|         |            |
     16|         |            |
     17
     18   ---------------------------------------------------------------------- */
    219
    320require_once('GPCUserAgent.const.inc.php');
  • extensions/GrumPluginClasses/classes/GPCUserAgent.const.inc.php

    r17562 r17735  
    263263              UA_BOT_EXALEAD           => array(UA_PROP_NAME => 'Exalead',              UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => ''),
    264264              UA_BOT_GAMESPY           => array(UA_PROP_NAME => 'GameSpy',              UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => ''),
     265              UA_BOT_GIGABLAST         => array(UA_PROP_NAME => 'Gigabot',              UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => 'http://www.gigablast.com/spider.html'),
    265266              UA_BOT_INKTOMI           => array(UA_PROP_NAME => 'Inktomi',              UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => ''),
    266267              UA_BOT_YAHOO_SEARCH      => array(UA_PROP_NAME => 'Yahoo! Search',        UA_PROP_TYPE=>UA_BROWSER_TYPE_CRAWLER, UA_PROP_URL => 'http://www.yahoo.com/'),
Note: See TracChangeset for help on using the changeset viewer.