From 48610a85dc2954074b2123b090207dcb4a4ab2be Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 11:25:20 +0100 Subject: make empty notes saveable as well --- mod/notes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/notes.php b/mod/notes.php index ce3460aa4..468b4ef26 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -6,11 +6,11 @@ function notes_init(&$a) { logger('mod_notes: ' . print_r($_REQUEST,true)); $ret = array('success' => true); - if($_REQUEST['note_text']) { + if($_REQUEST['note_text'] || $_REQUEST['note_text'] == '') { $body = escape_tags($_REQUEST['note_text']); set_pconfig(local_user(),'notes','text',$body); } logger('notes saved.'); json_return_and_die($ret); -} \ No newline at end of file +} -- cgit v1.2.3 From 1d8c15f2df45387993624a8217b648ac10491344 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 12:01:28 +0100 Subject: make suggest channels a feature --- include/features.php | 1 + include/widgets.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/features.php b/include/features.php index 05206106a..978d7af8a 100644 --- a/include/features.php +++ b/include/features.php @@ -49,6 +49,7 @@ function get_features() { array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on')), array('new_tab', t('Network New Tab'), t('Enable tab to display all new Network activity')), array('affinity', t('Affinity Tool'), t('Filter stream activity by depth of relationships')), + array('suggest', t('Suggest Channels'), t('Show channel suggestions')), ), // Item tools diff --git a/include/widgets.php b/include/widgets.php index cea5a6ce2..6d258d101 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -57,6 +57,9 @@ function widget_collections($args) { function widget_suggestions($arr) { + if((! local_user()) || (! feature_enabled(local_user(),'suggest'))) + return ''; + require_once('include/socgraph.php'); $r = suggestion_query(local_user(),get_observer_hash(),0,20); @@ -330,4 +333,4 @@ function widget_tagcloud_wall($arr) { if(feature_enabled($a->profile['profile_uid'],'tagadelic')) return tagblock('search',$a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL); return ''; -} \ No newline at end of file +} -- cgit v1.2.3 From aea1e1af82ab2f76f0d8a421ff101316421cbd84 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 18:57:42 +0100 Subject: this makes quotes appear as quotes in notes once page is reloaded. i guess thats fine since we use escape_tags() in notes.php --- include/widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/widgets.php b/include/widgets.php index 6d258d101..abbe1e2e0 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -146,7 +146,7 @@ function widget_notes($arr) { if(! feature_enabled(local_user(),'private_notes')) return ''; - $text = htmlspecialchars(get_pconfig(local_user(),'notes','text')); + $text = get_pconfig(local_user(),'notes','text'); $o = replace_macros(get_markup_template('notes.tpl'), array( '$banner' => t('Notes'), -- cgit v1.2.3 From 1add7d381d67708fe4b85fee3a7022e361f704ce Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 19:05:50 +0100 Subject: this saves notes on the fly. i think this is appropriate behavior for a notes widget. btw... one would get mad at oneself if noting something important and forget to save it. with this behavior one can at least get mad at the developer if something goes wrong :) --- view/tpl/notes.tpl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/view/tpl/notes.tpl b/view/tpl/notes.tpl index 7300779f4..09932e545 100644 --- a/view/tpl/notes.tpl +++ b/view/tpl/notes.tpl @@ -1,13 +1,10 @@

{{$banner}}

- -
-- cgit v1.2.3 From 88761ec9ecf46dd3a3468fbff8a83651480c2a22 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 20:02:17 +0100 Subject: we dont use doubble tagging in /network and /channel anymore... remove it from /search as well --- view/tpl/search_item.tpl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index 3018fc747..c5acfa4a4 100755 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -29,13 +29,7 @@
{{$item.title}}
-
{{$item.body}} -
- {{foreach $item.tags as $tag}} - {{$tag}} - {{/foreach}} -
-
+
{{$item.body}}
-- cgit v1.2.3 From dd7fea10c1b70534b76bc4d5ea044187cd4cb77b Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 21:28:42 +0100 Subject: split out widgets.css --- view/css/widgets.css | 98 +++++++++++++++++++++++++++++++++ view/php/theme_init.php | 1 + view/theme/redbasic/css/style.css | 112 +++++++++++--------------------------- 3 files changed, 132 insertions(+), 79 deletions(-) create mode 100644 view/css/widgets.css diff --git a/view/css/widgets.css b/view/css/widgets.css new file mode 100644 index 000000000..3eb72eafc --- /dev/null +++ b/view/css/widgets.css @@ -0,0 +1,98 @@ +.widget { + padding: 8px; + margin-top: 5px; +} + +/* suggest */ + +.suggest-widget-more { + margin-top: 10px; +} + +/* follow */ + +#side-follow-url { + margin-top: 5px; +} + +#side-follow-submit { + margin-top: 15px; +} + +/* notes */ + +#note-text { + width: 190px; + max-width: 190px; + height: 150px; +} + +#note-save { + margin-top: 10px; +} + +/* saved searches */ + +.saved-search-li { + margin-top: 3px; +} + +.saved-search-li i { + opacity: 0; +} + +.saved-search-li:hover i { + opacity: 1; +} + +.savedsearchdrop { + opacity: 0; +} + +/* fileas */ + +.fileas-ul li { + margin-top: 10px; +} + +.fileas-link { + margin-left: 24px; +} + +.fileas-all { + margin-left: 0px; +} + +/* posted date */ + +#datebrowse-sidebar select { + margin-left: 25px; + opacity: 0.3; + filter:alpha(opacity=30); +} + +#datebrowse-sidebar select:hover { + opacity: 1.0; + filter:alpha(opacity=100); +} + +#posted-date-selector { + margin-left: 30px !important; + margin-top: 5px !important; + margin-right: 0px !important; + margin-bottom: 0px !important; +} + +/* categories */ + +.categories-ul li { + margin-top: 10px; +} + +.categories-link { + margin-left: 24px; +} + +.categories-all { + margin-left: 0px; +} diff --git a/view/php/theme_init.php b/view/php/theme_init.php index a2024d658..e1625b3e5 100644 --- a/view/php/theme_init.php +++ b/view/php/theme_init.php @@ -13,6 +13,7 @@ head_add_css('library/colorbox/colorbox.css'); // head_add_css('library/font_awesome/css/font-awesome.min.css'); head_add_css('view/css/conversation.css'); head_add_css('view/css/bootstrap-red.css'); +head_add_css('view/css/widgets.css'); head_add_js('js/jquery.js'); head_add_js('library/bootstrap/js/bootstrap.min.js'); diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index e13bc1edb..d716680ce 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -331,7 +331,8 @@ footer { margin-bottom: 10px; } -.group-selected, .nets-selected, .fileas-selected, .categories-selected, .search-selected, .active { +/*TODO: we should use .active class for all this, nets-selected probably obsolete */ +.group-selected, /* .nets-selected, */ .fileas-selected, .categories-selected, .search-selected, .active { color: #444444 !important; } @@ -671,36 +672,6 @@ footer { box-shadow: $shadowpx $shadowpx $shadowpx 0 #444444; } - -#datebrowse-sidebar select { - margin-left: 25px; - border-radius: $radiuspx; - -moz-border-radius: $radiuspx; - opacity: 0.3; - filter:alpha(opacity=30); -} - -#datebrowse-sidebar select:hover { - opacity: 1.0; - filter:alpha(opacity=100); -} - -#posted-date-selector { - margin-left: 30px !important; - margin-top: 5px !important; - margin-right: 0px !important; - margin-bottom: 0px !important; -} - -#posted-date-selector:hover { - box-shadow: 4px 4px 3px 0 #444444; - margin-left: 25px !important; - margin-top: 0px !important; - margin-right: 5px !important; - margin-bottom: 5px !important; - -} - #side-bar-photos-albums { margin-top: 15px; } @@ -777,17 +748,16 @@ footer { width: 12px; } -#sidebar-group-list li, -.saved-search-li { +#sidebar-group-list li { margin-top: 3px; } - -.nets-ul, .fileas-ul, .categories-ul { +/* might be obsolete +.nets-ul { list-style-type: none; } -.nets-ul li, .fileas-ul li, .categories-ul li { +.nets-ul li { margin-top: 10px; } @@ -797,14 +767,7 @@ footer { .nets-all { margin-left: 42px; } - -.fileas-link, .categories-link { - margin-left: 24px; -} - -.fileas-all, .categories-all { - margin-left: 0px; -} +*/ #search-save { margin-left: 5px; @@ -813,20 +776,6 @@ footer { margin-right: 10px; } -#saved-search-ul { - list-style-type: none; -} - -.saved-search-li i { - opacity: 0; -} - -.saved-search-li:hover i { - opacity: 1; -} - - - .savedsearchterm { margin-left: 10px; } @@ -835,7 +784,8 @@ footer { #side-follow-wrapper { margin-top: 20px; } -#side-follow-url, #side-peoplefind-url { + +#side-peoplefind-url { margin-top: 5px; } @@ -851,7 +801,7 @@ footer { font-family: FontAwesome; } -#side-follow-submit, #side-peoplefind-submit { +#side-peoplefind-submit { margin-top: 15px; } @@ -860,7 +810,7 @@ footer { } -.widget, .pmenu { +.pmenu { border-bottom: 1px solid #eec; padding: 8px; margin-top: 5px; @@ -1679,12 +1629,6 @@ div.jGrowl div.info { text-overflow: ellipsis; } -#datebrowse-sidebar select { - margin-left: 25px; -} - - - .jslider .jslider-scale ins { color: #333; font-size: $body_font_size; @@ -2255,8 +2199,7 @@ text-decoration: none; list-style-type: none; } -.group-edit-icon, -.savedsearchdrop { +.group-edit-icon { opacity: 0; } @@ -2395,8 +2338,6 @@ img.mail-list-sender-photo { max-width: $converse_width; } -/* conv_item */ - .wall-item-content-wrapper { border-radius: $radiuspx; background-color: $item_colour; @@ -2500,8 +2441,6 @@ img.mail-list-sender-photo { color: $toolicon_colour; } -/* comment_item */ - .my-comment-photo { border-radius: $radiuspx; -moz-border-radius: $radiuspx; @@ -2538,14 +2477,29 @@ img.mail-list-sender-photo { .comment-edit-text-full { color: black; } -.suggest-widget-more { margin-top: 10px; } +/* widgets */ -#note-text { - width: 190px; - max-width: 190px; - height: 150px; +.widget { + border-bottom: 1px solid #eec; + -moz-border-radius: $radiuspx; + -webkit-border-radius: $radiuspx; + border-radius: $radiuspx; +} + +#saved-search-ul { + list-style-type: none; } -#note-save { margin-top: 10px; } +.fileas-ul { + list-style-type: none; +} +#datebrowse-sidebar select { + border-radius: $radiuspx; + -moz-border-radius: $radiuspx; +} + +.categories-ul { + list-style-type: none; +} -- cgit v1.2.3 From 169266b4547460296355b63c06dd0643667093d0 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 21:46:03 +0100 Subject: unify styling a little --- view/css/widgets.css | 18 +++--------------- view/theme/redbasic/css/style.css | 7 +++++++ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/view/css/widgets.css b/view/css/widgets.css index 3eb72eafc..117751e43 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -66,21 +66,9 @@ /* posted date */ #datebrowse-sidebar select { - margin-left: 25px; - opacity: 0.3; - filter:alpha(opacity=30); -} - -#datebrowse-sidebar select:hover { - opacity: 1.0; - filter:alpha(opacity=100); -} - -#posted-date-selector { - margin-left: 30px !important; - margin-top: 5px !important; - margin-right: 0px !important; - margin-bottom: 0px !important; + width: 190px; + max-width: 190px; + height: 150px; } /* categories */ diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index d716680ce..ce13fa94c 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -2487,6 +2487,12 @@ img.mail-list-sender-photo { border-radius: $radiuspx; } +#note-text { + border: 1px solid #ccc; + border-radius: $radiuspx; + -moz-border-radius: $radiuspx; +} + #saved-search-ul { list-style-type: none; } @@ -2496,6 +2502,7 @@ img.mail-list-sender-photo { } #datebrowse-sidebar select { + border: 1px solid #ccc; border-radius: $radiuspx; -moz-border-radius: $radiuspx; } -- cgit v1.2.3 From ebc788a69af4ee93bf683a856ac02956d413aec8 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 22:02:46 +0100 Subject: also add group widget to widgets.css --- view/css/widgets.css | 28 ++++++++++++++++++++++++++++ view/theme/redbasic/css/style.css | 36 +++++------------------------------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/view/css/widgets.css b/view/css/widgets.css index 117751e43..2008b10e0 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -45,6 +45,10 @@ opacity: 1; } +.savedsearchterm { + margin-left: 10px; +} + .savedsearchdrop { opacity: 0; } @@ -84,3 +88,27 @@ .categories-all { margin-left: 0px; } + +/* group */ + +#group-sidebar { + margin-bottom: 10px; +} + +#sidebar-group-list .icon, #sidebar-group-list .iconspacer { + display: inline-block; + height: 12px; + width: 12px; +} + +#sidebar-group-list li { + margin-top: 3px; +} + +.groupsideedit { + margin-right: 10px; +} + +.group-edit-icon { + opacity: 0; +} diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index ce13fa94c..4df791e73 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -327,11 +327,7 @@ footer { margin-bottom: 15px; } -#group-sidebar { - margin-bottom: 10px; -} - -/*TODO: we should use .active class for all this, nets-selected probably obsolete */ +/*TODO: we should use .selected class for all this, nets-selected probably obsolete */ .group-selected, /* .nets-selected, */ .fileas-selected, .categories-selected, .search-selected, .active { color: #444444 !important; } @@ -738,20 +734,6 @@ footer { #netsearch-box { margin-bottom: 5px; } -#sidebar-group-list ul { - list-style-type: none; -} - -#sidebar-group-list .icon, #sidebar-group-list .iconspacer { - display: inline-block; - height: 12px; - width: 12px; -} - -#sidebar-group-list li { - margin-top: 3px; -} - /* might be obsolete .nets-ul { list-style-type: none; @@ -772,14 +754,6 @@ footer { #search-save { margin-left: 5px; } -.groupsideedit { - margin-right: 10px; -} - -.savedsearchterm { - margin-left: 10px; -} - #side-follow-wrapper { margin-top: 20px; @@ -2199,10 +2173,6 @@ text-decoration: none; list-style-type: none; } -.group-edit-icon { - opacity: 0; -} - .admin-icons { color: $toolicon_colour; margin-right: 10px; @@ -2510,3 +2480,7 @@ img.mail-list-sender-photo { .categories-ul { list-style-type: none; } + +#sidebar-group-list ul { + list-style-type: none; +} -- cgit v1.2.3 From e8821d78d517c838a630766bfc3bafb145a6be15 Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 22:11:06 +0100 Subject: .selected is in use for something else already --- view/theme/redbasic/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 4df791e73..fa5bf51ef 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -327,7 +327,7 @@ footer { margin-bottom: 15px; } -/*TODO: we should use .selected class for all this, nets-selected probably obsolete */ +/*TODO: we should use one class for all this, nets-selected probably obsolete */ .group-selected, /* .nets-selected, */ .fileas-selected, .categories-selected, .search-selected, .active { color: #444444 !important; } -- cgit v1.2.3 From 1fa4133d430d2cb2753a9fd7e6bf9bfcdc35659b Mon Sep 17 00:00:00 2001 From: marijus Date: Wed, 11 Dec 2013 23:52:34 +0100 Subject: this is not needed anymore --- view/css/widgets.css | 4 ---- view/tpl/saved_searches.tpl | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/view/css/widgets.css b/view/css/widgets.css index 2008b10e0..a95152888 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -49,10 +49,6 @@ margin-left: 10px; } -.savedsearchdrop { - opacity: 0; -} - /* fileas */ .fileas-ul li { diff --git a/view/tpl/saved_searches.tpl b/view/tpl/saved_searches.tpl index bdff72ba1..d0f9e2b0e 100644 --- a/view/tpl/saved_searches.tpl +++ b/view/tpl/saved_searches.tpl @@ -5,7 +5,7 @@