Replacing tabs with spaces
[squirrelmail.git] / doc / compose.txt
1 Creating Links to compose.php easily
2 ====================================
3
4 makeComposeLink() PHP function helps to create links to the compose page
5 easily, taking into account the user's settings, "Compose in new window" and
6 "Use javascript". Here's how to use it:
7
8 1) Build the last part of the URL as follows:
9 $comp_uri = 'src/compose.php?mailbox='.$mailboxbox.'&send_to='.urlencode($usermail);
10
11 2) The display part of the link can be anything you like (such the name of the user):
12 $disp = 'The user's name';
13
14 3) Print it:
15 echo makeComposeLink($comp_uri, $disp);
16
17 makeComposeLink() has been available since Squirrelmail 1.4.2.
18
19
20
21 Using the comp_in_new javascript function
22 =========================================
23
24 comp_in_new is the javascript function to popup a new compose window.
25
26 the function needs one argument:
27 1) url with arguments to the compose window.
28
29 example 1:
30 <a href="javascript:void(0)" onclick="comp_in_new("")>
31
32 example 2:
33 <a href="javascript:void(0)" onclick="comp_in_new("../../src/compose.php?argument1=true&amp;argument2=test")>
34