aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-09 16:26:44 -0700
committerfriendica <info@friendica.com>2012-08-09 16:26:44 -0700
commit0292d46e5de06529012ebb14ce934fb476d595d0 (patch)
tree16208e490a8e2d6d90996c936c6f467533aaf612 /index.php
parent432595314affa179bdce439d6e90955cee99cd9e (diff)
downloadvolse-hubzilla-0292d46e5de06529012ebb14ce934fb476d595d0.tar.gz
volse-hubzilla-0292d46e5de06529012ebb14ce934fb476d595d0.tar.bz2
volse-hubzilla-0292d46e5de06529012ebb14ce934fb476d595d0.zip
merge comment threading, provide plugin/theme functions to handle css/js includes
Diffstat (limited to 'index.php')
-rw-r--r--index.php32
1 files changed, 12 insertions, 20 deletions
diff --git a/index.php b/index.php
index 2c545922b..02d853d06 100644
--- a/index.php
+++ b/index.php
@@ -309,26 +309,6 @@ if(stristr( implode("",$_SESSION['sysmsg']), t('Permission denied'))) {
header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));
}
-/**
- *
- * Report anything which needs to be communicated in the notification area (before the main body)
- *
- */
-
-/*if(x($_SESSION,'sysmsg')) {
- $a->page['content'] = "<div id=\"sysmsg\" class=\"error-message\">{$_SESSION['sysmsg']}</div>\r\n"
- . ((x($a->page,'content')) ? $a->page['content'] : '');
- $_SESSION['sysmsg']="";
- unset($_SESSION['sysmsg']);
-}
-if(x($_SESSION,'sysmsg_info')) {
- $a->page['content'] = "<div id=\"sysmsg_info\" class=\"info-message\">{$_SESSION['sysmsg_info']}</div>\r\n"
- . ((x($a->page,'content')) ? $a->page['content'] : '');
- $_SESSION['sysmsg_info']="";
- unset($_SESSION['sysmsg_info']);
-}*/
-
-
call_hooks('page_end', $a->page['content']);
@@ -371,6 +351,17 @@ if(! file_exists($module_css))
if(! file_exists($module_css))
$module_css = null;
+
+$module_js = 'view/theme/' . current_theme() . '/js/mod_' . $a->module . '.js';
+
+if(! file_exists($module_js))
+ $module_js = str_replace('theme/' . current_theme() . '/', '', $module_js);
+
+if(! file_exists($module_js))
+ $module_js = null;
+
+
+
$interval = ((local_user()) ? get_pconfig(local_user(),'system','update_interval') : 40000);
if($interval < 10000)
$interval = 40000;
@@ -389,6 +380,7 @@ if(! file_exists($module_css))
'$update_interval' => $interval,
'$page_css' => $a->get_baseurl() . '/' . $page_css,
'$module_css' => (($module_css) ? $a->get_baseurl() . '/' . $module_css : null),
+ '$module_js' => (($module_js) ? $a->get_baseurl() . '/' . $module_js : null),
'$stylesheet' => current_theme_url(),
'$theme' => current_theme(),