From 076b1b374b864a4d45add31c72e447495dbe0339 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 2 Apr 2012 18:16:58 +0200 Subject: diabook-themes: fixes in js --- view/theme/diabook-blue/theme.php | 75 ++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 37 deletions(-) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 891c13cbf..3a1312fef 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: + * Version: (Version: 0.010) * Author: */ @@ -164,7 +164,8 @@ function diabook_blue_community_info(){ $pagelist = array(); $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` - WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", + WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d + ORDER BY `name` ASC", intval($a->user['uid']) ); @@ -316,56 +317,58 @@ $a->page['htmlhead'] .= sprintf(''; - +if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){ +$a->page['htmlhead'] .= ' - -EOT; + +function restore_boxes(){ + $.cookie("close_pages","2", { expires: 365, path: "/" }); + $.cookie("close_helpers","2", { expires: 365, path: "/" }); + $.cookie("close_services","2", { expires: 365, path: "/" }); + $.cookie("close_friends","2", { expires: 365, path: "/" }); + $.cookie("close_postit","2", { expires: 365, path: "/" }); + $.cookie("close_lastusers","2", { expires: 365, path: "/" }); + $.cookie("close_lastphotos","2", { expires: 365, path: "/" }); + $.cookie("close_lastlikes","2", { expires: 365, path: "/" }); + alert("Right-hand column was restored. Please refresh your browser"); + }; +';} -- cgit v1.2.3 From 6dfd55668f39d2cfb27d468cc982471abaad5165 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 2 Apr 2012 20:30:27 +0200 Subject: diabook-themes: css-fixes --- view/theme/diabook-blue/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 3a1312fef..19468779e 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 0.010) + * Version: (Version: 1.011) * Author: */ -- cgit v1.2.3 From 8a71191d6d45f74e200bb6e279916375c2416b05 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Tue, 3 Apr 2012 20:59:00 +0200 Subject: make right_aside translatable and provide german translation... and some css-fixes --- view/theme/diabook-blue/theme.php | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 19468779e..2e7aca92a 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.011) + * Version: (Version: 1.012) * Author: */ @@ -139,7 +139,8 @@ function diabook_blue_community_info(){ //nav FIND FRIENDS if(local_user()) { $nv = array(); - $nv['directory'] = Array('directory', t('Local').' '.t('Directory'), "", ""); + $nv['title'] = Array("", t('Find Friends'), "", ""); + $nv['directory'] = Array('directory', t('Local Directory'), "", ""); $nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", ""); $nv['match'] = Array('match', t('Similar Interests'), "", ""); $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); @@ -188,10 +189,28 @@ function diabook_blue_community_info(){ $aside['$page'] = $page; } - //END Community Page - - - + //END Community Page + //helpers + $helpers = array(); + $helpers['title'] = Array("", t('Help or @NewHere ?'), "", ""); + + $aside['$helpers'] = $helpers; + //end helpers + //connectable services + $con_services = array(); + $con_services['title'] = Array("", t('Connect Services'), "", ""); + + $aside['$con_services'] = $con_services; + //end connectable services + //postit + $postit = array(); + $postit['title'] = Array("", t('PostIt to Friendica'), t('Post to Friendica'), ""); + $postit['text'] = Array("", t(' from anywhere by bookmarking this Link.'), "", ""); + + $aside['$postit'] = $postit; + //end postit + + //get_baseurl $url = $a->get_baseurl($ssl_state); $aside['$url'] = $url; -- cgit v1.2.3 From f980b79edcff78a849d65de15f36f2b0475665d7 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 6 Apr 2012 11:19:12 +0200 Subject: new-contacts-introductions in contacts-drop-down and new-messages in messages-drop-down get each an additional indicator... profile-picture is now scaled right in firefox... fixed broken css on introductions-page in firefox... --- view/theme/diabook-blue/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 view/theme/diabook-blue/theme.php (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php old mode 100644 new mode 100755 index 2e7aca92a..c64e9cd37 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,7 +3,7 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.012) + * Version: (Version: 1.013) * Author: */ -- cgit v1.2.3 From 1c0700f371f96466be113a4184d7ab9acd39e22f Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sat, 7 Apr 2012 16:39:43 +0200 Subject: changelog 1.014 : image-rezise via jquery-plugin in stream comments under uploaded pictues add Diabook's version-number in head-section css-fixes: tabs youtube-iframe title-bar in jot-wrapper blockquote & .oembed --- view/theme/diabook-blue/theme.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index c64e9cd37..a8b4fcd6c 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,11 +3,15 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.013) + * Version: (Version: 1.014) * Author: */ +//print diabook-version for debugging +$diabook_version = "Diabook-blue (Version: 1.014)"; +$a->page['htmlhead'] .= sprintf('', $diabook_version); + //change css on network and profilepages $cssFile = null; @@ -333,8 +337,25 @@ if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.cookie.js"; $a->page['htmlhead'] .= sprintf('', $cookieJS); +//load jquery.ae.image.resize.js +$imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.ae.image.resize.js"; +$a->page['htmlhead'] .= sprintf('', $imageresizeJS); //js scripts +//comment-edit-wrapper on photo_view +if ($a->argv[0].$a->argv[2] === "photos"."image"){ + +$a->page['htmlhead'] .= ' +'; + +} + $a->page['htmlhead'] .= ' @@ -350,6 +371,10 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] == $a->page['htmlhead'] .= ' ', $diabook_version); //change css on network and profilepages @@ -366,15 +366,50 @@ $a->page['htmlhead'] .= ' '; +$a->page['htmlhead'] .= ' + '; + if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){ $a->page['htmlhead'] .= ' '; + + if($ccCookie != "8") { +$a->page['htmlhead'] .= ' +';} +$a->page['htmlhead'] .= ' +';} -- cgit v1.2.3 From 0d4fab4ee3cba6db669d6b7e608bfbbba8e8d3dc Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Tue, 10 Apr 2012 00:55:39 +0200 Subject: bbcode toolbar attached to the comment text field minor css-fixes --- view/theme/diabook-blue/theme.php | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 190533d17..f63f15fd9 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,13 +3,13 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.015) + * Version: (Version: 1.016) * Author: */ //print diabook-version for debugging -$diabook_version = "Diabook-blue (Version: 1.015)"; +$diabook_version = "Diabook-blue (Version: 1.016)"; $a->page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages @@ -509,3 +509,30 @@ function restore_boxes(){ alert("Right-hand column was restored. Please refresh your browser"); } ';} + +$a->page['htmlhead'] .= ' + + '; -- cgit v1.2.3 From 6db33fc5138e55f5ae95fe7b24b3e93f8e20408c Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Tue, 10 Apr 2012 15:13:34 +0200 Subject: diabook-themes: smal fix in bbcode-js --- view/theme/diabook-blue/theme.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index f63f15fd9..435ecaf92 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -527,10 +527,16 @@ function insertFormatting(BBcode,id) { if (document.selection) { textarea.focus(); selected = document.selection.createRange(); + if (BBcode == "url"){ + selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]"; + } else selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]"; } else if (textarea.selectionStart || textarea.selectionStart == "0") { var start = textarea.selectionStart; var end = textarea.selectionEnd; + if (BBcode == "url"){ + textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); + } else textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length); } return true; -- cgit v1.2.3 From e3af552bbfff2632bbcf2ce94c3e08ad4a5142d2 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Thu, 12 Apr 2012 22:00:18 +0200 Subject: diabook-themes: fixed css for settings aside-links --- view/theme/diabook-blue/theme.php | 55 ++------------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 435ecaf92..379f67008 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,13 +3,13 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.016) + * Version: (Version: 1.017) * Author: */ //print diabook-version for debugging -$diabook_version = "Diabook-blue (Version: 1.016)"; +$diabook_version = "Diabook-blue (Version: 1.017)"; $a->page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages @@ -21,7 +21,6 @@ $cssFile = null; */ function diabook_blue_community_info(){ $a = get_app(); - //right_aside at networkpages // last 12 users $aside['$lastusers_title'] = t('Last users'); @@ -279,56 +278,6 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){ } } -//tabs at right_aside on settings page -if ($a->argv[0] === "settings"){ - - $tabs = array( - array( - 'label' => t('Account settings'), - 'url' => $a->get_baseurl(true).'/settings', - 'sel' => (($a->argc == 1)?'active':''), - ), - array( - 'label' => t('Display settings'), - 'url' => $a->get_baseurl(true).'/settings/display', - 'sel' => (($a->argc > 1) && ($a->argv[1] === 'display')?'active':''), - ), - array( - 'label' => t('Edit/Manage Profiles'), - 'url' => $a->get_baseurl(true).'/profiles', - ), - array( - 'label' => t('Connector settings'), - 'url' => $a->get_baseurl(true).'/settings/connectors', - 'sel' => (($a->argc > 1) && ($a->argv[1] === 'connectors')?'active':''), - ), - array( - 'label' => t('Plugin settings'), - 'url' => $a->get_baseurl(true).'/settings/addon', - 'sel' => (($a->argc > 1) && ($a->argv[1] === 'addon')?'active':''), - ), - array( - 'label' => t('Connections'), - 'url' => $a->get_baseurl(true) . '/settings/oauth', - 'sel' => (($a->argc > 1) && ($a->argv[1] === 'oauth')?'active':''), - ), - array( - 'label' => t('Export personal data'), - 'url' => $a->get_baseurl(true) . '/uexport', - 'sel' => '' - ) - ); - $tabtpl = file_get_contents(dirname(__file__).'/rs_common_tabs.tpl') ; - $a->page['aside'] = replace_macros($tabtpl, array( - '$tabs' => $tabs, - )); - - - // CUSTOM CSS - $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-settings.css"; - -} - // custom css if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('', $cssFile); -- cgit v1.2.3 From 615cd53e51a2ae121846771a9a1ef2ce22550be3 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 13 Apr 2012 18:28:11 +0200 Subject: diabook-themes: small fixes --- view/theme/diabook-blue/theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 379f67008..3b74bf1d3 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -462,10 +462,10 @@ function restore_boxes(){ $a->page['htmlhead'] .= ' ', $diabook_version); //change css on network and profilepages -- cgit v1.2.3 From 41d74c08681db9fca60a1b70cfae0c0481f57a81 Mon Sep 17 00:00:00 2001 From: Vasudev Kamath Date: Sat, 14 Apr 2012 20:16:06 +0530 Subject: Another bunch of executable permission removal --- view/theme/diabook-blue/theme.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 view/theme/diabook-blue/theme.php (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php old mode 100755 new mode 100644 -- cgit v1.2.3 From dddf3307af24de71a8b6e52a984ba2f2e310c3b7 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 15 Apr 2012 04:39:33 +0200 Subject: diabook-themes: added js for auto-growing comment-textareas --- view/theme/diabook-blue/theme.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 844682943..eb2d484ba 100644 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -290,6 +290,10 @@ $a->page['htmlhead'] .= sprintf('', $imageresizeJS); +//load jquery.autogrow-textarea.js +$autogrowJS = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.autogrow.textarea.js"; +$a->page['htmlhead'] .= sprintf('', $autogrowJS); + //js scripts //comment-edit-wrapper on photo_view if ($a->argv[0].$a->argv[2] === "photos"."image"){ @@ -314,6 +318,15 @@ $a->page['htmlhead'] .= ' }); '; + +$a->page['htmlhead'] .= ' + +'; $a->page['htmlhead'] .= ' ', $diabook_version); //change css on network and profilepages -- cgit v1.2.3 From f08844a8a58f46d539753831a8ff99995fc3c1ae Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 16 Apr 2012 19:23:11 +0200 Subject: diabook-themes: bugfix (sry, necessary) --- view/theme/diabook-blue/theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 2257f8df0..9aac48c38 100644 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -35,7 +35,7 @@ function diabook_blue_community_info(){ 0, 9 ); - $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl'); + $tpl = file_get_contents( dirname(__file__).'/ch_directory_item.tpl'); if(count($r)) { $photo = 'thumb'; foreach($r as $rr) { @@ -114,7 +114,7 @@ function diabook_blue_community_info(){ dbesc(t('Profile Photos')) ); if(count($r)) { - $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl'); + $tpl = file_get_contents( dirname(__file__).'/ch_directory_item.tpl'); foreach($r as $rr) { $photo_page = $a->get_baseurl() . '/photos/' . $rr['nickname'] . '/image/' . $rr['resource-id']; $photo_url = $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] .'.jpg'; -- cgit v1.2.3 From b30c761aae7e01e6fe727232e48b14303484a228 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Tue, 17 Apr 2012 16:15:49 +0200 Subject: diabook-themes: removed fpostit due to security issues and small fix in german translation --- view/theme/diabook-blue/theme.php | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 9aac48c38..827e36cb0 100644 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -3,13 +3,13 @@ /* * Name: Diabook-blue * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu - * Version: (Version: 1.019) + * Version: (Version: 1.020) * Author: */ //print diabook-version for debugging -$diabook_version = "Diabook-blue (Version: 1.019)"; +$diabook_version = "Diabook-blue (Version: 1.020)"; $a->page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages @@ -130,14 +130,6 @@ function diabook_blue_community_info(){ } } - $fostitJS = "javascript: (function() { - the_url = '".$a->get_baseurl($ssl_state)."/view/theme/diabook-blue/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)); - a_funct = function() { - if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) location.href = the_url}; - if (/Firefox/.test(navigator.userAgent)) {setTimeout(a_funct, 0)} - else {a_funct()}})()" ; - - $aside['$fostitJS'] = $fostitJS; //nav FIND FRIENDS if(local_user()) { @@ -205,13 +197,7 @@ function diabook_blue_community_info(){ $aside['$con_services'] = $con_services; //end connectable services - //postit - $postit = array(); - $postit['title'] = Array("", t('PostIt to Friendica'), t('Post to Friendica'), ""); - $postit['text'] = Array("", t(' from anywhere by bookmarking this Link.'), "", ""); - - $aside['$postit'] = $postit; - //end postit + //get_baseurl $url = $a->get_baseurl($ssl_state); @@ -254,9 +240,9 @@ 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']; + $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes']; - if($ccCookie != "8") { + if($ccCookie != "7") { // COMMUNITY diabook_blue_community_info(); @@ -269,7 +255,7 @@ if ($a->argv[0] === "network" && local_user()){ //right_aside at profile pages if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){ - if($ccCookie != "8") { + if($ccCookie != "7") { // COMMUNITY diabook_blue_community_info(); @@ -369,7 +355,7 @@ $a->page['htmlhead'] .= ' '; - if($ccCookie != "8") { + if($ccCookie != "7") { $a->page['htmlhead'] .= ' ', $diabook_version); //change css on network and profilepages $cssFile = null; - +$resolution=false; +$resolution = get_pconfig(local_user(), "diabook-blue", "resolution"); +if ($resolution===false) $resolution="normal"; /** * prints last community activity @@ -247,7 +249,8 @@ if ($a->argv[0] === "network" && local_user()){ diabook_blue_community_info(); // CUSTOM CSS - $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network.css"; + if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network.css";} + if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network-wide.css";} } } @@ -260,7 +263,8 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){ diabook_blue_community_info(); // CUSTOM CSS - $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile.css"; + if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile.css";} + if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile-wide.css";} } } -- cgit v1.2.3 From fe6567cb88eb129887253be8f2b62002d92ad769 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 22 Apr 2012 03:15:06 +0200 Subject: diabook-themes: deleted obsolete diabook-folder & minor bug-fixes --- view/theme/diabook-blue/theme.php | 486 -------------------------------------- 1 file changed, 486 deletions(-) delete mode 100644 view/theme/diabook-blue/theme.php (limited to 'view/theme/diabook-blue/theme.php') diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php deleted file mode 100644 index 46ede2182..000000000 --- a/view/theme/diabook-blue/theme.php +++ /dev/null @@ -1,486 +0,0 @@ -page['htmlhead'] .= sprintf('', $diabook_version); - -//change css on network and profilepages -$cssFile = null; -$resolution=false; -$resolution = get_pconfig(local_user(), "diabook-blue", "resolution"); -if ($resolution===false) $resolution="normal"; - -/** - * prints last community activity - */ -function diabook_blue_community_info(){ - $a = get_app(); - - // last 12 users - $aside['$lastusers_title'] = t('Last users'); - $aside['$lastusers_items'] = array(); - $sql_extra = ""; - $publish = (get_config('system','publish_all') ? '' : " AND `publish` = 1 " ); - $order = " ORDER BY `register_date` DESC "; - - $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` - FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` - WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ", - 0, - 9 - ); - $tpl = file_get_contents( dirname(__file__).'/ch_directory_item.tpl'); - if(count($r)) { - $photo = 'thumb'; - foreach($r as $rr) { - $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, - '$photo' => $rr[$photo], - '$alt-text' => $rr['name'], - )); - $aside['$lastusers_items'][] = $entry; - } - } - - - // last 10 liked items - $aside['$like_title'] = t('Last likes'); - $aside['$like_items'] = array(); - $r = q("SELECT `T1`.`created`, `T1`.`liker`, `T1`.`liker-link`, `item`.* FROM - (SELECT `parent-uri`, `created`, `author-name` AS `liker`,`author-link` AS `liker-link` - FROM `item` WHERE `verb`='http://activitystrea.ms/schema/1.0/like' GROUP BY `parent-uri` ORDER BY `created` DESC) AS T1 - INNER JOIN `item` ON `item`.`uri`=`T1`.`parent-uri` - WHERE `T1`.`liker-link` LIKE '%s%%' OR `item`.`author-link` LIKE '%s%%' - GROUP BY `uri` - ORDER BY `T1`.`created` DESC - LIMIT 0,5", - $a->get_baseurl(),$a->get_baseurl() - ); - - foreach ($r as $rr) { - $author = '' . $rr['liker'] . ''; - $objauthor = '' . $rr['author-name'] . ''; - - //var_dump($rr['verb'],$rr['object-type']); killme(); - switch($rr['verb']){ - case 'http://activitystrea.ms/schema/1.0/post': - switch ($rr['object-type']){ - case 'http://activitystrea.ms/schema/1.0/event': - $post_type = t('event'); - break; - default: - $post_type = t('status'); - } - break; - default: - if ($rr['resource-id']){ - $post_type = t('photo'); - $m=array(); preg_match("/\[url=([^]]*)\]/", $rr['body'], $m); - $rr['plink'] = $m[1]; - } else { - $post_type = t('status'); - } - } - $plink = '' . $post_type . ''; - - $aside['$like_items'][] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink); - - } - - - // last 12 photos - $aside['$photos_title'] = t('Last photos'); - $aside['$photos_items'] = array(); - $r = q("SELECT `photo`.`id`, `photo`.`resource-id`, `photo`.`scale`, `photo`.`desc`, `user`.`nickname`, `user`.`username` FROM - (SELECT `resource-id`, MAX(`scale`) as maxscale FROM `photo` - WHERE `profile`=0 AND `contact-id`=0 AND `album` NOT IN ('Contact Photos', '%s', 'Profile Photos', '%s') - AND `allow_cid`='' AND `allow_gid`='' AND `deny_cid`='' AND `deny_gid`='' GROUP BY `resource-id`) AS `t1` - INNER JOIN `photo` ON `photo`.`resource-id`=`t1`.`resource-id` AND `photo`.`scale` = `t1`.`maxscale`, - `user` - WHERE `user`.`uid` = `photo`.`uid` - AND `user`.`blockwall`=0 - AND `user`.`hidewall`=0 - ORDER BY `photo`.`edited` DESC - LIMIT 0, 9", - dbesc(t('Contact Photos')), - dbesc(t('Profile Photos')) - ); - if(count($r)) { - $tpl = file_get_contents( dirname(__file__).'/ch_directory_item.tpl'); - foreach($r as $rr) { - $photo_page = $a->get_baseurl() . '/photos/' . $rr['nickname'] . '/image/' . $rr['resource-id']; - $photo_url = $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] .'.jpg'; - - $entry = replace_macros($tpl,array( - '$id' => $rr['id'], - '$profile-link' => $photo_page, - '$photo' => $photo_url, - '$alt-text' => $rr['username']." : ".$rr['desc'], - )); - - $aside['$photos_items'][] = $entry; - } - } - - - //nav FIND FRIENDS - if(local_user()) { - $nv = array(); - $nv['title'] = Array("", t('Find Friends'), "", ""); - $nv['directory'] = Array('directory', t('Local Directory'), "", ""); - $nv['global_directory'] = Array('http://dir.friendica.com/', t('Global Directory'), "", ""); - $nv['match'] = Array('match', t('Similar Interests'), "", ""); - $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); - $nv['invite'] = Array('invite', t('Invite Friends'), "", ""); - - $nv['search'] = '
- - - - - '; - - $aside['$nv'] = $nv; - }; - //Community Page - if(local_user()) { - $page = '
-
-

'.t("Community Pages").'

-
'; - //if (sizeof($contacts) > 0) - - $aside['$page'] = $page; - } - //END Community Page - //helpers - $helpers = array(); - $helpers['title'] = Array("", t('Help or @NewHere ?'), "", ""); - - $aside['$helpers'] = $helpers; - //end helpers - //connectable services - $con_services = array(); - $con_services['title'] = Array("", t('Connect Services'), "", ""); - - $aside['$con_services'] = $con_services; - //end connectable services - - - //get_baseurl - $url = $a->get_baseurl($ssl_state); - $aside['$url'] = $url; - - $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); - $a->page['right_aside'] = replace_macros($tpl, $aside); - -} - - -//profile_side at networkpages -if ($a->argv[0] === "network" && local_user()){ - - // USER MENU - if(local_user()) { - - $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid'])); - - $userinfo = array( - 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"), - 'name' => $a->user['username'], - ); - $ps = array('usermenu'=>array()); - $ps['usermenu']['status'] = Array('profile/' . $a->user['nickname'], t('Home'), "", t('Your posts and conversations')); - $ps['usermenu']['profile'] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page')); - $ps['usermenu']['contacts'] = Array('contacts' , t('Contacts'), "", t('Your contacts')); - $ps['usermenu']['photos'] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos')); - $ps['usermenu']['events'] = Array('events/', t('Events'), "", t('Your events')); - $ps['usermenu']['notes'] = Array('notes/', t('Personal notes'), "", t('Your personal photos')); - $ps['usermenu']['community'] = Array('community/', t('Community'), "", ""); - $ps['usermenu']['pgroups'] = Array('http://dir.friendika.com/directory/forum', t('Community Pages'), "", ""); - - $tpl = get_markup_template('profile_side.tpl'); - - $a->page['aside'] .= replace_macros($tpl, array( - '$userinfo' => $userinfo, - '$ps' => $ps, - )); - - } - - $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes']; - - if($ccCookie != "7") { - // COMMUNITY - diabook_blue_community_info(); - - // CUSTOM CSS - if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network.css";} - if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network-wide.css";} - } -} - - - -//right_aside at profile pages -if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){ - if($ccCookie != "7") { - // COMMUNITY - diabook_blue_community_info(); - - // CUSTOM CSS - if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile.css";} - if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile-wide.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('', $cookieJS); - -//load jquery.ae.image.resize.js -$imageresizeJS = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.ae.image.resize.js"; -$a->page['htmlhead'] .= sprintf('', $imageresizeJS); - -//load jquery.autogrow-textarea.js -$autogrowJS = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.autogrow.textarea.js"; -$a->page['htmlhead'] .= sprintf('', $autogrowJS); - -//js scripts -//comment-edit-wrapper on photo_view -if ($a->argv[0].$a->argv[2] === "photos"."image"){ - -$a->page['htmlhead'] .= ' -'; - -} - - -$a->page['htmlhead'] .= ' - -'; - -$a->page['htmlhead'] .= ' - -'; - -$a->page['htmlhead'] .= ' - '; - - -if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()){ -$a->page['htmlhead'] .= ' -'; - - - if($ccCookie != "7") { -$a->page['htmlhead'] .= ' -';} - -$a->page['htmlhead'] .= ' -';} - -$a->page['htmlhead'] .= ' - - '; -- cgit v1.2.3