c. BEFORE, ADD:
-----------------------------------
// Q: Theme Switcher
if (isset($this->request->get['theme']) && $this->request->get['theme'] || isset($this->session->data['theme'])) {
$directories = glob(DIR_APPLICATION . 'view/theme/*', GLOB_ONLYDIR);
$this->session->data['theme'] = (isset($this->request->get['theme']) && $this->request->get['theme']) ? $this->request->get['theme'] : $this->session->data['theme'];
foreach ($directories as $directory) {
if ($this->session->data['theme'] == basename($directory)) {
$tmp = explode('/', $filename);
$tmp[0] = $this->session->data['theme'];
$filename2 = implode('/', $tmp);
$file2 = DIR_TEMPLATE . $filename2;
if (file_exists($file2)) {
$filename = $filename2;
}
break;
}
}
}
//
-----------------------------------