diff --git a/view/theme/diabook-blue/communityhome.tpl b/view/theme/diabook-blue/communityhome.tpl index 748e6d077..1e3da2199 100755 --- a/view/theme/diabook-blue/communityhome.tpl +++ b/view/theme/diabook-blue/communityhome.tpl @@ -1,17 +1,22 @@ +
{{ if $page }}
$page
{{ endif }} +
+
{{ if $lastusers_title }} -

Help or @NewHere ?

+

Help or @NewHere ?

Friendica Support
Let's talk
Local Friendica NewHere {{ endif }} +
+
{{ if $lastusers_title }} -

Connectable Services

+

Connectable Services

Facebook StatusNet @@ -23,28 +28,36 @@ E-Mail
{{ endif }} +
+
{{ if $nv }} -

Find Friends

+

Find Friends

$nv.directory.1
$nv.match.1
$nv.suggest.1 $nv.invite.1 {{ endif }} +
+
{{ if $lastusers_title }} -

PostIt to Friendica

+

PostIt to Friendica

Post to Friendica from anywhere by bookmarking the Link.
{{ endif }} +
+
{{ if $lastusers_title }} -

$lastusers_title

+

$lastusers_title

{{ for $lastusers_items as $i }} $i {{ endfor }}
{{ endif }} +
+ {{ if $activeusers_title }}

$activeusers_title

@@ -55,21 +68,24 @@ {{ endif }} +
{{ if $photos_title }} -

$photos_title

+

$photos_title

{{ for $photos_items as $i }} $i {{ endfor }}
{{ endif }} +
- +
{{ if $like_title }} -

$like_title

+

$like_title

