Date index for Jan 2004


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [achievo] include link in email to modify project directly



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Nele Vogel wrote:

> Is it possible to generate an email including a link to a defined project?

Yes.

>
http://localhost/achievo-0.8.4/dispatch.php?atknodetype=project&atkaction=edit&;
> atkselector=project.id=[myGeneratedProjectID]&atklevel=1&

You shouldn't pass 1 for atklevel. This is automatically calculated. It
is best to use atklevel=-1, meaning 'please generate a default atklevel'.

It is even better not to create manual urls at all, but let ATK generate
them, using the href or session_url method:

href("dispatch.php?atknodetype=project.......", "click here", SESSION_NEW);

The first param, which is the actual url, without atklevel specified,
can be generated by another method:

$url = dispatch_url("project.project", "edit", array("project.id"=>4));

Then:

$mail.= href($url, "click here to edit project");

This'll generate an <a href=""> statement, so you should use this in
html mails. In plain text mails, use session_url instead of href. It
will just generate the full url.

> How do I tell Achievo to load the surrounding frame?

I don't believe you can, currently. That requires a little index.php
hacking. That is the frameset that loads the url in the main frame. If
you look at index.php, you can see it makes use of a $default_url. It
shouldn't be hard to modify that into a little bit of code that accepts
a custom url passed in the url.

> How about authentication? Does Achievo still demand a password, if I
try to
> access a project like this?

It will demand a password, unless:
a) The user already had a browser open with an active login, or
b) You've set $config_authentication_cookie to true in config.inc.php
   (or added it if it's not already there). This way, the user is
   authenticated through a cookie on his disk. This is unsecure though,
   for obvious reasons.

Greetings,
Ivo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAArRq95NUnGFZm9cRArwLAKDsHQaiuKl7vRDLsT8SMB1ROOv7IwCgstgv
YfqJt6qy0WEkU2yuldDLbZU=
=kqHX
-----END PGP SIGNATURE-----


http://www.achievo.org/lists achievo.org - ©1999-2002 ibuildings.nl BV