Jump to content

Access IPB 4 internal functionality with standalone application


snugRugBug

Recommended Posts

I am investigating the possibility of writing a data import script that makes use IPB 4's internal APIs and functions. One example of how this might be useful might be add a few thousand users without having to touch the IPB database directly.

I would like this script to be located in a separate directory on the server so that I can use SVN easily, and keep everything nice and modular.

What I would like to know is if it possible to access this functionality from my separated script. If I ran init.php in my script, would it serve my desired purpose?

Thanks

Link to comment
Share on other sites

yup.  I have custom scripts on a site I am working on that just do things like this

 

require 'init.php'

$email = \IPS\Email::buildFromContent( "Email subject", "Email Body" );

$email->send( "someaddress@domain.com");

 

You can of course do the same thing but adding members instead (by creating new \IPS\Member objects...you can look at our installer under applications/core/sources/Setup/Install.php for an example where we create the first default admin account).

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...