1<?php 2if (!defined('DOKU_INC')) die(); 3 4define('SKAUTIS_LIBS_DIR', dirname(__FILE__).'/libs/'); 5 6class action_plugin_authskautis extends DokuWiki_Action_Plugin { 7 /** 8 * Registers the event handlers. 9 */ 10 function register(&$controller) 11 { 12 $controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'hook_html_loginform_output', array()); 13 //$controller->register_hook('HTML_UPDATEPROFILEFORM_OUTPUT', 'BEFORE', $this, 'hook_updateprofileform_output', array()); 14 } 15 16 /** 17 * Handles the login form rendering. 18 */ 19 function hook_html_loginform_output(&$event, $param) { 20 21 //$event->data = null; 22 //echo print_r($event,true); 23 //echo "111"; 24 25 //if (isset($_SESSION[DOKU_COOKIE]['authskautis']['auth_url'])) { 26 //$auth_url = $_SESSION[DOKU_COOKIE]['authskautis']['auth_url']; 27 $auth_url = 'test-is.skaut.cz/Login/?appid='; 28 29 $a_style = "width: 200px;margin:0 auto;color: #666666;cursor: pointer;text-decoration: none !important;display: block;padding-bottom:1.4em;";//-moz-linear-gradient(center top , #F8F8F8, #ECECEC) 30 $div_style = "float:left;line-height: 30px;background-color: #F8F8F8;border: 1px solid #C6C6C6;border-radius: 2px 2px 2px 2px;padding: 0px 5px 0px 5px;position: relative;"; 31 echo "<a href='$auth_url' style='$a_style' title='".$this->getLang('enter_google')."'><div style=\"$div_style\">".$this->getLang('enter_google')."</div>"; 32 echo "<div style='clear: both;'></div></a>"; 33 //} 34 } 35} 36 37?>