Forums / Developer / Inserting article through code problem

Inserting article through code problem

Author Message

Kåre Køhler Høvik

Monday 05 July 2004 3:55:23 am

Try adding this to the start of your script :

include_once( 'kernel/classes/ezscript.php' );
$script =& eZScript::instance( array( 'debug-message' => '',
                                      'use-session' => true,
                                      'use-modules' => true,
                                      'use-extensions' => true ) );
$script->startup();
$script->setUseSiteAccess( $siteaccess );
$script->initialize();

Replace $siteaccess with your admin siteaccess.

--
Kåre Høvik

Kåre Høvik

Lior Solomon

Monday 05 July 2004 4:37:40 am

THANKS GOD!!!!
ein od milvado
thanks mate
i would really apreciate if you would mention it somewhere in you documantation
not talking about your fency new book
please i can imagine how many people waisted their time for this mistory
thanks again

Lior

Paul Forsyth

Tuesday 06 July 2004 6:44:55 am

You also need to explain your problem better. Your original post said nothing about the fact were using examples from the book.

paul

--
http://www.visionwt.com

Olav Bringedal

Thursday 24 February 2005 1:49:46 am

When doing this on the class "product" we got the same problems mentioned here. When we copied product-class and used that class instead, it worked like a dream. Something to do with access-rights maybe?


Senior Consultant
http://Umoe-consulting.no

Marvix Marx

Thursday 04 January 2007 6:33:36 pm

Hi there ..

did any one tested on 3.9 ?
How to run the code .. from ezp or stand alone ?
Where from will import the data ?

thx in adv