compose.txt 1.0 KB

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