From 0bde25d918c558d34ee23b402e71f9bca8878ce0 Mon Sep 17 00:00:00 2001 From: hoergen Date: Sat, 26 Sep 2020 10:39:34 +0200 Subject: [PATCH 1/4] updated examples for advanced content filter --- advancedcontentfilter/doc/advancedcontentfilter.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/advancedcontentfilter/doc/advancedcontentfilter.md b/advancedcontentfilter/doc/advancedcontentfilter.md index 41320fa3..7a7f58a9 100644 --- a/advancedcontentfilter/doc/advancedcontentfilter.md +++ b/advancedcontentfilter/doc/advancedcontentfilter.md @@ -34,8 +34,19 @@ If the expression using a post variables returns `true`, the post will be collap A post will be collapsed if at least one rule matches, but all matching rule names will be displayed above the collapsed content. +## Examples + + + ## Expression Syntax +1. To block specific domains `body matches "/\\.spiegel\\.de/"` +2. To block everything that contains the words `body matches "/Guten Morgen/" +3. To block every occurence of the word facebook with a space in front and after the word `body matches "//s facebook/s /"` +4. To colapse every post that contains more than 1 image `body matches "/(?:(?:(?:\\[url(?:=.*)?\\])?\\[img(?:=.*)?\\].*\\[\\/img\\]\\s*(?:\\[\\/url\\])?)\\s*){2}/"` + + + ### Supported Literals - **strings** - single and double quotes (e.g. `'hello'`). @@ -506,4 +517,4 @@ You can also retrieve the variables of a specific post by pasting its URL below - \ No newline at end of file + From 3855f878ddf9e3ae912a7a51afb678733ab5aa05 Mon Sep 17 00:00:00 2001 From: hoergen Date: Sat, 26 Sep 2020 10:43:48 +0200 Subject: [PATCH 2/4] added some examples --- advancedcontentfilter/doc/advancedcontentfilter.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/advancedcontentfilter/doc/advancedcontentfilter.md b/advancedcontentfilter/doc/advancedcontentfilter.md index 7a7f58a9..edd54217 100644 --- a/advancedcontentfilter/doc/advancedcontentfilter.md +++ b/advancedcontentfilter/doc/advancedcontentfilter.md @@ -36,16 +36,13 @@ A post will be collapsed if at least one rule matches, but all matching rule nam ## Examples - - -## Expression Syntax - -1. To block specific domains `body matches "/\\.spiegel\\.de/"` +1. To block specific domains `body matches "/\\.exmaple\\.com/"` 2. To block everything that contains the words `body matches "/Guten Morgen/" 3. To block every occurence of the word facebook with a space in front and after the word `body matches "//s facebook/s /"` 4. To colapse every post that contains more than 1 image `body matches "/(?:(?:(?:\\[url(?:=.*)?\\])?\\[img(?:=.*)?\\].*\\[\\/img\\]\\s*(?:\\[\\/url\\])?)\\s*){2}/"` +## Expression Syntax ### Supported Literals From 5b045a53484d6cc722ff0e25daf8210fa91bc2d7 Mon Sep 17 00:00:00 2001 From: hoergen Date: Sat, 26 Sep 2020 10:44:23 +0200 Subject: [PATCH 3/4] typos ;) --- advancedcontentfilter/doc/advancedcontentfilter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advancedcontentfilter/doc/advancedcontentfilter.md b/advancedcontentfilter/doc/advancedcontentfilter.md index edd54217..5c19bb62 100644 --- a/advancedcontentfilter/doc/advancedcontentfilter.md +++ b/advancedcontentfilter/doc/advancedcontentfilter.md @@ -36,7 +36,7 @@ A post will be collapsed if at least one rule matches, but all matching rule nam ## Examples -1. To block specific domains `body matches "/\\.exmaple\\.com/"` +1. To block specific domains `body matches "/\\.example\\.com/"` 2. To block everything that contains the words `body matches "/Guten Morgen/" 3. To block every occurence of the word facebook with a space in front and after the word `body matches "//s facebook/s /"` 4. To colapse every post that contains more than 1 image `body matches "/(?:(?:(?:\\[url(?:=.*)?\\])?\\[img(?:=.*)?\\].*\\[\\/img\\]\\s*(?:\\[\\/url\\])?)\\s*){2}/"` From 409a8d1724aa0afdce42592337aa7666f3c0fe8e Mon Sep 17 00:00:00 2001 From: hoergen Date: Sat, 26 Sep 2020 10:45:55 +0200 Subject: [PATCH 4/4] code tags added --- advancedcontentfilter/doc/advancedcontentfilter.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advancedcontentfilter/doc/advancedcontentfilter.md b/advancedcontentfilter/doc/advancedcontentfilter.md index 5c19bb62..531bb941 100644 --- a/advancedcontentfilter/doc/advancedcontentfilter.md +++ b/advancedcontentfilter/doc/advancedcontentfilter.md @@ -36,8 +36,8 @@ A post will be collapsed if at least one rule matches, but all matching rule nam ## Examples -1. To block specific domains `body matches "/\\.example\\.com/"` -2. To block everything that contains the words `body matches "/Guten Morgen/" +1. To block specific domains `body matches "/\\.example\\.com/"` +2. To block everything that contains the words `body matches "/Guten Morgen/"` 3. To block every occurence of the word facebook with a space in front and after the word `body matches "//s facebook/s /"` 4. To colapse every post that contains more than 1 image `body matches "/(?:(?:(?:\\[url(?:=.*)?\\])?\\[img(?:=.*)?\\].*\\[\\/img\\]\\s*(?:\\[\\/url\\])?)\\s*){2}/"`