Skip to content
Jeroen edited this page Jan 11, 2016 · 2 revisions

This document aims to make the Quantiweb system as easy to understand as posible. The system functions can be used to get information fast without the need to use the db_ system. The Quantiweb system functions can be used in plugins or themes.

###system_getsetting

system_getsetting($setting);
  • $setting; The setting you want to get from the system.

Example:

<?php
  $websitename = system_getsetting("websitename");
  echo $websitename;
  //this will return the name of the website.
?>

For all possible settings see settings

###system_setsetting

system_setsetting($setting, $value);
  • $setting; String, The setting you want to change from the system.
  • $value; String, the value you want the setting to have. Example:
<?php
  system_setsetting("websitename", "another name");
  //This will change the name of the website to "another name"
?>

For all possible settings see settings

###system_newsetting

system_newsetting($setting, $defaultvalue);
  • $setting; String, The name you want to give to your setting
  • $defaultvalue; String or Integer, The value you want to give to the setting by default.

Example: We want to create a setting "background-color" and we want it to be blue at default

<?php
  $setting = "background-color";
  $defaultvalue = "blue";
  system_newsetting($setting, $defaultvalue);
?>

###settings This are all the default possibilities for system_getsetting and system_setsetting

  • websitename
  • websiteslogan
  • plugins
  • index
  • content_per_age
  • allow_registration
  • default_role
  • theme
Clone this wiki locally