Project-specific preferences

You can provide users with a set of project-specific preferences, controlled via a web interface. These preferences are stored in XML, in a field of the user table. The code related to project-specific preferences is in html/project/ When you create your project, this is initialized to sample code.

The sample code contains a number of preferences that you can enable by setting the corresponding constant to true in your html/project/

  • APP_SELECT_PREFS: Application selection: users can select which of your applications they will be sent work for.
  • MAX_JOBS_PREFS: users can limit the number of this project's jobs in progress
  • MAX_CPUS_PREFS: users can limit the number of CPUs used by this project.
  • NON_GRAPHICAL_PREF: users can choose to run non-graphical versions of apps if available.
  • COLOR_PREFS: let the user select a color scheme for your application graphics. (On the client, the XML is passed to your applications in the APP_INIT_DATA structure; your graphics app can parse this and changes it colors accordingly).
  • GFX_CPU_PREFS: the user can limit the % of CPU used by the graphics app.

To create your own project-specific preferences, edit this file (and keep it under version control somewhere). The functions you must supply are:

  • project_specific_prefs_default()
  • project_specific_prefs_edit()
  • project_specific_prefs_parse_form()
  • project_specific_prefs_show()
  • project_specific_prefs_parse()

The sample code provides a working example.

Last modified 5 years ago Last modified on Dec 19, 2016, 3:46:31 PM