Class ThemeSophia

Description

/program/themes/sophia/sophia.class.php - the class that implements the theme

Located in /program/themes/sophia/sophia.class.php (line 27)

Theme
   |
   --ThemeSophia
Method Summary
 ThemeSophia ThemeSophia ( $theme_record,  $area_id,  $node_id)
 string get_bottomline ([string $m = ''])
 string get_html ()
 string get_menu ([string $m = ''], [int $menu_id = NULL])
 string get_navigation ([string $m = ''], [bool $textonly = FALSE])
Variables
Methods
Constructor ThemeSophia (line 29)
ThemeSophia ThemeSophia ( $theme_record,  $area_id,  $node_id)
  • $theme_record
  • $area_id
  • $node_id
get_bottomline (line 208)

show footer text, maybe some quicklinks and 'powered by'

  • return: performance report
string get_bottomline ([string $m = ''])
  • string $m: left margin for increased readability

Redefinition of:
Theme::get_bottomline()
show 'powered by' and (maybe) report basic performance indicators
get_html (line 63)

construct an output page in HTML

This constructs a full HTML-page, starting at the DTD and ending with the html closing tag.

The page is constructed using nested DIVs, the layout is taken care of in a separate style sheet. All knowledge about the structure of the page is contained in this routine.

The performance of the script (# of queries, execution time) is calculated as late as possible, to catch as much as we can. Therefore the construction is done in two parts and performance is calculated last.

The contents of the various DIVs is constructed in various helper routines in order to make this routine easy to read (by humans that is). The various helper routines all are called with a string of space characters; this should improve the the readability of the page that is generated eventually.

Note that the routine $this->get_div_messages() does in fact generate its own DIV tags. This is done in order to completely get rid of the message DIV, we do not even want to see an empty DIV if there are no messages.

The same logic applies to the breadcrumb trail.

  • return: complete HTML-page, ready for output
string get_html ()

Redefinition of:
Theme::get_html()
construct an output page in HTML
get_menu (line 176)

construct the submenu starting at $menu_id OR the first breadcrumb in the top level menu

this constructs an 'infinitely' nested set of submenus, starting at $menu_id or at the first breadcrumb in the top level menu (if any). If there are no suitable nodes, an empty string is returned.

this is largely the same routine as parent::get_menu(). Difference is that here we may add a menu title to the menu IF the first item in the breadcrumb trail is a visible section

string get_menu ([string $m = ''], [int $menu_id = NULL])
  • string $m: left margin for increased readability
  • int $menu_id: indicates where to start the menu (NULL = first breadcrumb in top level menu)

Redefinition of:
Theme::get_menu()
construct the submenu starting at $menu_id OR the first breadcrumb in the top level menu
get_navigation (line 141)

construct a top level menu (navigation bar) as an unnumbered list (UL) of list items (LI)

this walks through the top level of the menu tree and creates a link for each node with a distinct class for every LI This allows for buttons in different shapes and colours.

By default the theme comes with three different shapes (see also style.css):

  • an ellipse (file: stencil0.png, 110x70)
  • a hexagon (file: stencil6.png, 110x70)
  • a drum (file: stencil8.png, 110x70)
Different colours are assigned (in style.css) by overruling the default colour using the (unique) class of each button. Look for classes "navigation_buttonN", with N=1,2,...

  • return: properly indented ready-to-use HTML
string get_navigation ([string $m = ''], [bool $textonly = FALSE])
  • string $m: left margin for increased readability
  • bool $textonly: forces a text-type link even when a navigation image is stipulated

Redefinition of:
Theme::get_navigation()
construct a top level menu (navigation bar) as an unnumbered list (UL) of list items (LI)

Inherited Methods

Inherited From Theme

 Theme::Theme()
 Theme::add_content()
 Theme::add_html_header()
 Theme::add_http_header()
 Theme::add_message()
 Theme::add_meta()
 Theme::add_meta_http_equiv()
 Theme::add_popup_bottom()
 Theme::add_popup_top()
 Theme::add_stylesheet()
 Theme::calc_breadcrumb_trail()
 Theme::construct_tree()
 Theme::dump_subtree()
 Theme::get_address()
 Theme::get_bazaar_style_style()
 Theme::get_bottomline()
 Theme::get_content()
 Theme::get_div_breadcrumbs()
 Theme::get_div_messages()
 Theme::get_html()
 Theme::get_html_head()
 Theme::get_jumpmenu()
 Theme::get_lines()
 Theme::get_logo()
 Theme::get_menu()
 Theme::get_navigation()
 Theme::get_popups()
 Theme::get_properties()
 Theme::get_quickbottom()
 Theme::get_quicklinks()
 Theme::get_quicktop()
 Theme::node2anchor()
 Theme::queue_alert()
 Theme::send_headers()
 Theme::send_output()
 Theme::set_preview_mode()
 Theme::show_tree_walk()

Documentation generated on Tue, 28 Jun 2016 19:12:03 +0200 by phpDocumentor 1.4.0