HTTP Header Plugin
Add additional lines to the HTTP header of a page.
Usage
This macro lets you set (any) additional HTTP header lines. You may want to use this make
a wiki page downloadable as a file or set a different Content-Type.
Examples
%ADDHTTPHEADER{ name="Content-Type" value="text/plain" }%
The next block shows the wiki text of a more complex example:
%ADDHTTPHEADER{ name="Content-Type" value="text/x-vcard" }%%ADDHTTPHEADER{ name="Content-Disposition" value="attachment; filename=\"%WIKINAME%.vcf\"" }%BEGIN:VCARD
VERSION:2.1
FN:%FORMFIELD{ "FirstName" topic="%USERSWEB%.%WIKINAME%" }% %FORMFIELD{ "LastName" topic="%USERSWEB%.%WIKINAME%" }%
N:%FORMFIELD{ "LastName" topic="%USERSWEB%.%WIKINAME%" }%;%FORMFIELD{ "FirstName" topic="%USERSWEB%.%WIKINAME%" }%;;;
ADR;HOME:;;%FORMFIELD{ "Address" topic="%USERSWEB%.%WIKINAME%" }%;%FORMFIELD{ "Location" topic="%USERSWEB%.%WIKINAME%" }%;;
TEL;PREF;HOME:%FORMFIELD{ "Telephone" topic="%USERSWEB%.%WIKINAME%" }%
END:VCARD
%META:PREFERENCE{name="SKIN" title="SKIN" type="Set" value="text"}%
%META:PREFERENCE{name="COVER" title="COVER" type="Set" value="text"}%
(Please strip the heading space in front of the META lines.)
Copying this to a fresh topic lets you download a vcard of the currently logged-in user (assuming there is a filled
UserForm.
Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in
configure
, then you can still install manually from the command-line. See
http://foswiki.org/Support/ManuallyInstallingExtensions for more help.
Info