aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook/theme.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-05 17:54:19 -0700
committerfriendica <info@friendica.com>2012-05-05 17:54:19 -0700
commit47c3b43afd64cd1c05b67d347fb1219c42fe6d20 (patch)
tree9b3f2ae85a81c7983f6595679a370fc5a6815f1e /view/theme/diabook/theme.php
parent49ccefd6c7add622ba84c72769a68d08ef043ef5 (diff)
parente1ab3a93cc450ca52c7651ecca8cad8334e5f1ce (diff)
downloadvolse-hubzilla-47c3b43afd64cd1c05b67d347fb1219c42fe6d20.tar.gz
volse-hubzilla-47c3b43afd64cd1c05b67d347fb1219c42fe6d20.tar.bz2
volse-hubzilla-47c3b43afd64cd1c05b67d347fb1219c42fe6d20.zip
Merge https://github.com/friendica/friendica into pull
Diffstat (limited to 'view/theme/diabook/theme.php')
-rwxr-xr-xview/theme/diabook/theme.php111
1 files changed, 88 insertions, 23 deletions
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index f8fdeb8b1..2880df2d5 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,36 +128,74 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $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('<script language="JavaScript" src="%s" ></script>', $mapqueryJS);
+ $openlayersJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/OpenLayers.js";
+ $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $openlayersJS);
+ $qlayersJS = $a->get_baseurl($ssl_state)."/view/theme/diabook/js/jquery.mapquery.mqLayerControl.js";
+ $a->page['htmlhead'] .= sprintf('<script language="JavaScript" src="%s" ></script>', $mqlayersJS);
+
+ }
+
$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;");}} );
});
$(window).load(function() {
var footer_top = $(document).height() - 30;
$("div#footerbox").attr("style", "border-top: 1px solid #D2D2D2; width: 70%;right: 15%;position: absolute;top:"+footer_top+"px;");
});
-
-
-
</script>';
-
+ //check if mapquerybox is active and print
+ $_COOKIE['close_mapquery'] = "1";
+ if($_COOKIE['close_mapquery'] != "1") {
+ $a->page['htmlhead'] .= '
+ <script>
+
+ $(document).ready(function() {
+ $("#map").mapQuery({
+ layers:[{ //add layers to your map; you need to define at least one to be able to see anything on the map
+ type:"osm" //add a layer of the type osm (OpenStreetMap)
+ }]
+ });
+ $("#map2").mapQuery({
+ layers:[{ //add layers to your map; you need to define at least one to be able to see anything on the map
+ type:"osm" //add a layer of the type osm (OpenStreetMap)
+ }]
+ });
+
+ });
+
+ </script>';
+ }
//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'] .= '
<script>
$(function() {
$("#twitter").twitterSearch({
- term: "friendica",
+ term: "'.$TSearchTerm.'",
animInSpeed: 250,
bird: false,
avatar: false,
colorExterior: "#fff",
- title: "Last Tweets",
timeout: 10000 });
});
+ function open_twittersettings() {
+ $("div#twittersettings").attr("style","display: block;");
+ };
</script>';}
//check if community_home-plugin is activated and change css
@@ -187,6 +225,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
<script>
function restore_boxes(){
$.cookie("close_pages","2", { expires: 365, path: "/" });
+ $.cookie("close_mapquery","2", { expires: 365, path: "/" });
$.cookie("close_helpers","2", { expires: 365, path: "/" });
$.cookie("close_profiles","2", { expires: 365, path: "/" });
$.cookie("close_services","2", { expires: 365, path: "/" });
@@ -219,6 +258,11 @@ if ($color=="dark") $color_path = "/diabook-dark/";
document.getElementById( "close_pages" ).style.display = "none";
};
+ if($.cookie("close_mapquery") == "1")
+ {
+ document.getElementById( "close_mapquery" ).style.display = "none";
+ };
+
if($.cookie("close_profiles") == "1")
{
document.getElementById( "close_profiles" ).style.display = "none";
@@ -241,7 +285,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
if($.cookie("close_twitter") == "1")
{
- document.getElementById( "twitter" ).style.display = "none";
+ document.getElementById( "close_twitter" ).style.display = "none";
};
if($.cookie("close_lastusers") == "1")
@@ -265,6 +309,11 @@ if ($color=="dark") $color_path = "/diabook-dark/";
document.getElementById( "close_pages" ).style.display = "none";
$.cookie("close_pages","1", { expires: 365, path: "/" });
};
+
+ function close_mapquery(){
+ document.getElementById( "close_mapquery" ).style.display = "none";
+ $.cookie("close_mapquery","1", { expires: 365, path: "/" });
+ };
function close_profiles(){
document.getElementById( "close_profiles" ).style.display = "none";
@@ -287,7 +336,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
};
function close_twitter(){
- document.getElementById( "twitter" ).style.display = "none";
+ document.getElementById( "close_twitter" ).style.display = "none";
$.cookie("close_twitter","1", { expires: 365, path: "/" });
};
@@ -509,6 +558,15 @@ if ($color=="dark") $color_path = "/diabook-dark/";
}}
//END Community Page
+ //mapquery
+ $_COOKIE['close_mapquery'] = "1";
+ if($_COOKIE['close_mapquery'] != "1") {
+ $mapquery = array();
+ $mapquery['title'] = Array("", t('Earth View'), "", "");
+ $aside['$mapquery'] = $mapquery;
+ }
+ //end mapquery
+
//helpers
if($_COOKIE['close_helpers'] != "1") {
$helpers = array();
@@ -523,6 +581,23 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$aside['$con_services'] = $con_services;
}
//end connectable services
+ //twitter
+ if($_COOKIE['close_twitter'] != "1") {
+ $twitter = array();
+ $twitter['title'] = Array("", "<a id='twittersettings-link' href='#twittersettings' style='text-decoration:none;' onclick='open_twittersettings(); return false;'>".t('Last Tweets')."</a>", "", "");
+ $aside['$twitter'] = $twitter;
+ $TSearchTerm = get_pconfig(local_user(), 'diabook', 'TSearchTerm' );
+ $aside['$submit'] = t('Submit');
+ $aside['$TSearchTerm'] = array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm);
+ $baseurl = $a->get_baseurl();
+ $aside['$baseurl'] = $baseurl;
+ if (isset($_POST['diabook-settings-submit'])){
+ set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']);
+ }
+ }
+ //end twitter
+ $close = t('Close');
+ $aside['$close'] = $close;
//get_baseurl
$url = $a->get_baseurl($ssl_state);
$aside['$url'] = $url;
@@ -542,14 +617,4 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$a->page['footer'] = $a->page['footer'].replace_macros($tpl, $bottom);
}
-
-
-
-
-
-
-
-
-
-
-
+