Hi David,
As I mentioned in my post a couple of days ago, I have created aprox 4000 regex rules on one of my site and am just about to add aprox 2000 more. I wondered if you might be able to suggest how I could add a search box to the RegEx list screen so I can easily find a RegEx rule by name?
Thanks in advance.
Best regards
Chris
Hi David,
Thanks as always for your quick response. I've implemented the above which works perfectly.
Best regards
Chris
Hi Chris,
Sure - in admin/productsmap_regexp.php look for the following code around line 10:
$submit = (isset($_POST["submit"])?$_POST["submit"]:"");
...and REPLACE with:
$submit = (isset($_POST["submit"])?$_POST["submit"]:"");
$filter = (isset($_GET["filter"])?$_GET["filter"]:"");
And then look for the following code around line 64:
print "<h3>".translate("Existing Mappings")."</h3>";
...and REPLACE with:
print "<h3>".translate("Existing Mappings")."</h3>";
widget_formBegin("GET");
widget_textBox("Filter","filter",TRUE,$filter,"",3);
widget_formButtons(array("Filter"=>TRUE));
widget_formEnd();
if ($filter)
{
$sql = "SELECT * FROM `".$config_databaseTablePrefix."productsmap_regexp` WHERE name LIKE '%".database_safe($filter)."%' ORDER BY name";
}
You'll then be able to filter entries displayed as required (by keyword match against name)...
Cheers,
David.
--
PriceTapestry.com