diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-06-29 22:19:44 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-06-29 22:19:44 -0700 |
commit | 97e8275dc2a63e465adb789be9f94597e5f4d400 (patch) | |
tree | bf1724dd78f5ee8fd7f6832e0993b3fa6b80e410 | |
parent | a7135b5ecd1716575e1dfe608f744bf989381630 (diff) | |
parent | 0b347ccc14a384bfcbda343aacc1dfa1b7ddd740 (diff) | |
download | volse-hubzilla-97e8275dc2a63e465adb789be9f94597e5f4d400.tar.gz volse-hubzilla-97e8275dc2a63e465adb789be9f94597e5f4d400.tar.bz2 volse-hubzilla-97e8275dc2a63e465adb789be9f94597e5f4d400.zip |
Merge branch 'master' of https://github.com/redmatrix/redmatrix
-rw-r--r-- | include/features.php | 1 | ||||
-rwxr-xr-x | include/items.php | 5 | ||||
-rw-r--r-- | mod/connedit.php | 1 | ||||
-rwxr-xr-x | view/tpl/abook_edit.tpl | 5 |
4 files changed, 12 insertions, 0 deletions
diff --git a/include/features.php b/include/features.php index 4121880a4..a6c4757cd 100644 --- a/include/features.php +++ b/include/features.php @@ -71,6 +71,7 @@ function get_features() { array('personal_tab', t('Network Personal Tab'), t('Enable tab to display only Network posts that you\'ve interacted on'),false), array('new_tab', t('Network New Tab'), t('Enable tab to display all new Network activity'),false), array('affinity', t('Affinity Tool'), t('Filter stream activity by depth of relationships'),false), + array('connfilter', t('Connection Filtering'), t('Filter incoming posts from connections based on keywords/content')), array('suggest', t('Suggest Channels'), t('Show channel suggestions'),false), ), diff --git a/include/items.php b/include/items.php index 5f479660e..059d9fd6a 100755 --- a/include/items.php +++ b/include/items.php @@ -3319,12 +3319,17 @@ function post_is_importable($item,$abook) { if(! $abook) return true; + + if(($abook['abook_channel']) && (! feature_enabled($abook['abook_channel'],'connfilter'))) + return true; + if(! $item) return false; if((! $abook['abook_incl']) && (! $abook['abook_excl'])) return true; + require_once('include/html2plain.php'); $text = prepare_text($item['body'],$item['mimetype']); $text = html2plain($text); diff --git a/mod/connedit.php b/mod/connedit.php index dac393b5c..46546caa1 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -668,6 +668,7 @@ function connedit_content(&$a) { '$lbl_slider' => t('Slide to adjust your degree of friendship'), '$lbl_rating' => t('Rating (this information is public)'), '$lbl_rating_txt' => t('Optionally explain your rating (this information is public)'), + '$connfilter' => feature_enabled(local_channel(),'connfilter'), '$incl' => array('abook_incl',t('Only import posts with this text'), $contact['abook_incl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')), '$excl' => array('abook_excl',t('Do not import posts with this text'), $contact['abook_excl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')), '$rating_text' => array('rating_text', t('Optionally explain your rating (this information is public)'),$rating_text,''), diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 10692856e..d118cbb9c 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -50,8 +50,13 @@ {{/if}} +{{if $connfilter}} {{include file="field_textarea.tpl" field=$incl}} {{include file="field_textarea.tpl" field=$excl}} +{{else}} + <input type="hidden" name="{{$incl.0}}" value="{{$incl.2}}" /> + <input type="hidden" name="{{$excl.0}}" value="{{$excl.2}}" /> +{{/if}} {{if $rating}} <h3>{{$lbl_rating}}</h3> |