Tabbed interfaces.

Tabbed interfaces.

by Williams Castillo -
Number of replies: 0

Hi,

I just want to let you know that I've create a couple of function that, although they are not the best PHP functions in the world, they could save a lot of work when creating tabbed interfaces like the one used in Workshop and, now glossary.

They are:

print_tabbed_table_start($data, $CurrentTab, $tTHEME = NULL)
print_tabbed_table_end()

$data is an array of at least two fields: link and caption They are used to set the caption and link of each tab. Each record is a tab.

$CurrentTab specify which tab is the current one.

$tTHEME is an optional array that controls the look of the tabbed table:

$tTHEME->TabTableBGColor  => Background of the table. The main color so to speak.
$tTHEME->TabTableWidth => Maximum width of the table.
$tTHEME->ActiveTabColor => Color of the active tab of the table.
$tTHEME->InactiveTabColor => Color of the inactive tabs of the table.
$tTHEME->TabsPerRow => Pretty self explanatory, isn't it?
$tTHEME->TabSeparation => Idem. In pixels.

if $tTHEME is not passed to the function, it will use the global $THEME variable, although this values should be setted in the config.php of the current theme.

I hope this helps someone! This functions are located in moodle/mod/glossary/lib.php

Regards,
Will

Average of ratings: -