]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/diabook/theme.php
Merge remote branch 'friendica/master'
[friendica.git] / view / theme / diabook / theme.php
index dbfe5a8e8c7884afdce478a467831a8231a3cc1d..050c2a0b4c1d2c56b205b1bd3812e7bc8f7695d2 100644 (file)
@@ -7,9 +7,6 @@
  * Author:
  */
 
-$a = get_app();
-$a->theme['template_engine'] = 'smarty3';
-
 function get_diabook_config($key, $default = false) {
        if (local_user()) {
                $result = get_pconfig(local_user(), "diabook", $key);
@@ -26,6 +23,8 @@ function get_diabook_config($key, $default = false) {
 
 function diabook_init(&$a) {
 
+set_template_engine($a, 'smarty3');
+
 //print diabook-version for debugging
 $diabook_version = "Diabook (Version: 1.027)";
 $a->page['htmlhead'] .= sprintf('<META NAME=generator CONTENT="%s"/>', $diabook_version);
@@ -170,10 +169,10 @@ if ($color=="dark") $color_path = "/diabook-dark/";
        $a->page['htmlhead'] .= '
        <script>
         $(function() {
-               $("a.lightbox").fancybox(); // Select all links with lightbox class
-               $("a#twittersettings-link").fancybox({onClosed: function() { $("#twittersettings").attr("style","display: none;");}} );
-          $("a#mapcontrol-link").fancybox({onClosed: function() { $("#mapcontrol").attr("style","display: none;");}} );
-          $("a#closeicon").fancybox({onClosed: function() { $("#boxsettings").attr("style","display: none;");}} );
+               $("a.lightbox").colorbox({maxHeight:"90%"}); // Select all links with lightbox class
+               $("a#twittersettings-link").colorbox({inline:true,onClosed: function() { $("#twittersettings").attr("style","display: none;");}} );
+               $("a#mapcontrol-link").colorbox({inline:true,onClosed: function() { $("#mapcontrol").attr("style","display: none;");}} );
+               $("a#closeicon").colorbox({inline:true,onClosed: function() { $("#boxsettings").attr("style","display: none;");}} );
                });
 
         $(window).load(function() {
@@ -393,9 +392,9 @@ if ($color=="dark") $color_path = "/diabook-dark/";
                        $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
                        $entry = replace_macros($tpl,array(
                                '$id' => $rr['id'],
-                               '$profile-link' => zrl($rr['url']),
+                               '$profile_link' => zrl($rr['url']),
                                '$photo' => $rr[$photo],
-                               '$alt-text' => $rr['name'],
+                               '$alt_text' => $rr['name'],
                        ));
                        $aside['$comunity_profiles_items'][] = $entry;
                }
@@ -422,9 +421,9 @@ if ($color=="dark") $color_path = "/diabook-dark/";
                        $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
                        $entry = replace_macros($tpl,array(
                                '$id' => $rr['id'],
-                               '$profile-link' => $profile_link,
+                               '$profile_link' => $profile_link,
                                '$photo' => $a->get_cached_avatar_image($rr[$photo]),
-                               '$alt-text' => $rr['name'],
+                               '$alt_text' => $rr['name'],
                        ));
                        $aside['$lastusers_items'][] = $entry;
                }
@@ -501,9 +500,9 @@ if ($color=="dark") $color_path = "/diabook-dark/";
 
                        $entry = replace_macros($tpl,array(
                                '$id' => $rr['id'],
-                               '$profile-link' => $photo_page,
+                               '$profile_link' => $photo_page,
                                '$photo' => $photo_url,
-                               '$alt-text' => $rr['username']." : ".$rr['desc'],
+                               '$alt_text' => $rr['username']." : ".$rr['desc'],
                        ));
 
                        $aside['$photos_items'][] = $entry;
@@ -656,21 +655,16 @@ if ($color=="dark") $color_path = "/diabook-dark/";
                set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']);
                }
        }
-   $close = t('Settings');
-   $aside['$close'] = $close;
-   //get_baseurl
-   $url = $a->get_baseurl($ssl_state);
-   $aside['$url'] = $url;
-       //print right_aside
-       $tpl = get_markup_template('communityhome.tpl');
+       $close = t('Settings');
+       $aside['$close'] = $close;
 
-       $includes = array(
-               '$field_select' => 'field_select.tpl',
-               '$field_input' => 'field_input.tpl',
-       );
-       $includes = set_template_includes($a->theme['template_engine'], $includes);
+       //get_baseurl
+       $url = $a->get_baseurl($ssl_state);
+       $aside['$url'] = $url;
 
-       $a->page['right_aside'] = replace_macros($tpl, $includes + $aside);
+       //print right_aside
+       $tpl = get_markup_template('communityhome.tpl');
+       $a->page['right_aside'] = replace_macros($tpl, $aside);
 
  }