DarkGlass Macros
Macros are special markup which allow things that are not otherwise possible. A macro call is written $macro if the macro takes no arguments, or $macro{arg_1_,...,arg_n_} if it does. Commas in macro arguments must be escaped with backslashes. Unwanted arguments may be omitted.
Macros are evaluated after Smut markup, which means that they do not work in certain places, for example as part of a link.
- $scripturl
- The URL of the DarkGlass script.
- $homepage
- The name of the web site's $link{$browse{$homepage},home page}, suitable for displaying as text.
- $page
- The current page, escaped suitably for use in a URL.
- $pagename
- The name of the current page, suitable for displaying as text.
- $lastmodified
- The date on which the current page was last modified.
- $url{path}
- Make a URL from a site-relative path.
- $include{file}
- Inserts the contents of the given HTML or text file from the templates directory. If the file does not exist, an abort.htm error message is shown with $text set from nofile.txt.
- $link{url,description}
- Produces a link to the given URL whose displayed text is description.
- $filesize{file}
- Inserts the size of the given file in the download directory.
- $image{image,width,_height}
- Inserts the given image, which may be either a local file in the image directory or a URL. The width and height are in pixels, or a percentage of the available space. If no width and height is given, and the image is a local image, the thumbnail is inserted instead, if any, and made a link to the image itself.
- $imagecomment{image}
- Inserts the given image's comment, if any.
- $webfile{file,format}
- Produces a link to the given file in the download directory whose text is format, followed by the size of the file.
- $pdfpages{file}
- Inserts the number of pages in the given PDF file in the download directory.
- $email{text}
- Makes text a link to send mail to the administrator (see DarkGlass Configuration).