User Manager/Voucher template

From MikroTik Wiki
< User Manager
Revision as of 09:04, 26 February 2007 by Normis (talk | contribs) (markup fix)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • Voucher template can be edited in customer section.
  • Each customer has it's own voucher template;
  • Several predefined constants can be included in voucher template. When constructing voucher these constants will be replaced with actual values of user attributes. See documentation about users to understand meaning of each user attribute.
  • Every constant must be included in percent signs. For example: %u_username%, %u_password%.
  • Also usage information (for example, used uptime) can be included in vouchers. This means that actually also reports can be printed using voucher generation.
  • You have to choose which attributes must be printed on the voucher.

Recommendations:

  • If basic knowledge of HTML and CSS is present, the template can be redesigned completely, having different look and information. Otherwise it is recommended to leave the default structure and only translate or edit phrases displayed on original voucher;
  • Don't leave open HTML tags. This means, if you have <div>, then also </div> must be present. Otherwise vouchers can damage the entire page and browser content refresh will be required;
  • Be careful with tags. As template editing is only accessible to customers (and router console users) there is no restriction in tag use. This means more flexibility and responsibility at the same time;
  • Table is recommended for formatting data;
  • Table should be centered using the way it is done in default template;
  • Vertical centering is not a very simple thing. Default template uses workaround - rows (having class "space1" and "space2") with fixed height for this reason.
  • Images are not be printed by default. To show images in printable form, width and display attributes must be explicitly specified for image, i.e., you must write <img src="url_to_image.jpg" style="display: inline; width: auto" />