I did a little one line hack in the interpertation of the linkact
symbols in ldaptemplate that I found made web500 much more useful to
me. I don't know who exactly is in charge of the ldap template format.
The linkact symbol arguments are used (in web500 at least) to construct a
link of the form:
HREF=[DN][Argument 0]
so that
item linkact "[Modify] EXPERIMENTAL!" "" "?$bind"
might translate to
<A HREF="cn=Gaskill,o=Company,c=US?$bind">Label
Text</A>
By defining linkact argument 1 (the second argument) act as a prefix to
the URL, I can get a link to any cgi-bin script that would take the DN as
an argument. For my application, for example, I use:
item linkact "[Modify]" "" "" "http://localhost/cgi-bin/ldapadd.cgi?"
which translates into:
<A
HREF="http://localhost/cgi-bin/ldapadd.cgi?cn=Gaskill,o=Company,c=US">
[Modify with my script]</A>
Using my own modify script was essential for my application.
The actual diff of what I did to the web500gw-2.0b/ldap2html.c file is:
*** ldap2html.c Tue Jan 30 04:19:06 1996
- --- /files/orig/ldap/ldap2html.c Mon Oct 28 11:40:01 1996
***************
*** 184,190 ****
url_encode(dn), (colp->ti_args && colp->ti_args[0]) ?
url_encode(colp->ti_args[0]) : "", colp->ti_label);
#else
! sprintf( label_buf+strlen(label_buf), "<A HREF=\"%s%s\">%s</A>\n",
url_encode(dn), (colp->ti_args && colp->ti_args[0]) ?
url_encode(colp->ti_args[0]) : "", colp->ti_label);
#endif
- --- 184,192 ----
url_encode(dn), (colp->ti_args && colp->ti_args[0]) ?
url_encode(colp->ti_args[0]) : "", colp->ti_label);
#else
! sprintf( label_buf+strlen(label_buf), "<A HREF=\"%s%s%s\">%s</A>\n",
! (colp->ti_args && colp->ti_args[1]) ?
! colp->ti_args[1] : "",
url_encode(dn), (colp->ti_args && colp->ti_args[0]) ?
url_encode(colp->ti_args[0]) : "", colp->ti_label);
#endif
Is anyone interested in this?
Thanks,
Braddock Gaskill
- - http://www.jagunet.com/~braddock --------- braddock@braddock.com -
- - (410) 366-6106 - 3100 St. Paul St. Apt 302, Baltimore, MD, 21218 -
- -- Free Software Union! http://www.jagunet.com/~braddock/fslu/org --
- ----------- PGP Public Key: finger braddock@jagunet.com ------------
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQBVAwUBMnTifjf2QbQMWMIFAQEliAH/XcmgfsefG1VsbOrc3EDGZ+ekOEb8Pg+e
rFwIWaOau0LrUz0ujFPUxYE2q8t+OIC8J4z1J9UDqMphgEJZtv+6jg==
=WdKR
-----END PGP SIGNATURE-----