Exemplo n.º 1
0
<?php

require_once DOKU_PLUGIN . 'directions/syntax/localdirections.php';
require_once DOKU_PLUGIN . 'directions/syntax/common.php';
global $conf;
$filename = DOKU_INC . $conf['plugin']['directions']['hitslog'];
$data = dir_parseHitsFile($filename);
// header
print '<table class=driver_dbox_table style="border-bottom: 0px"><tr><td class=driver_dbox_table_title_column>Directions</td></tr></table>';
//incoming
// $info can go unset (Used only by graph generator -> check graph.php).
print dir_generateDirections($info, $data, true, false, false);
//outgoing
// $info can go unset (Used only by graph generator -> check graph.php).
print dir_generateDirections($info, $data, false, true, false);
Exemplo n.º 2
0
 /**
  * Handler to prepare matched data for the rendering process.
  *
  * <p>
  * The <tt>$aState</tt> parameter gives the type of pattern
  * which triggered the call to this method:
  * </p>
  * <dl>
  * <dt>DOKU_LEXER_ENTER</dt>
  * <dd>a pattern set by <tt>addEntryPattern()</tt></dd>
  * <dt>DOKU_LEXER_MATCHED</dt>
  * <dd>a pattern set by <tt>addPattern()</tt></dd>
  * <dt>DOKU_LEXER_EXIT</dt>
  * <dd> a pattern set by <tt>addExitPattern()</tt></dd>
  * <dt>DOKU_LEXER_SPECIAL</dt>
  * <dd>a pattern set by <tt>addSpecialPattern()</tt></dd>
  * <dt>DOKU_LEXER_UNMATCHED</dt>
  * <dd>ordinary text encountered within the plugin's syntax mode
  * which doesn't match any pattern.</dd>
  * </dl>
  * @param $aMatch String The text matched by the patterns.
  * @param $aState Integer The lexer state for the match.
  * @param $aPos Integer The character position of the matched text.
  * @param $aHandler Object Reference to the Doku_Handler object.
  * @return Integer The current lexer state for the match.
  * @public
  * @see render()
  * @static
  */
 function handle($match, $state, $pos, &$handler)
 {
     switch ($state) {
         case DOKU_LEXER_ENTER:
             break;
         case DOKU_LEXER_MATCHED:
             break;
         case DOKU_LEXER_UNMATCHED:
             break;
         case DOKU_LEXER_EXIT:
             break;
         case DOKU_LEXER_SPECIAL:
             break;
     }
     $result = array();
     // check for graph atttribute
     $graph = trim(substr($match, -7, -1));
     $result[] = $graph;
     // parse hits file
     $registeredOnly = $this->getConf('registeredOnly') == 0 ? false : true;
     $filename = DOKU_INC . $this->getConf('hitslog');
     $result[] = dir_parseHitsFile($filename, $registeredOnly);
     return $result;
 }