From b4f639239fb0d6d5ed58fb7139bb7f88f1b77150 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 16 Feb 2015 11:09:12 -0800 Subject: mopping up the public site ratings --- include/widgets.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/widgets.php') diff --git a/include/widgets.php b/include/widgets.php index d457db07d..fbbc74224 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -962,4 +962,11 @@ function widget_rating($arr) { return $o; +} + +// used by site ratings pages to provide a return link +function widget_pubsites() { + if(get_app()->poi) + return; + return '
'; } \ No newline at end of file -- cgit v1.2.3 From 22391a24378cae317cdf62dc4be4b31b68e8191f Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 5 Mar 2015 18:24:49 -0800 Subject: straighten out some directory stuff, which required some Comanche structural changes --- include/widgets.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/widgets.php') diff --git a/include/widgets.php b/include/widgets.php index fbbc74224..17c740967 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -605,9 +605,6 @@ function widget_vcard($arr) { * The following directory widgets are only useful on the directory page */ -function widget_dirsafemode($arr) { - return dir_safe_mode(); -} function widget_dirsort($arr) { return dir_sort_links(); -- cgit v1.2.3 From 26a414fe4b3ab4b1d995233f0402532ad41eaeb7 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 9 Mar 2015 16:25:55 -0700 Subject: make network page default options work more or less universally instead of just from the navbar, and fix some saved-search weirdness related to the delete-term icon --- include/widgets.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/widgets.php') diff --git a/include/widgets.php b/include/widgets.php index 17c740967..243c4a25e 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -233,7 +233,6 @@ function widget_savedsearch($arr) { $srchurl = rtrim(preg_replace('/searchsave\=[^\&].*?(\&|$)/is','',$srchurl),'&'); $hasq = ((strpos($srchurl,'?') !== false) ? true : false); $srchurl = rtrim(preg_replace('/searchremove\=[^\&].*?(\&|$)/is','',$srchurl),'&'); - $hasq = ((strpos($srchurl,'?') !== false) ? true : false); $srchurl = rtrim(preg_replace('/search\=[^\&].*?(\&|$)/is','',$srchurl),'&'); $srchurl = rtrim(preg_replace('/submit\=[^\&].*?(\&|$)/is','',$srchurl),'&'); @@ -241,7 +240,10 @@ function widget_savedsearch($arr) { $hasq = ((strpos($srchurl,'?') !== false) ? true : false); + $hasamp = ((strpos($srchurl,'&') !== false) ? true : false); + if(($hasamp) && (! $hasq)) + $srchurl = substr($srchurl,0,strpos($srchurl,'&')) . '?f=&' . substr($srchurl,strpos($srchurl,'&')+1); $o = ''; @@ -257,8 +259,8 @@ function widget_savedsearch($arr) { $saved[] = array( 'id' => $rr['tid'], 'term' => $rr['term'], - 'dellink' => z_root() . '/' . $srchurl . (($hasq) ? '' : '?f=') . '&searchremove=1&search=' . urlencode($rr['term']), - 'srchlink' => z_root() . '/' . $srchurl . (($hasq) ? '' : '?f=') . '&search=' . urlencode($rr['term']), + 'dellink' => z_root() . '/' . $srchurl . (($hasq || $hasamp) ? '' : '?f=') . '&searchremove=1&search=' . urlencode($rr['term']), + 'srchlink' => z_root() . '/' . $srchurl . (($hasq || $hasamp) ? '' : '?f=') . '&search=' . urlencode($rr['term']), 'displayterm' => htmlspecialchars($rr['term'], ENT_COMPAT,'UTF-8'), 'encodedterm' => urlencode($rr['term']), 'delete' => t('Remove term'), -- cgit v1.2.3 From 7e7678364b9e89337612d7879e7f5cbb0792b35b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 9 Apr 2015 10:53:37 +0200 Subject: make jRange behave again --- include/widgets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/widgets.php') diff --git a/include/widgets.php b/include/widgets.php index 243c4a25e..e84c029d2 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -431,7 +431,7 @@ function widget_affinity($arr) { '$coworkers' => t('Co-workers'), '$oldfriends' => t('Former Friends'), '$acquaintances' => t('Acquaintances'), - '$world' => t('Everybody') + '$world' => t('All') )); $arr = array('html' => $x); call_hooks('main_slider',$arr); @@ -968,4 +968,4 @@ function widget_pubsites() { if(get_app()->poi) return; return ''; -} \ No newline at end of file +} -- cgit v1.2.3 From 3fd2e4b716aaf4626b774ac5d808cc4088e6f3f2 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Apr 2015 19:51:58 -0700 Subject: program the affinity slider labels --- include/widgets.php | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'include/widgets.php') diff --git a/include/widgets.php b/include/widgets.php index e84c029d2..4a9032a21 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -420,18 +420,35 @@ function widget_affinity($arr) { $cmin = ((x($_REQUEST,'cmin')) ? intval($_REQUEST['cmin']) : 0); $cmax = ((x($_REQUEST,'cmax')) ? intval($_REQUEST['cmax']) : 99); + if(feature_enabled(local_channel(),'affinity')) { + + $labels = array( + t('Me'), + t('Family'), + t('Friends'), + t('Acquaintances'), + t('All') + ); + call_hooks('affinity_labels',$labels); + $label_str = ''; + + if($labels) { + foreach($labels as $l) { + if($label_str) { + $label_str .= ", '|'"; + $label_str .= ", '" . $l . "'"; + } + else + $label_str .= "'" . $l . "'"; + } + } + $tpl = get_markup_template('main_slider.tpl'); $x = replace_macros($tpl,array( '$val' => $cmin . ',' . $cmax, '$refresh' => t('Refresh'), - '$me' => t('Me'), - '$intimate' => t('Best Friends'), - '$friends' => t('Friends'), - '$coworkers' => t('Co-workers'), - '$oldfriends' => t('Former Friends'), - '$acquaintances' => t('Acquaintances'), - '$world' => t('All') + '$labels' => $label_str, )); $arr = array('html' => $x); call_hooks('main_slider',$arr); -- cgit v1.2.3