Active forum topics

©2006-2017 IAAI Software

Contact Us Privacy Policy

Support Plus

Category Hierarchy Reverse with new filter box

Submitted by sirmanu on Wed, 2017-10-11 10:50.

Hi.

Is it possible to add a new filter box in categories_hierarchy_reverse.php so the items that appears in the cells (class="edit") are filtered?
I have a big Category Hierarchy and it's difficult to select and find specific categories when all the tree appears in each row.

Thanks.

Submitted by support on Wed, 2017-10-11 12:34.

Hi,

Sure - to add a category hierarchy filter in addition to the feed category filter;

Edit admin/categories_hierarchy_reverse.php and look for the following code at line 12:

  $filter = (isset($_GET["filter"])?$_GET["filter"]:"");

...and REPLACE with:

  $filter = (isset($_GET["filter"])?$_GET["filter"]:"");
  $filterHierarchy = (isset($_GET["filterHierarchy"])?$_GET["filterHierarchy"]:"");

And then the following code at line 126:

  widget_textBox("Filter","filter",FALSE,$filter,"",3);

...and REPLACE with:

  widget_textBox("Filter","filter",FALSE,$filter,"",3);
  widget_textBox("Filter (Hierarchy)","filterHierarchy",FALSE,$filterHierarchy,"",3);

And finally the following code at line 194:

      print "<option value='".$value."'>".$option."</option>";

...and REPLACE with:

      if ($filterHierarchy && (stripos($option,$filterHierarchy)===FALSE)) continue;
      print "<option value='".$value."'>".$option."</option>";

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by sirmanu on Wed, 2017-10-11 17:49.

Excellent David, it works as expected.