Ignore:
Timestamp:
Jul 29, 2013, 11:48:14 PM (11 years ago)
Author:
chronos
Message:
  • Modified: Export transformed to application module.
Location:
trunk/Modules/Export
Files:
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Export/Export.php

    r553 r558  
    11<?php
    22
    3 include_once('../includes/system.php');
     3include_once(dirname(__FILE__).'/Page.php');
     4include_once(dirname(__FILE__).'/ExportOutput.php');
     5
     6class ModuleExport extends AppModule
     7{
     8  function __construct($System)
     9  {
     10    parent::__construct($System);
     11    $this->Name = 'Export';
     12    $this->Version = '1.0';
     13    $this->Creator = 'Chronos';
     14    $this->License = 'GNU/GPL';
     15    $this->Description = 'Allow parametric export translated texts to various supported output formats';
     16    $this->Dependencies = array();
     17  }
     18 
     19  function Start()
     20  {
     21        $this->System->RegisterPage('export', 'PageExport');
     22        $this->System->RegisterMenuItem(array(
     23        'Title' => 'Exporty',
     24        'Hint' => 'Zde si můžete stáhnout přeložené texty',
     25        'Link' => $this->System->Link('/export/'),
     26        'Permission' => LICENCE_ANONYMOUS,
     27        'Icon' => '',
     28    ), 2);
     29  }
     30}
    431
    532class Export extends Module
     
    1643  function Init()
    1744  {
    18     $this->TempDir = $this->Config['Web']['TempFolder'].'Export/'.$this->Id.'/';
     45    $this->TempDir = dirname(__FILE__).'/../../'.$this->Config['Web']['TempFolder'].'Export/'.$this->Id.'/';
     46    $this->TempDirRelative = $this->Config['Web']['TempFolder'].'Export/'.$this->Id.'/';
    1947    if(!file_exists($this->TempDir)) mkdir($this->TempDir, 0777, true);
    2048  }
Note: See TracChangeset for help on using the changeset viewer.