You are here:  » Import All function

Support Forum



Import All function

Submitted by frychiko on Mon, 2007-11-05 14:14 in

Hi,

Is there an easy way to make an "Import All" function that I can plugin to the admin page? I would find this very useful during development.

cheers,
Peter

Submitted by support on Mon, 2007-11-05 14:18

Hello Peter,

Importing all feeds through the admin interface is not incorporated because of the timeout problems that it would cause; but there is of course the import.php automation script which can import all feeds using the @ALL parameter.

What you could do, is create a container script to call import.php @ALL from your admin section. You could do this with a script as follows:

importall.php

<?php
  $cmd 
"../scripts/import.php @ALL";
  
exec($cmd);
  
header("Location: index.php");
  exit();
?>

Save this script in your /admin/ folder, and then if you like you could add a link to it in admin/admin_menu.php.

Hope this helps,
Cheers,
David.

Submitted by frychiko on Mon, 2007-11-05 14:45

Cheers David, thanks for the quick replies as always.

Submitted by support on Mon, 2007-11-05 14:48

Hi,

The path to import.php was wrong in the above code - i've just corrected it - sorry about that!

Cheers,
David.