You are here:  » copy filters ?

Support Forum



copy filters ?

Submitted by alecs on Thu, 2009-07-30 16:40 in

hi david...

the script works great now ... i like to sort and filter my
categorys now... but there`s no chance to start this from the
shell ... my provider says "no php commands from the shell (commandline)".

is there another way to copy filters (browser?) ?

thanks
alecs

Submitted by support on Thu, 2009-07-30 16:47

Hello Alecs,

I will email you a very easy mod to scripts/copyfilters.php so you can run it from a browser, by browsing to:

http://www.example.com/scripts/copyfilters.php?sourceFilename=[filename]&destinationFilename=[filename]

Cheers,
David.

Submitted by alecs on Thu, 2009-07-30 17:03

this support is extraterrestrial ! THANKS !

Submitted by Convergence on Sun, 2012-07-29 23:41

Hi David,

Is the browser version of scripts/copyfilters.php available for v12/10B? We would like it, please.

Thank you!

Submitted by support on Mon, 2012-07-30 08:20

Hi,

To convert scripts/copyfilters.php to support browser invocation (in addition to the command line) look for the following code at line 10:

  $argc = $_SERVER["argc"];
  $argv = $_SERVER["argv"];

...and REPLACE with:

  if (isset($_GET["sourceFilename"]))
  {
    $argv[1] = $_GET["sourceFilename"];
    $argv[2] = $_GET["destinationFilename"];
    $argc = 3;
  }
  else
  {
    $argc = $_SERVER["argc"];
    $argv = $_SERVER["argv"];
  }

Cheers,
David.
--
PriceTapestry.com

Submitted by Convergence on Tue, 2012-08-07 02:04

Hi David,

Anyway to do this with admins that are protected by a password?

Thanks!

Submitted by support on Tue, 2012-08-07 08:18

Sure - look for the following code at line 6:

  $admin_checkPassword = FALSE;

...and REPLACE with:

  if (isset($_SERVER["REQUEST_METHOD"]))
  {
    $password = (isset($_GET["password"])?$_GET["password"]:"");
    if ($password != $config_adminPassword)
    {
      header('HTTP/1.0 401 Unauthorized');
      print "<h1>401 Unauthorized</h1>";
      exit();
    }
    header("Content-Type: text/plain");
  }
  else
  {
    $config_adminPassword = "";
    $admin_checkPassword = FALSE;
  }

Cheers,
David.
--
PriceTapestry.com