Template substitution values for QmailAdmin Version 1.2.0-rc1 When QmailAdmin encounters ## while parsing a template file, it looks at the following character and replaces ## and the character with the information listed below. The templates which use each value are listed below each item. Tag values H, n, Q, R, r, W, w are not defined in the source code. Tag values b, f, h, l, m, N, O are defined in template.c, but never used in a current template. N isn't used anywhere either, but it might be handy to use. If the rest are obsolete it may be best to remove them. Tag value H is not defined in template.c but is used in header.html. To see which templates use a particular tag: grep -c '##A' * | grep -v ':0' | less Change '##A' to the tag of interest. To see which templates do NOT use a particular tag, leave '-v' out of the second grep. ------------------------------------------------------------------------- ##A Send the user name currently being acted upon. (ActionUser) If postmaster was editing someone this would be someone. add_listdig, add_listmod, add_listuser, del_autorespond_confirm, del_forward_confirm, del_listdig, del_listmod, del_listuser, del_mailinglist_confirm, del_user_confirm, mod_autorespond, mod_dotqmail, mod-mailinglist-idx, mod-user, show_digest_subscribers, show_moderators, show_subscribers ------------------------------------------------------------------------- ##a Send the Alias of a mailing list. (Alias) mod_mailinglist ------------------------------------------------------------------------- ##B Show number of pop accounts. If MaxPopAccounts is > -1 then it shows (MaxPopAccounts) else it shows string 229 [unlimited]. show_users ------------------------------------------------------------------------- ##b Show the lines inside a alias table. Calls function show_dowqmail_lines. not used in any current template files. ------------------------------------------------------------------------- ##C Send the CGIPATH. This is frequently used as part of the Action= in forms, and in building URLs for links. (CGIPATH) Used in ALL templates. Not used in header, footer or colortable. ------------------------------------------------------------------------- ##c Show the lines inside a mailing list table. Calls the function show_mailing_list_line2. add_user ------------------------------------------------------------------------- ##D Send the domain name. (Domain) Used in all templates except show_login. ------------------------------------------------------------------------- ##d Show the lines inside a forward table. Calls the function show_dotqmail_lines. show_forwards ------------------------------------------------------------------------- ##E This will be used to parse mod_mailinglist-idx.html. Calls the function show_current_list_values. add_mailinglist-idx, mod_mailinglist-idx ------------------------------------------------------------------------- ##e calls show_mailing_list_line. Displays a block of mailing lists. show_mailinglist ------------------------------------------------------------------------- ##F Display the contents of the autoresponder's message file. This is a fairly long block of inline code, with a note it should be moved to another file. mod_autorespond ------------------------------------------------------------------------- ##f Show the forwards. Calls show_forwards. not used in any template files. ------------------------------------------------------------------------- ##G Show the mailing list Digetst Subscribers. This calls function show_list_group_now(2). show_digest_subscribers ------------------------------------------------------------------------- ##g Show the lines inside a autorespond table. Calls the function show_autorespond_line. show_autorespond ------------------------------------------------------------------------- ##H not used header.html ------------------------------------------------------------------------- ##h Show the counts, not sure which ones... Calls function show_counts. not used in any current templates. ------------------------------------------------------------------------- ##I No comment in source code. Calls function show_dotqmail_file. mod_dotqmail ------------------------------------------------------------------------- ##i? Check for user forward and forward/store vacation. Calls function check_user_forward_vacation. This accepts a number after the letter in place of the ?. Values are: 0 return 'checked ' if there is no .qmail file (Standard delivery) 1 return 'checked ' if this is a forward 2 return address forwarded to 3 return 'checked ' if local copy is to be saved 4 return 'checked ' if vacation message 5 return subject of vacation message 6 return body of vacation message 7 return gecos (real name) field from vauth_getpw 8 return 'checked ' if this is a blackhole 9 return 'checked ' if spam checking is enabled mod_user (10 times). Note: check_user_forward_vacation is terribly inefficient. This needs to check for the first use of any of its request values and do all its file reading ONE TIME, storing values in static variables for the rest of the calls. (May need to make sure we are still looking at the same user as the one data is buffered for.) ------------------------------------------------------------------------- ##J Show mailbox flag status. Calls function check_mailbox_flags. mod_user (8 times) ------------------------------------------------------------------------- ##j Show number of mailing lists. If (MaxMailingLists) > -1 this returns (CurrMailingLists)/(MaxMailingLists) else it returns (CurrMailingLists) followed by text string 229 [unlimited]. show_mailinglist ------------------------------------------------------------------------- ##K Show number of autoresponders. If (MaxForwards) > -1 this returns (CurrAutoResponders)/(MaxAutoResponders) else it returns (CurrAutoResponders) followed by text string 229 [unlimited]. show_autorespond ------------------------------------------------------------------------- ##k Show number of forwards. If (MaxForwards) > -1 this returns (CurForwards)/(MaxForwards) else it returns (CurForwards) followed by text string 229 [unlimited]. show_forwards ------------------------------------------------------------------------- ##L Login username. If (Username) is set it is shown, elseif "user=" is set in the Get parms it is used, else the string 'postmaster' is sent. If postmaster was editing someone this would be postmaster. show_login ------------------------------------------------------------------------- ##l Show the aliases stuff. This calls function show_aliases. not used in any current templates. ------------------------------------------------------------------------- ##M Show the mailing list subscribers. The function show_list_group_now is called. show_subscribers ------------------------------------------------------------------------- ##m Show the mailing lists. The function show_mailing_lists is called. not used in any current templates. ------------------------------------------------------------------------- ##N Parse include files. This is a fairly long section of inline code that either displays a template file doing ## substitution or sometimes displays text string 144. [file permission error] not used in any current templates. ------------------------------------------------------------------------- ##n not used. not used in any current templates. ------------------------------------------------------------------------- ##O Build a pulldown menu of all POP/IMAP users. This calls function vauth_getall then builds an option tag for each entry returned. not used in any current templates. ------------------------------------------------------------------------- ##o Show the mailing list moderators. This calls function show_list_groupnow. show_moderators ------------------------------------------------------------------------- ##P Display mailing list prefix. This calls function get_mailinglist_prefix. mod_mailinglist-idx ------------------------------------------------------------------------- ##p Show POP/IMAP users. This calls function show_user_lines. show_users ------------------------------------------------------------------------- ##Q not used not used in any current templates. ------------------------------------------------------------------------- ##q Display user's quota. This prints the quota in megabytes, or if the user is a DOMAIN_ADMIN the string 'NOQUOTA', else text string 229 [unlimited]. mod_user ------------------------------------------------------------------------- ##R not used not used in any current templates. ------------------------------------------------------------------------- ##r Show the autoresponder stuff. This calls function show_autoresponders. not used in any current templates. ------------------------------------------------------------------------- ##S Send the status message parameter. (StatusMessage) used in ALL templates ------------------------------------------------------------------------- ##s Show the catchall name. Calls the function get_catchall. show_users ------------------------------------------------------------------------- ##T Send the time parameter. (Mytime) used in every template except show_login. (2-3 times in most) ------------------------------------------------------------------------- ##t? Contitionally Transmit a block of text. This calls function transmit_block. It requires one character parameter to replace the ?. This character defines a condition, and the text between the beginning block and the end marker ##tt will only be sent if the condition is met. The possible condition values are: a Administrative commands. Unless the user is an administrator, the text within a ##ta block will not be sent. h Help. This text will only be sent if --enable-help was set in ./configure. m MySQL. This text will only be sent if --enable-exmlm-mysql was set in ./configure. q Modify Quota. This text will only be sent if --enable-modify-quota was set in ./configure. s Modify Spam. This text will only be sent if --enable-modify-spam was set in ./configure. t This is the end tag. All text after this will be sent normally. u User. Not administrator. This is the opposite of the 'a' tag, and can be used to provide an alternate value for non-administrators. add_user (4 times), mod_user (18 times), show_login (2 times) Rather than using a/u it might be a good idea to use a/A. A lower case value is displayed when the thing is set, and the upper case is displayed when the thing is not set. That way if someone needs to do something on not modify-spam they can use S. Maybe it will never happen, but it happened with a/u so why not the others... ------------------------------------------------------------------------- ##U Send the username parameter. (Username) used in every template except show_login. (2-3 times in most) ------------------------------------------------------------------------- ##u Show the users. This calls function show_users not used in any current template. ------------------------------------------------------------------------- ##V Show version number. This is a link to the sourceforge.net website for qmailadmin, and the inter7.com website. QA_PACKAGE is appended to the URL, and QA_VERSION is the string that is displayed as the link. show_login ------------------------------------------------------------------------- ##v Display the main menu. This is a fairly long section of inline code, with a note that it should be moved to a function. It checks various things to decide which items should appear in the main menu. Quite a few text strings are conditionally displayed. 001 [iso-8859-1], 061 [Email Accounts], 077 [Mail Robots], 080 [List], 111 [Modify User], 122 [Forwards], 124 [Quick Links], 125 [New Email Account], 127 [New Forward], 128 [New Mail Robot], 129 [New Mailing List], 229 [unlimited], 249 [Quota], 253 [Limit:], 254 [Used:] main_menu ------------------------------------------------------------------------- ##W not used not used in any current templates. ------------------------------------------------------------------------- ##w not used not used in any current templates. ------------------------------------------------------------------------- ##X??? This tag gets a block of text from the dictionary and displays it in the template. This tag is always followed by three digits, which are used as an index into the translation dictionary. Used in every template, plus header. ------------------------------------------------------------------------- ##x Exit / logout link/text */ This builds a link with the url returned by get_session_val("returnhttp and the link is get_session_val("returntext"). Used in every template except show_login. ------------------------------------------------------------------------- ##Y Return text. This calls get_session_val("returntext=") show_login ------------------------------------------------------------------------- ##y Return http. This calls get_session_val("returnhttp=") show_login ------------------------------------------------------------------------- ##Z Send the image URL directory. Used to create the path for tags. (IMAGEURL) mail_menu, show_login ------------------------------------------------------------------------- ##z Send the domain name for the show_login page. If Domain is set it is used, else if "dom=" is set in the incoming URL its value is used, else if DOMAIN_AUTOFILL is set the domain name being viewed, else nothing is sent. show_login