summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 06:10:37 +0000
committerbitweaver.org <bitweaver@users.sourceforge.net>2005-06-19 06:10:37 +0000
commit7a60287675715612fae9e9fe3e53bb3ea94f70a1 (patch)
tree1fd007f0f6356a9c5358ec3c22fab5b665097a09 /modules
downloadthemes-7a60287675715612fae9e9fe3e53bb3ea94f70a1.tar.gz
themes-7a60287675715612fae9e9fe3e53bb3ea94f70a1.tar.bz2
themes-7a60287675715612fae9e9fe3e53bb3ea94f70a1.zip
IMPORT TikiPro CLYDE FINAL
Diffstat (limited to 'modules')
-rw-r--r--modules/index.php6
-rw-r--r--modules/mod_switch_theme.php26
-rw-r--r--modules/mod_switch_theme.tpl13
3 files changed, 45 insertions, 0 deletions
diff --git a/modules/index.php b/modules/index.php
new file mode 100644
index 0000000..3e305fe
--- /dev/null
+++ b/modules/index.php
@@ -0,0 +1,6 @@
+<?php
+
+ // This is not a package.
+ header ("location: ../index.php");
+
+?> \ No newline at end of file
diff --git a/modules/mod_switch_theme.php b/modules/mod_switch_theme.php
new file mode 100644
index 0000000..bc42762
--- /dev/null
+++ b/modules/mod_switch_theme.php
@@ -0,0 +1,26 @@
+<?php
+require_once(THEMES_PKG_PATH."theme_control_lib.php");
+
+$change_theme = $gBitSystem->getPreference('feature_user_theme');
+$smarty->assign('change_theme', $change_theme);
+$style = $gBitSystem->getStyle();
+
+if( $change_theme == 'y' ) {
+ if (isset($_COOKIE['tiki-theme'])) {
+ $style = $_COOKIE['tiki-theme'];
+ }
+ if ($gBitUser->isValid() && $gBitSystem->getPreference('feature_userPreferences') == 'y') {
+ $userStyle = $gBitUser->getPreference('theme');
+ $style = empty($userStyle) ? $style : $userStyle;
+ }
+
+ global $tcontrollib;
+
+ $stylesList = $tcontrollib->getStyles();
+
+ $smarty->assign('styleslist',$stylesList);
+ if(isset($style)){
+ $smarty->assign('style', $style);
+ }
+}
+?>
diff --git a/modules/mod_switch_theme.tpl b/modules/mod_switch_theme.tpl
new file mode 100644
index 0000000..cc09dea
--- /dev/null
+++ b/modules/mod_switch_theme.tpl
@@ -0,0 +1,13 @@
+{bitmodule title="$moduleTitle" name="switch_theme"}
+ {if $change_theme eq 'y'}
+ {form method="get" ipackage=themes ifile="switch_theme.php"}
+ <select name="theme" onchange="this.form.submit();">
+ {section name=ix loop=$styleslist}
+ <option value="{$styleslist[ix]}"{if $styleslist[ix] == $style} selected="selected"{/if}>{$styleslist[ix]}</option>
+ {/section}
+ </select>
+ {/form}
+ {else}
+ {tr}Your administrator has disabled this feature{/tr}
+ {/if}
+{/bitmodule}