'routeplaner', 'email' => 'deshi@web.de', 'date' => '16/01/2006', 'name' => 'Routeplaner Plugin', 'desc' => 'plan your route using lycos', 'url' => 'http://www.dokuwiki.org/plugin:routeplaner', ); } /** * Syntax-Beispiel: {{routeplaner> Hubert Meier, Mustergasse 3, 80756, München, Deutschland}} */ /** * Plugin Type */ function getType(){ return 'substition'; } function getSort(){ return 314; } function connectTo($mode) { $this->Lexer->addSpecialPattern("\{\{routeplaner>.*?\}\}",$mode,'plugin_routeplaner'); } /** * Handle the match */ function handle($match, $state, $pos, &$handler){ // strip markup $match = substr($match,14,-2); // split into pieces list($company,$street,$zip, $town, $country) = explode(',',$match,5); // beautify strings if (trim($company, " \t\n") != '') { $company = trim($company, " \t\n"); } else { $company = 'Ziel'; } if (trim($street, " \t\n") != '') { $street = trim($street, " \t\n"); } else { $street = 'missing street'; } if (trim($zip, " \t\n") != '') { $zip = trim($zip, " \t\n"); } else { $zip = 'missing zip'; } if (trim($town, " \t\n") != '') { $town = trim($town, " \t\n"); } else { $town = 'missing town'; } if (trim($country, " \t\n") != '') { $country = trim($country, " \t\n"); } else { $country = 'missing country'; } return array($company,$street,$zip,$town,$country); } /** * Create output */ function render($mode, &$renderer, $data) { if($mode == 'xhtml'){ $renderer->doc .= $this->_contact($data); return true; } return false; } /** * Does the contact form xhtml creation. Adds some javascript to validate the form * and creates the input form. */ /** * Does the contact form xhtml creation. Adds some javascript to validate the form * and creates the input form. */ function _contact($data){ global $lang; global $conf; global $ID; $ret = ''; $ret .= ""; $ret .= "
"; $ret .= "
"; $ret .= "";//crv:20081026 Not nice to fix it with 'DEU', this is a greater fix, see http://jaloma.ac.googlepages.com/plugin%3Aroutenplaner for an idea $ret .= ""; $ret .= ""; $ret .= ""; $ret .= "

"; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= ""; $ret .= " "; $ret .= ""; $ret .= "
Ziel:
Start:
"; $ret .= " "; $ret .= "
"; $ret .= "
"; $ret .= "
"; $ret .= "
"; $ret .= "
"; return $ret; } } //Setup VIM: ex: et ts=4 enc=utf-8 : ?>