|
From: Dieter S. <dsi...@sq...> - 2002-01-10 19:28:35
|
Here is that clue hammer!
# custom_login.pl
1;
# end
sub login {
# modified to your needs
}
# eof
This code is pulled in and replaces the standard login function
in login.pl. There is no need to change any of the modules and you can
upgrade anytime keeping your mods. Of course, if I add some new stuff,
like another menu item, you'd have to adapt your custom menu too or you
won't have it available.
It's explained in more detail in the
http://www.sql-ledger.org/feature/api.html page
Dieter Simader http://www.sql-ledger.org (780) 472-8161
DWS Systems Inc. Accounting Software Fax: 478-5281
=========== On a clear disk you can seek forever ===========
On Thu, 10 Jan 2002, Sergio A. Kessler wrote:
> hi,
>
> here is a custom_login.pl & custom_menu.pl & a minipatch
> for am.pl:
>
> --- sql-ledger.org/bin/mozilla/am.pl Thu Dec 27 23:28:04 2001
> +++ sql-ledger/bin/mozilla/am.pl Thu Jan 10 14:19:20 2002
> @@ -516,7 +516,11 @@
>
> <p class=menu_heading><b>|.$locale->text('Configuration').qq|</b>
> <br>$form->{spacer}<a class=menu_item
> href=$form->{script}?action=config&path=$form->{path}&login=$form->{login}&p
> assword=$form->{password}
> target=main_window>|.$locale->text('Preferences').qq|</a>$form->{spacer}
> -
> +<br>
> +<br>
> +<hr size=1>
> +<br>
> +<a
> href=custom_menu.pl?path=$form->{path}&action=acc_menu&login=$form->{login}&
> password=$form->{password}
> target=acc_menu>|.$locale->text('Accounting').qq|</a>
> </div>
>
> </body>
>
> BUT, I very much doubt that this is what you want...
> I think I still don't understand, I cannot see any
> API, just a subroutine /without parameters/ that display
> the menu...
>
> with this approach I have to s/login.pl/custom_login/
> in every file, a big mess if I have to sync this
> with future releases...
>
> so, I feel I need to be hit with a clue hammer...
>
> /sergio
>
> ----- Original Message -----
> From: "Dieter Simader" <dsi...@sq...>
>
>
> > You can apply your changes in a custom_login.pl script. Then you add a
> > custom_menu.pl and change the menu to include the "Setup" link and from
> > the setup menu (it's in am.pl) you link back to the main menu.
> >
> > This is what the API is for.
> >
> > Then you send me the code and I'll make it available for others.
>
>
|