5. Something Useful

Special Variables

There are some special variables in qEngine:

  • In UI:
    • $login, user login status.
    • $current_user_id
    • $current_user_level, not used in default qE installation, as there is no user level required in qE. But you can set from 1 to 5, where 5 should have most privilages.
    • $outline_tpl_mode, while not really special, usually this variable used to switch mode in outline.tpl by using BEGINIF (read more in BEGINIF document).
  • In ACP:
    • $current_admin_id
    • $current_admin_level, also not really used in default qE. But admin level 5 should be kept by site owner, since this level has the most privalages, including site configuration. For daily administration, please use level 4.
  • General:
    • $txt (array), contains some information, and used by flush_tpl () function.
    • $config (array), contains all configuration settings.
    • $lang (array), contains all language variables (see includes/lang.php). A special thing about $lang is that you can use the array keys in lang directly in skin files. Eg, if you set $lang['l_name'], then you can use it directly in any .tpl files by using {$l_name}.

Output Mode

There are several type of output:

  • Normal in UI, use: flush_tpl (); at the end of the code.
  • Popup in UI, use: flush_tpl ('popup');
  • Normal in ACP, use: flush_tpl ('adm');
  • Popup in ACP, use: flush_tpl ('adm_popup');
  • Printer friendly version, use: flush_tpl ('print');

There is no comment. Why not be the first?

More Comments/Post Your Own

Advertisement

Online Users

There are 120 users online.

Connect

Connect with us on Facebook

Newsletter

Subscribe to our newsletter for the latest updates and exciting promotions!