Each competition hosted with Avogadro has its own set of Smarty templates to govern the look and feel of the competition. Only competition organizers have permission to modify these files, via FTP. The Smarty templates only control how the output data looks, so have no fear of changing the data through modifications to these templates.
The basic setup of templates that is created for each competition by default includes:
These two files form the backbone of all pages, and likely won't need to be modified to suit your competition. These pages create the standard HTML header and footer code needed to display the page and link everything together
These three files are the default landing pages to the three main sections of the competition site. These pages generally hold descriptive text as to what to find inside the sections.
The following template files are required to exist, but this section is unique that if a custom template is created with a name like “public_foobar.tpl”, it can be accessed with a URL like 'http://avogadro.ws/hosted/[INSTANCE_NAME]/public/foobar'.
public_events: is given an 'events' variable with information about all the events in the system. Each event in the 'events' variable has the following properties: 'id', 'name', 'group_name', 'description'.
public_results-list: can make a call to insert 'results_list' to create the overall results table
public_results-school: can make a call to insert 'results_school' to create the results for a particular school
public_results-event: can make a call to insert 'results_event' to create the results for a particular event
comp_schools-list: can call to insert 'schools_list' to create a listing of all schools
comp_school-detail: can call to insert 'school_detail', 'school_extended_detail', and 'school_events' to edit an existing school's data
comp_school-new: can call to insert 'school_detail' to create a new school's entry form
comp_teams-list: can call to insert 'teams_list' to create a listing of all schools
comp_team-detail: can call to insert 'team_detail' to create a form showing all the members of a single team
comp_team-indv: can call to insert 'teammate_detail' to create a form to edit a single team member
comp_events-list: can call to insert 'events_list' to create a listing of all events
comp_event-raw: can call to insert 'event_raw' to create a form for entering raw scores
comp_event-final: can call to insert 'event_final' to create a form for entering final scores
admin_events: can call to insert 'event_groups_table', 'event_entries_table', and 'events_table' to show various event-editing forms
admin_status: can call to insert 'config_table' to show a
configuration editing form
admin_users: can call to insert 'user_perms_table' and 'add_user_table' to edit
user access configurations
admin_console: accesses various statistical information to give administrators a view of where current activity is happening.
Several variables are used the control the output of the page, and can be modified via the ”{assign}” Smarty tag within the templates for each individual competition.
Other variables are provided by the Avogadro engine and are available to use on all pages:
avgo_root: This variable holds the path back to the root of the Avogadro install, relative to the
URL the visitor currently is visiting
comp_root: The path to the root of the current instance's web folder; same as ”{$avgo_root}hosted/{$comp_data.short_name}/”
comp_data: An array of variables about the Avogadro instance currently being accessed
id: The ID number of this instance
short_name: The abbreviated name of this instance (usually used in the
URL to access this instance)
full_name: The name of this instance
core: The version number of the engine core this instance is running.
configs: Holds preferences for this instance of Avogadro
set by the
organizers of the Instance
coach_access: '1' if
coaches currently have access to edit their own school information, otherwise '0'
docs_prefix:
URL prefix to put before links to documentation. Defaults to ”http://docs.avogadro.ws”
judging_state: '1' if judging is not complete, otherwise '0'
scoring_mode: holds the name of the scoring model used for this instance: 'national' or 'small'
user: This contains information about the currently logged-in user
anonymous: ID number of the 'anonymous' user; useful to compare to $user.id to see if the user is logged in or not.