Guest User

Untitled

a guest
May 22nd, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.08 KB | None | 0 0
  1. <?php
  2. require_once(PATH_tslib.'class.tslib_pibase.php');
  3. /**
  4.  * Plugin '........' for the '........' extension.
  5.  */
  6. class extensionname_pi1 extends tslib_pibase {
  7.     var $prefixId      = 'extensionname_pi1';               // Same as class name
  8.     var $scriptRelPath = 'pi1/class.extensionname_pi1.php'; // Path to this script relative to the extension dir.
  9.     var $extKey        = 'extensionname';                   // The extension key.
  10.     var $pi_checkCHash = true;                              // Run in Secure-Mode
  11.  
  12.     function main($content,$conf){
  13.         $this->conf = $conf;                // Configarray from Typo3-Plugin-Template
  14.         $conf = $this->consist_conf($conf); // Correct Configarray
  15.         $this->pi_setPiVarDefaults();       // Pi-Vars
  16.         $this->pi_loadLL();                 // Load Language-Control
  17.  
  18.         .......
  19.     }
  20.  
  21.  
  22.     // remove '.' (dot) from Configurationsarray ($conf)
  23.     function consist_conf($array)
  24.     {
  25.         foreach($array as $k => $v)
  26.         {
  27.             if(!empty($v) && is_array($v))
  28.             {
  29.                 $subarray[str_replace('.', '', $k)] = $this->consist_conf($v);
  30.             }
  31.             else
  32.             {
  33.                 $subarray[str_replace('.', '', $k)] = $v;
  34.             }
  35.         }
  36.         return $subarray;
  37.     }
  38. }
  39. ?>
Add Comment
Please, Sign In to add comment