Tuesday 15 May 2007 2:56:41 am
The minimum that I've managed to get away with so far has been:
include_once('lib/ezutils/classes/ezini.php');
include_once('lib/ezutils/classes/ezsys.php');
include_once('lib/ezdb/classes/ezdb.php');
include_once('access.php');
include_once( "lib/ezutils/classes/ezdebugsetting.php" );
include_once( "kernel/classes/ezcontentobjecttreenode.php" );
/*!
Dummy function, required by some scripts in eZ publish.
*/
function eZUpdateDebugSettings( $useDebug = null )
{
}
$ini = eZINI::instance();
// This will get the default siteaccess name, or you can hard code it if you want
// $siteaccess = 'accessname';
$siteaccess = $ini->variable( 'SiteSettings', 'DefaultAccess' );
$access = array( 'name' => $siteaccess, 'type' => EZ_ACCESS_TYPE_DEFAULT );
$access = changeAccess( $access );
$node = eZContentObjectTreeNode::fetch( 2 );
var_dump($node);
You will probably need to change the paths to the includes.
eZpedia community documentation project | http://ezpedia.org
|