From 6780b76b0c0c8f9f250fabe2ea35ee22139ba3d1 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 24 Mar 2012 23:04:18 -0700 Subject: improved the inivitations and added a bit of sales pitch. --- include/contact_widgets.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include/contact_widgets.php') diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 605a3eb78..135a9e4e8 100755 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -15,8 +15,6 @@ function findpeople_widget() { $a = get_app(); - $inv = (($a->config['register_policy'] != REGISTER_CLOSED) ? t('Invite Friends') : ''); - if(get_config('system','invitation_only')) { $x = get_pconfig(local_user(),'system','invites_remaining'); if($x || is_site_admin()) { @@ -34,7 +32,7 @@ function findpeople_widget() { '$findthem' => t('Find'), '$suggest' => t('Friend Suggestions'), '$similar' => t('Similar Interests'), - '$inv' => $inv + '$inv' => t('Invite Friends') )); } -- cgit v1.2.3 From 0aa99acd35efa2b0f95363c461b931d2deb52b3f Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 27 Mar 2012 20:15:15 -0700 Subject: profile_tabs hook --- include/contact_widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/contact_widgets.php') diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 135a9e4e8..9d7085d20 100755 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -46,7 +46,7 @@ function networks_widget($baseurl,$selected = '') { return ''; - $r = q("select distinct(network) from contact where uid = %d", + $r = q("select distinct(network) from contact where uid = %d and self = 0", intval(local_user()) ); -- cgit v1.2.3 From bcc58016089c5e5c0e1e5e247d9253b4ac664c2c Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 30 Mar 2012 02:42:36 -0700 Subject: rename "file as" to "save to folder" --- include/contact_widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/contact_widgets.php') diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 9d7085d20..1f70e536f 100755 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -93,7 +93,7 @@ function fileas_widget($baseurl,$selected = '') { } return replace_macros(get_markup_template('fileas_widget.tpl'),array( - '$title' => t('File Selections'), + '$title' => t('Saved Folders'), '$desc' => '', '$sel_all' => (($selected == '') ? 'selected' : ''), '$all' => t('Everything'), -- cgit v1.2.3 From 53f799f2bc125fadf527e3c65e8e9882d53d9aea Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 31 Mar 2012 15:25:17 -0700 Subject: handle escaped file chars in display and search --- include/contact_widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/contact_widgets.php') diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 1f70e536f..7346b95af 100755 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -87,7 +87,7 @@ function fileas_widget($baseurl,$selected = '') { $cnt = preg_match_all('/\[(.*?)\]/',$saved,$matches,PREG_SET_ORDER); if($cnt) { foreach($matches as $mtch) { - $unescaped = file_tag_decode($mtch[1]); + $unescaped = xmlify(file_tag_decode($mtch[1])); $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : '')); } } -- cgit v1.2.3 From 581b54c974a9b9a050a8a0b9a17a19bd41b1f2f5 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Sun, 1 Apr 2012 21:28:31 -0400 Subject: allow users to set categories on their posts --- include/contact_widgets.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include/contact_widgets.php') diff --git a/include/contact_widgets.php b/include/contact_widgets.php index 7346b95af..e0f37f078 100755 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -103,3 +103,31 @@ function fileas_widget($baseurl,$selected = '') { )); } +function categories_widget($baseurl,$selected = '') { + $a = get_app(); + + $saved = get_pconfig($a->profile['profile_uid'],'system','filetags'); + if(! strlen($saved)) + return; + + $matches = false; + $terms = array(); + $cnt = preg_match_all('/<(.*?)>/',$saved,$matches,PREG_SET_ORDER); + if($cnt) { + foreach($matches as $mtch) { + $unescaped = xmlify(file_tag_decode($mtch[1])); + $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : '')); + } + } + + return replace_macros(get_markup_template('categories_widget.tpl'),array( + '$title' => t('Categories'), + '$desc' => '', + '$sel_all' => (($selected == '') ? 'selected' : ''), + '$all' => t('Everything'), + '$terms' => $terms, + '$base' => $baseurl, + + )); +} + -- cgit v1.2.3