{{ endif }} +
diff --git a/view/theme/diabook-blue/icons/close_box.png b/view/theme/diabook-blue/icons/close_box.png new file mode 100755 index 000000000..28e2675b8 Binary files /dev/null and b/view/theme/diabook-blue/icons/close_box.png differ diff --git a/view/theme/diabook-blue/js/jquery.cookie.js b/view/theme/diabook-blue/js/jquery.cookie.js new file mode 100644 index 000000000..6d5974a2c --- /dev/null +++ b/view/theme/diabook-blue/js/jquery.cookie.js @@ -0,0 +1,47 @@ +/*! + * jQuery Cookie Plugin + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2011, Klaus Hartl + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://www.opensource.org/licenses/mit-license.php + * http://www.opensource.org/licenses/GPL-2.0 + */ +(function($) { + $.cookie = function(key, value, options) { + + // key and at least value given, set cookie... + if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { + options = $.extend({}, options); + + if (value === null || value === undefined) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // key and possibly options given, get cookie... + options = value || {}; + var decode = options.raw ? function(s) { return s; } : decodeURIComponent; + + var pairs = document.cookie.split('; '); + for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { + if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined + } + return null; + }; +})(jQuery); diff --git a/view/theme/diabook-blue/style-network.css b/view/theme/diabook-blue/style-network.css index d0bcd3209..ebf4da695 100644 --- a/view/theme/diabook-blue/style-network.css +++ b/view/theme/diabook-blue/style-network.css @@ -1174,8 +1174,8 @@ body .pageheader{ right_aside { display: table-cell; vertical-align: top; - width: 160px; - padding-right: 10px; + width: 170px; + /*border-left: 1px solid #D2D2D2;*/ /* background: #F1F1F1; */ @@ -1192,6 +1192,13 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow: right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; } #page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;} #page-sidebar-right_aside ul {margin-top: 0px;} +right_aside .icon {width: 10px; height: 10px;} +.close_box { + background-image: url("../../../view/theme/diabook-blue/icons/close_box.png"); + float: right; + cursor: pointer; + } + /* wall item */ .tread-wrapper { border-bottom: 1px solid #D2D2D2; diff --git a/view/theme/diabook-blue/style-profile.css b/view/theme/diabook-blue/style-profile.css index 1296f1647..db172dcda 100644 --- a/view/theme/diabook-blue/style-profile.css +++ b/view/theme/diabook-blue/style-profile.css @@ -1173,8 +1173,8 @@ body .pageheader{ right_aside { display: table-cell; vertical-align: top; - width: 160px; - padding-right: 10px; + width: 170px; + /*padding-right: 10px;*/ /*border-left: 1px solid #D2D2D2;*/ /* background: #F1F1F1; */ @@ -1191,6 +1191,12 @@ right_aside #lastusers-wrapper { padding-left: 6px; padding-top: 3px; overflow: right_aside #ra-photos-wrapper { padding-left: 5px; padding-top: 3px; overflow: auto; width: 100%; } #page-sidebar-right_aside{margin-top: 0px; margin-bottom: 30px;} #page-sidebar-right_aside ul {margin-top: 0px;} +right_aside .icon {width: 10px; height: 10px;} +.close_box { + background-image: url("../../../view/theme/diabook-blue/icons/close_box.png"); + float: right; + cursor: pointer; + } /* wall item */ .tread-wrapper { border-bottom: 1px solid #D2D2D2; diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index e12d940aa..3e35144de 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -147,9 +147,10 @@ function diabook_blue_community_info(){ $aside['$nv'] = $nv; }; //Community Page + if(local_user()) { $page = '
-

'.t("Community Pages").'

+

'.t("Community Pages").'

'; - if (sizeof($contacts) > 0) + //if (sizeof($contacts) > 0) $aside['$page'] = $page; - + } //END Community Page @@ -222,31 +223,39 @@ if ($a->argv[0] === "network" && local_user()){ } + $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_postit'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes']; + + if($ccCookie != "8") { // COMMUNITY diabook_blue_community_info(); // CUSTOM CSS $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network.css"; - + } } //right_aside at profile pages if ($a->argv[0] === "profile"){ - + if($ccCookie != "8") { // COMMUNITY diabook_blue_community_info(); // CUSTOM CSS $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile.css"; - + } } // custom css if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('', $cssFile); +//load jquery.cookie.js +$cookieJS = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.cookie.js"; +$a->page['htmlhead'] .= sprintf(' + + + + + EOT; diff --git a/view/theme/diabook/communityhome.tpl b/view/theme/diabook/communityhome.tpl index 7e50423ce..a14705ed7 100755 --- a/view/theme/diabook/communityhome.tpl +++ b/view/theme/diabook/communityhome.tpl @@ -1,17 +1,22 @@ +
{{ if $page }}
$page
{{ endif }} +
+
{{ if $lastusers_title }} -

Help or @NewHere ?

+

Help or @NewHere ?

Friendica Support
Let's talk
-Local Friendica +Local Friendica
NewHere {{ endif }} +
+
{{ if $lastusers_title }} -

Connectable Services

+

Connectable Services

Facebook StatusNet @@ -23,28 +28,35 @@ E-Mail
{{ endif }} +
+
{{ if $nv }} -

Find Friends

+

Find Friends

$nv.directory.1
$nv.match.1
$nv.suggest.1 $nv.invite.1 {{ endif }} +
+
{{ if $lastusers_title }} -

PostIt to Friendica

+

PostIt to Friendica

Post to Friendica from anywhere by bookmarking this Link.
{{ endif }} +
+
{{ if $lastusers_title }} -

$lastusers_title

+

$lastusers_title

{{ for $lastusers_items as $i }} $i {{ endfor }}
{{ endif }} +
{{ if $activeusers_title }}

$activeusers_title

@@ -55,20 +67,24 @@ {{ endif }} +
{{ if $photos_title }} -

$photos_title

+

$photos_title

{{ for $photos_items as $i }} $i {{ endfor }}
{{ endif }} +
+
{{ if $like_title }} -

$like_title

+

$like_title

{{ endif }} +
diff --git a/view/theme/diabook/icons/close_box.png b/view/theme/diabook/icons/close_box.png new file mode 100755 index 000000000..28e2675b8 Binary files /dev/null and b/view/theme/diabook/icons/close_box.png differ diff --git a/view/theme/diabook/js/jquery.cookie.js b/view/theme/diabook/js/jquery.cookie.js new file mode 100644 index 000000000..6d5974a2c --- /dev/null +++ b/view/theme/diabook/js/jquery.cookie.js @@ -0,0 +1,47 @@ +/*! + * jQuery Cookie Plugin + * https://github.com/carhartl/jquery-cookie + * + * Copyright 2011, Klaus Hartl + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://www.opensource.org/licenses/mit-license.php + * http://www.opensource.org/licenses/GPL-2.0 + */ +(function($) { + $.cookie = function(key, value, options) { + + // key and at least value given, set cookie... + if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { + options = $.extend({}, options); + + if (value === null || value === undefined) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // key and possibly options given, get cookie... + options = value || {}; + var decode = options.raw ? function(s) { return s; } : decodeURIComponent; + + var pairs = document.cookie.split('; '); + for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { + if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined + } + return null; + }; +})(jQuery); diff --git a/view/theme/diabook/nav.tpl b/view/theme/diabook/nav.tpl index 5776b6cf7..9acf1032c 100644 --- a/view/theme/diabook/nav.tpl +++ b/view/theme/diabook/nav.tpl @@ -68,13 +68,11 @@ {{ if $nav.help }}
  • $nav.help.1
  • {{ endif }} - -
  • $nav.community.1
  • - -
  • $nav.search.1
  • Info/Impressum
  • + +
  • Restore right-hand column
  • {{ if $nav.settings }}
  • $nav.settings.1
  • {{ endif }} {{ if $nav.admin }}
  • $nav.admin.1
  • {{ endif }} diff --git a/view/theme/diabook/profile_side.tpl b/view/theme/diabook/profile_side.tpl index fc949639e..0762dbe44 100644 --- a/view/theme/diabook/profile_side.tpl +++ b/view/theme/diabook/profile_side.tpl @@ -9,7 +9,7 @@