X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fdiabook%2Ftheme.php;h=972ad2e7cbf224b2ab5250d40bed52033c676bbc;hb=8ec424325375aa923c7d2d78ac8ddcc352f09cff;hp=b4d7de1796e61615476f408c7910ec32d89c3210;hpb=f1c579e74a438bfab6dce15c6bbe0075084bbf68;p=friendica.git diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index b4d7de1796..972ad2e7cb 100644 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -2,13 +2,11 @@ /* * Name: Diabook - * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.027) + * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or http://bugs.friendica.com/view_all_bug_page.php + * Version: (Version: 1.028) * Author: */ -$a = get_app(); - function get_diabook_config($key, $default = false) { if (local_user()) { $result = get_pconfig(local_user(), "diabook", $key); @@ -25,8 +23,10 @@ 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)"; +$diabook_version = "Diabook (Version: 1.028)"; $a->page['htmlhead'] .= sprintf('', $diabook_version); //init css on network and profilepages @@ -36,8 +36,33 @@ $cssFile = null; load_config("diabook"); load_pconfig(local_user(), "diabook"); + +// adjust nav-bar, depending state of user +if (local_user() ) { + $a->page['htmlhead'] .= ' + '; + } + +if ($a->argv[0] == "profile" && $a->argv[1] != $a->user['nickname'] ) { + $a->page['htmlhead'] .= ' + '; + } + + //get statuses of boxes at right-hand-column -$close_pages = get_diabook_config( "close_pages", 0 ); +$close_pages = get_diabook_config( "close_pages", 1 ); $close_profiles = get_diabook_config( "close_profiles", 0 ); $close_helpers = get_diabook_config( "close_helpers", 0 ); $close_services = get_diabook_config( "close_services", 0 ); @@ -45,7 +70,6 @@ $close_friends = get_diabook_config( "close_friends", 0 ); $close_lastusers = get_diabook_config( "close_lastusers", 0 ); $close_lastphotos = get_diabook_config( "close_lastphotos", 0 ); $close_lastlikes = get_diabook_config( "close_lastlikes", 0 ); -$close_twitter = get_diabook_config( "close_twitter", 1 ); $close_mapquery = get_diabook_config( "close_mapquery", 1 ); //get resolution (wide/normal) @@ -70,6 +94,18 @@ if ($color=="pink") $color_path = "/diabook-pink/"; if ($color=="green") $color_path = "/diabook-green/"; if ($color=="dark") $color_path = "/diabook-dark/"; + // remove doubled checkboxes at contacts-edit-page + if ($a->argv[0] === "contacts" && $a->argv[1] != NULL && local_user()){ + $a->page['htmlhead'] .= ' + '; + } //build personal menue at lefthand-col (id="profile_side") and boxes at right-hand-col at networkpages if ($a->argv[0] === "network" && local_user()){ @@ -102,9 +138,9 @@ if ($color=="dark") $color_path = "/diabook-dark/"; } - $ccCookie = $close_pages + $close_mapquery + $close_profiles + $close_helpers + $close_services + $close_friends + $close_twitter + $close_lastusers + $close_lastphotos + $close_lastlikes; + $ccCookie = $close_pages + $close_mapquery + $close_profiles + $close_helpers + $close_services + $close_friends + $close_lastusers + $close_lastphotos + $close_lastlikes; //if all boxes closed, dont build right-hand-col and dont use special css - if($ccCookie != "10") { + if($ccCookie != "9") { // COMMUNITY diabook_community_info(); @@ -118,7 +154,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; //build boxes at right_aside at profile pages if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){ - if($ccCookie != "10") { + if($ccCookie != "9") { // COMMUNITY diabook_community_info(); @@ -137,17 +173,13 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.ae.image.resize.min.js"; $a->page['htmlhead'] .= sprintf('', $imageresizeJS); //load jquery.ui.js - if($ccCookie != "10") { - $jqueryuiJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery-ui-1.8.20.custom.min.js"; + if($ccCookie != "9") { + $jqueryuiJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery-ui.min.js"; $a->page['htmlhead'] .= sprintf('', $jqueryuiJS); - $jqueryuicssJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/jquery-ui-1.8.20.custom.css"; + $jqueryuicssJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/jquery-ui.min.css"; $a->page['htmlhead'] .= sprintf('', $jqueryuicssJS); } - //load jquery.twitter.search.js - if($close_twitter != "1") { - $twitterJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.twitter.search.js"; - $a->page['htmlhead'] .= sprintf('', $twitterJS); - } + //load jquery.mapquery.js if($close_mapquery != "1") { $mqtmplJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.tmpl.js"; @@ -169,10 +201,9 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a->page['htmlhead'] .= ' '; } - //check if twitterbox is active and print - if($close_twitter != "1") { - $TSearchTerm = get_diabook_config( "TSearchTerm", "friendica" ); - $a->page['htmlhead'] .= ' - ';} - + //check if community_home-plugin is activated and change css.. we need this, that the submit-wrapper doesn't overlay the login-panel if communityhome-plugin is active $nametocheck = "communityhome"; $r = q("select id from addon where name = '%s' and installed = 1", dbesc($nametocheck)); @@ -292,19 +305,19 @@ if ($color=="dark") $color_path = "/diabook-dark/"; }); '; - if($ccCookie != "10") { + if($ccCookie != "9") { $a->page['htmlhead'] .= '