aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php1
-rw-r--r--index.php5
-rw-r--r--view/theme/darkzero-NS/theme.php2
-rw-r--r--view/theme/darkzero/theme.php2
-rw-r--r--view/theme/duepuntozero/theme.php2
-rw-r--r--view/theme/greenzero/theme.php2
-rw-r--r--view/theme/purplezero/theme.php2
-rw-r--r--view/theme/slack-NS/theme.php2
-rw-r--r--view/theme/slackr/theme.php2
9 files changed, 20 insertions, 0 deletions
diff --git a/boot.php b/boot.php
index 45ac155b9..b1c378d34 100644
--- a/boot.php
+++ b/boot.php
@@ -922,6 +922,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
/**
* load/reload current theme info
*/
+
$theme_info_file = "view/theme/".current_theme()."/theme.php";
if (file_exists($theme_info_file)){
require_once($theme_info_file);
diff --git a/index.php b/index.php
index e7227962f..69c224c1a 100644
--- a/index.php
+++ b/index.php
@@ -258,6 +258,11 @@ if($a->module_loaded) {
$func($a);
}
+ if(function_exists(str_replace('-','_',current_theme()) . '_init')) {
+ $func = str_replace('-','_',current_theme()) . '_init';
+ $func($a);
+ }
+
if(($_SERVER['REQUEST_METHOD'] === 'POST') && (! $a->error)
&& (function_exists($a->module . '_post'))
&& (! x($_POST,'auth-params'))) {
diff --git a/view/theme/darkzero-NS/theme.php b/view/theme/darkzero-NS/theme.php
index 2d3e4fd56..6c1aa7f12 100644
--- a/view/theme/darkzero-NS/theme.php
+++ b/view/theme/darkzero-NS/theme.php
@@ -11,6 +11,7 @@ $a->theme_info = array(
'extends' => 'duepuntozero',
);
+function darkzero_NS_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
@@ -57,3 +58,4 @@ $('.savedsearchterm').hover(
</script>
EOT;
+} \ No newline at end of file
diff --git a/view/theme/darkzero/theme.php b/view/theme/darkzero/theme.php
index 8c4d3e9ac..bbba3ef74 100644
--- a/view/theme/darkzero/theme.php
+++ b/view/theme/darkzero/theme.php
@@ -12,6 +12,7 @@ $a->theme_info = array(
'extends' => 'duepuntozero',
);
+function darkzero_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
@@ -58,3 +59,4 @@ $('.savedsearchterm').hover(
</script>
EOT;
+} \ No newline at end of file
diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php
index 701fb1349..7b42088e1 100644
--- a/view/theme/duepuntozero/theme.php
+++ b/view/theme/duepuntozero/theme.php
@@ -1,6 +1,7 @@
<?php
$a->theme_info = array();
+function duepuntozero_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
@@ -47,3 +48,4 @@ $('.savedsearchterm').hover(
</script>
EOT;
+}
diff --git a/view/theme/greenzero/theme.php b/view/theme/greenzero/theme.php
index ceec4dd97..c80202475 100644
--- a/view/theme/greenzero/theme.php
+++ b/view/theme/greenzero/theme.php
@@ -3,6 +3,7 @@ $a->theme_info = array(
'extends' => 'duepuntozero',
);
+function greenzero_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
@@ -49,3 +50,4 @@ $('.savedsearchterm').hover(
</script>
EOT;
+} \ No newline at end of file
diff --git a/view/theme/purplezero/theme.php b/view/theme/purplezero/theme.php
index ceec4dd97..b9613027c 100644
--- a/view/theme/purplezero/theme.php
+++ b/view/theme/purplezero/theme.php
@@ -3,6 +3,7 @@ $a->theme_info = array(
'extends' => 'duepuntozero',
);
+function purplezero_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
@@ -49,3 +50,4 @@ $('.savedsearchterm').hover(
</script>
EOT;
+} \ No newline at end of file
diff --git a/view/theme/slack-NS/theme.php b/view/theme/slack-NS/theme.php
index ceec4dd97..a8934d03b 100644
--- a/view/theme/slack-NS/theme.php
+++ b/view/theme/slack-NS/theme.php
@@ -3,6 +3,7 @@ $a->theme_info = array(
'extends' => 'duepuntozero',
);
+function slack_NS_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
@@ -49,3 +50,4 @@ $('.savedsearchterm').hover(
</script>
EOT;
+} \ No newline at end of file
diff --git a/view/theme/slackr/theme.php b/view/theme/slackr/theme.php
index ceec4dd97..78f5d40f0 100644
--- a/view/theme/slackr/theme.php
+++ b/view/theme/slackr/theme.php
@@ -3,6 +3,7 @@ $a->theme_info = array(
'extends' => 'duepuntozero',
);
+function slackr_init(&$a) {
$a->page['htmlhead'] .= <<< EOT
<script>
$(document).ready(function() {
@@ -49,3 +50,4 @@ $('.savedsearchterm').hover(
</script>
EOT;
+} \ No newline at end of file