User Manager/Voucher template: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
m (markup fix)
 
mNo edit summary
Line 12: Line 12:


* Vouchers can be generated in [[User Manager/Customer page #Users | user section]].
* Vouchers can be generated in [[User Manager/Customer page #Users | user section]].
'''
 
Recommendations:'''
'''Recommendations:'''


* If basic knowledge of [http://en.wikipedia.org/wiki/HTML HTML] and [http://en.wikipedia.org/wiki/Cascading_Style_Sheets 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;
* If basic knowledge of [http://en.wikipedia.org/wiki/HTML HTML] and [http://en.wikipedia.org/wiki/Cascading_Style_Sheets 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;

Revision as of 09:05, 26 February 2007

  • 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" />