Page 1 of 1

Addon Release: Filter by Field 2.1

PostPosted: Thu Sep 16, 2004 7:03 am
by Parahead
Addon description:
This addon allows newsitems to be filtered by the contents/values of a selected Field or Fields. The extra filtering options are found in each Profile configuration page. This version has been updated to allow regular expression filtering.

Confirmed to work with Coranto versions 1.24 and 1.30.3 but should of course work with older versions as well.

The addon is closed source but is released by Parahead with permission from Sumaleth, the original author.

Download here!

PostPosted: Fri Sep 17, 2004 5:24 pm
by Von Snellfharer
Is this addon compatible with the built in sort by number in CR?

PostPosted: Fri Sep 17, 2004 5:36 pm
by Parahead
Von Snellfharer wrote:Is this addon compatible with the built in sort by number in CR?
Yes, if you by CR mean Coranto? I haven´t run into any problems anyway... Have you have used FBF 2.0 without problems the 2.1 does nothing new in that sense.

PostPosted: Mon Sep 20, 2004 10:43 am
by Von Snellfharer
OK. Long version:

If you sort by number in Coranto (phonetically shortened CR) and then set it to sort by some field, you might end up with nothing in the file because CR first sorts by number and the looks for the sort-field.

Is this avoided in the newest addon?

PostPosted: Tue Sep 21, 2004 6:17 am
by Parahead
Von Snellfharer wrote:If you sort by number in Coranto (phonetically shortened CR) and then set it to sort by some field, you might end up with nothing in the file because CR first sorts by number and the looks for the sort-field.

Is this avoided in the newest addon?
The sorting/filterering vs. filtering/sorting problem is only a concern with the internal "Filter By Number" / "Filter By Time" fields and how the actual sorting in the profile works. Both a deeper discussion of this problem and a solution for it is available in this thread (as you know ;-)). I fully agree that a more flexible option as mentioned in that thread to be able to choose filter/sort or sort/filter should be implemented into the core of Coranto though.

But to answer your question. The FBF addon is actually doing it's filtering *before* the number/time filtering done internaly by Coranto, which makes it behave the way you want. Any filtering/sorting you specify is done *after* this subset of newsitem has been weeded out (but the problem above still applies though). The 2.0 version worked this way and the 2.1 is too...

PostPosted: Mon Nov 29, 2004 8:49 am
by bozoka45
Very small issue I wanted to point out. The old Filter by Field (2.0) file name is cra_filterbyfield2.pl. The new one is simply cra_filterbyfield.pl (from your website). Makes it a little confusing with two of those in there, and the older version has the "2" at the end.

Not sure if it was intentional or not, but just wanted to point it out.

PostPosted: Wed Dec 01, 2004 6:26 pm
by Parahead
bozoka45 wrote:Very small issue I wanted to point out. The old Filter by Field (2.0) file name is cra_filterbyfield2.pl. The new one is simply cra_filterbyfield.pl (from your website). Makes it a little confusing with two of those in there, and the older version has the "2" at the end.

Not sure if it was intentional or not, but just wanted to point it out.
Nope, not intended, the correct filename should of course have been cra_filterbyfield2.pl, my misstake... Don´t think I will release a new version just for this but will try and remember to fix it if I make any other changes which require a new release...

PostPosted: Wed Dec 01, 2004 9:35 pm
by bozoka45
Parahead wrote:Nope, not intended, the correct filename should of course have been cra_filterbyfield2.pl, my misstake... Don´t think I will release a new version just for this but will try and remember to fix it if I make any other changes which require a new release...


I think just changing the filename on the CTUS addons page and your addons page would be sufficient. It gave me a headache for a few minutes.

PostPosted: Thu Dec 02, 2004 6:55 am
by Parahead
bozoka45 wrote:I think just changing the filename on the CTUS addons page and your addons page would be sufficient. It gave me a headache for a few minutes.
Done... :-)

RegExp Help?

PostPosted: Sun Jan 20, 2008 9:26 am
by Darren
Hey Parahead, or anyone else who may know:

Can I get a quick idiot's guide to regular expressions? There seems to be an assumption in the Filter By Field add-on that Coranto users will know the syntax and how to use the RegExp options.

I have been using the simple "Equal To" test type, but now I would like the filter to allow for two specific options (out of a list of five or six in that custom field's drop-down menu). I need some sort of "AND" operator. It would also be handy to know how to do "OR" for filtering.

Thanks very much!

PostPosted: Sun Jan 20, 2008 3:33 pm
by Jackanape
Try this:
http://www.perl.com/pub/q/documentation

Specifically:
http://search.cpan.org/dist/perl/pod/perlre.pod
http://search.cpan.org/dist/perl/pod/perlop.pod

It might also be worth investing in a dektop hardcopy book for reference...I've found "The Visual Quickstart guide" to be excellent.

PostPosted: Sun Jan 20, 2008 4:32 pm
by Musicvid
There are lots of sites with basic tutorials, here's one I keep coming back to:
http://www.troubleshooters.com/codecorn/littperl/perlreg.htm

PostPosted: Sun Jan 20, 2008 9:28 pm
by Darren
Sorry, for a non-programmer these docs are still over my head.

Could you list some examples of what to plug into Filter By Field to perform some basic operations (such as the one I describe above)?

Right now I have (based on Parahead's example I found in another thread):

Test Type: Equal To RegExp
Test Value: /Value1|Value2/

My field has 5 different options to choose from, Value1 - Value5, and I only want the profile to include items with Value1 or Value2.

The Test Value I have seems to almost be doing the trick, but I have found one case where a Value5 newsitem is still slipping through. My only explanation is that my regexp syntax is wrong, or I don't understand how it's truly operating.

Thanks!

PostPosted: Wed Feb 20, 2008 3:07 pm
by Parahead
Darren wrote:The Test Value I have seems to almost be doing the trick, but I have found one case where a Value5 newsitem is still slipping through. My only explanation is that my regexp syntax is wrong, or I don't understand how it's truly operating.
Based on the information you have provided the regexp seems fine, but it would be interesting to know if the field is a multiple selection field or if you only can choose *one* value?

Re: Addon Release: Filter by Field 2.1

PostPosted: Sat Feb 16, 2013 2:21 pm
by web
it may be interesting to others

I used

/word1/+/word2/+/word3/

so it gives result, that mathes to word1 OR word2 OR word3

some other expressions

* Match 0 or more times
+ Match 1 or more times
? Match 1 or 0 times
{n} Match exactly n times
{n,} Match at least n times
{n,m} Match at least n but not more than m times