You are here:  » Show filter content in admin


Show filter content in admin

Submitted by marco@flapper on Tue, 2016-10-04 07:17 in

Hi,
This is a future feature request. Could you consider a naming function for the (global) filters?

I currently have a lot of filters on the same field. If I need to change that/troubleshoot. I have to click on all the filters to find the one that needs to be changed. Is there a way to show the content of the filter or if this is not possible to name the filter.

Submitted by support on Tue, 2016-10-04 08:16

Hi Marco,

It's no problem to show filter configuration on the /admin/ page - edit admin/feeds_filters.php (15/09A) and look for the following code at line 125:

    print "<th>".translate("Field")."</th>";

...and REPLACE with:

    print "<th>".translate("Configuration")."</th>";

And then look for the following code at line 147:

      print "<td>".$fields[$filter["field"]]."</td>";

...and REPLACE with:

      print "<td>".$fields[$filter["field"]]."</td>";
      print "<td>";
      $data = unserialize($filter["data"]);
      if (is_array($data))
      {
        foreach($data as $k => $v)
        {
          print "<strong>".$k."</strong>: ".$v."<br />";
        }
      }
      print "</td>";

Cheers,
David.
--
PriceTapestry.com

Submitted by marco@flapper on Tue, 2016-10-04 11:09

Thank you, works great.

Submitted by Mark Hennessy on Wed, 2016-10-05 10:25

Hi David,

Working with this, is it possible to have the actual contents of the drop displayed next to the field column?

Submitted by support on Wed, 2016-10-05 11:24

Hi Mark,

With the above mod in place, for Drop Record ___ filters the contents of the "Drop Record If ___" box from the configuration page should display alongside the "text:" value. Apologies if mis-understood, if that's not what you were looking for could you perhaps make an example display of a filter row to indicate what you'd like to output?

Cheers,
David.
--
PriceTapestry.com

Submitted by sirmanu on Mon, 2018-03-05 16:25

The above modification it is awesome! Good point!

I have another request.
As I have several filters, is it possible to sort them alphabetically when adding a new one?

Regards

Submitted by support on Mon, 2018-03-05 16:44

Sure - edit admin/feeds_filters.php and look for the following code at line 10:

  require("../includes/filter.php");

...and REPLACE with:

  require("../includes/filter.php");
  asort($filter_names);

Cheers,
David.
--
PriceTapestry.com