From f29775143763606a725565db941e5bfd1acbaaba Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sat, 5 May 2012 20:01:38 +0200 Subject: diabook-theme: can now set the twitter search term in theme-settings & small fixes --- view/theme/diabook/theme.php | 87 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 20 deletions(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index f8fdeb8b1..aef74519f 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -48,7 +48,7 @@ if ($color=="pink") $color_path = "/diabook-pink/"; if ($color=="green") $color_path = "/diabook-green/"; if ($color=="dark") $color_path = "/diabook-dark/"; - + //profile_side at networkpages if ($a->argv[0] === "network" && local_user()){ @@ -80,9 +80,9 @@ if ($color=="dark") $color_path = "/diabook-dark/"; } - $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_profiles'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_twitter'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes']; + $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_mapquery'] + $_COOKIE['close_profiles'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_twitter'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes']; - if($ccCookie != "9") { + if($ccCookie != "10") { // COMMUNITY diabook_community_info(); @@ -96,7 +96,7 @@ if ($color=="dark") $color_path = "/diabook-dark/"; //right_aside at profile pages if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){ - if($ccCookie != "9") { + if($ccCookie != "10") { // COMMUNITY diabook_community_info(); @@ -128,29 +128,65 @@ if ($color=="dark") $color_path = "/diabook-dark/"; $a->page['htmlhead'] .= sprintf('', $twitterJS); } + //load jquery.mapquery.js + $_COOKIE['close_mapquery'] = "1"; + if($_COOKIE['close_mapquery'] != "1") { + $mapqueryJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.core.js"; + $a->page['htmlhead'] .= sprintf('', $mapqueryJS); + $openlayersJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/OpenLayers.js"; + $a->page['htmlhead'] .= sprintf('', $openlayersJS); + $qlayersJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqLayerControl.js"; + $a->page['htmlhead'] .= sprintf('', $mqlayersJS); + + } + $a->page['htmlhead'] .= ' '; - + //check if mapquerybox is active and print + $_COOKIE['close_mapquery'] = "1"; + if($_COOKIE['close_mapquery'] != "1") { + $a->page['htmlhead'] .= ' + '; + } //check if twitterbox is active and print if($_COOKIE['close_twitter'] != "1") { + $TSearchTerm=false; + $site_TSearchTerm = get_config("diabook", "TSearchTerm" ); + $TSearchTerm = get_pconfig(local_user(), "diabook", "TSearchTerm"); + if ($TSearchTerm===false) $TSearchTerm=$site_TSearchTerm; + if ($TSearchTerm===false) $TSearchTerm="friendica"; $a->page['htmlhead'] .= '