Wednesday 19 January 2011 6:19:20 am
To create an object without passing by the admin interface, you can use the php function eZContentFunctions::createAndPublishObject To make it accessible as webservice: - install the ggwebservices extension - put in the xmlrpc folder of an extension declared as 'xmlrpc provider' the following initialize.php file:
$server->registerFunction(
'ezp.publishcontent',
array( 'params' => 'struct' ),
'integer',
'Creates an object' );
function ezp_publishcontent( $params )
{
$obj = eZContentFunctions::createAndPublishObject( $params );
if ( is_object( $obj ) )
{
return $obj->attribute( 'id' );
}
return 0;
} - give your remote user access rights to execute that webservice and it should be ok
Principal Consultant International Business
Member of the Community Project Board
|