]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/duepuntozero/theme.php
Merge remote-tracking branch 'upstream/develop' into 1603-ostatus-completion
[friendica.git] / view / theme / duepuntozero / theme.php
index 189628b0287acb06e1b7e1949a177b80d303b64a..50d57f91e5759041f463284537ddcfcc1495ad9d 100644 (file)
@@ -1,7 +1,26 @@
 <?php
-$a->theme_info = array();
 
 function duepuntozero_init(&$a) {
+
+set_template_engine($a, 'smarty3');
+
+    $colorset = get_pconfig( local_user(), 'duepuntozero','colorset');
+    if (!$colorset)
+       $colorset = get_config('duepuntozero', 'colorset');          // user setting have priority, then node settings
+    if ($colorset) {
+        if ($colorset == 'greenzero')
+            $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/greenzero.css" type="text/css" media="screen" />'."\n";
+        if ($colorset == 'purplezero')
+            $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/purplezero.css" type="text/css" media="screen" />'."\n";
+        if ($colorset == 'easterbunny')
+            $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/easterbunny.css" type="text/css" media="screen" />'."\n";
+        if ($colorset == 'darkzero')
+            $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/darkzero.css" type="text/css" media="screen" />'."\n";
+        if ($colorset == 'comix')
+            $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/comix.css" type="text/css" media="screen" />'."\n";
+        if ($colorset == 'slackr')
+            $a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/slackr.css" type="text/css" media="screen" />'."\n";
+    }
 $a->page['htmlhead'] .= <<< EOT
 <script>
 function insertFormatting(comment,BBcode,id) {
@@ -42,10 +61,10 @@ function cmtBbOpen(comment, id) {
        return false;
 }
 function cmtBbClose(comment, id) {
-       if($(comment).hasClass('comment-edit-text-empty')) {
-               $(".comment-edit-bb-" + id).hide();
-               return true;
-       }
+//     if($(comment).hasClass('comment-edit-text-empty')) {
+//             $(".comment-edit-bb-" + id).hide();
+//             return true;
+//     }
        return false;
 }
 $(document).ready(function() {