Skip to content

Latest commit

 

History

History
56 lines (48 loc) · 2.88 KB

README.md

File metadata and controls

56 lines (48 loc) · 2.88 KB

dhtmlxScheduler Joomla component

##Component structure

  • admin/ - back-end part of component
  • site/ - font-end part of component
  • install.xml - installation xml description

All scheduler logic is located in site/codebase.
It includes scheduler codebase, scheduler configurator, code generator. There are 3 main points in code:

  • initializing admin panel
    • joomla/admin/views/schedulers/tmpl/default.php - admin form initializing
    • joomla/admin/controller.php - loading/saving configuration
  • generating scheduler code
    • joomla/site/models/scheduler.php (method getScheduler())
  • processing loading/saving requests
    • joomla/site/controller.php (method loadxml())

##Database structure

  • events_rec - stores scheduler events
    • event_id - event id
    • start_date - event start date/time
    • end_date - event end date/time
    • text - event text
    • rec_type - event recurring logic
    • event_pid - parent event (for editing one event from recurring series)
    • event_length - event length (required for recurring events)
    • user - event creator/editor id
    • lat - event latitude (for map view)
    • lng - event longuitude (for map view)
  • scheduler_options - stores scheduler configuration
    • id - option id
    • name - option name
    • value - option value
      Here is a list of options:
    • scheduler_xml - scheduler xml configuration. Is used to load settings in admin panel
    • scheduler_php - parsed xml configuration and serialized into more useful form
    • scheduler_php_version - version of the last php configuration
    • scheduler_xml_version - version of the last xml configuration
    • scheduler_stable_config - last stable configuration (is used for restoring scheduler configuration after config xml error)

##Codebase details Core provides universal control panel, API for generating scheduler and events data-feed.
Logic of parsing settings may be found in codebase/dhtmlxSchedulerConfigurator.php.

For saving/parsing configuration is used the follow logic:
when user saves configuration it is saved into database.
At the same time scheduler_xml_version (have a look database structure) is increased.
When user opens scheduler then configurators compare scheduler_xml_version and scheduler_php_version.
If scheduler_xml_version if bigger than scheduler_php_version then it parses xml configuration and serialize it into php (scheduler_php in database).
At the same time configurator updates scheduler_php_version to actual.
If scheduler_xml_version equals scheduler_php_version than xml is already parsed and serialized php configuration may be used.

Read more about dhtmlxScheduler Joomla! component in documentation.