##################################################################### # EDIT THE EXPORT LINE BELOW TO FIT YOUR NEEDS, BUT DO NOT UNCOMMENT! # Export = macro, login_2 ##################################################################### # Plugin Name = login_2 # Author = Marko Kleen # Copyright = GPL -> see http://www.8t88.de/ # Purpose = Provide alternate login Macro with session clock! ##################################################################### # Plugin types are specified in the EXPORT line above. # global: Your plugin is applied on all output # articles: Your plugin is applied on all articles' output # responses: Your plugin is applied on guestbook entries and comments # override: Your plugin overrides one of 8t88's existing subroutines # macro: Your plugin adds a new macro with new functionality ##################################################################### my $res = undef; if ($user) { $res = 'Angemeldet als:'.br.strong(realname($user)).br. span({-id => 'count_down'}, '::').script({-type => 'text/javascript'}, '').br.a({-href => '?logoff='.$user}, 'abmelden'); } else { $res = start_form().input({-name => 'user', -type => 'text', -onblur => 'if (!this.value) { this.value = \'Name\'; }', -onfocus => 'this.value = \'\';', -value => 'Name'}).br.input({-name => 'pass', -type => 'password', -onblur => 'if (!this.value) { this.value = \'******\'; }', -onfocus => 'this.value = \'\';', -value => '******'}).br.input({-type => 'submit', -value => 'am CMS anmelden'}).input({-type => 'hidden', -name => 'cat', -value => $cat}).end_form(); } return ($res); ##################################################################### # USAGE: # # To use this plugin simply drop it into your "8t88's CMS v2" plugins # directory. Then insert the macro where you used to # have the macro. # # That's all, enjoy! ##################################################################### # EOF