[kronolith] What means "a:0:{}"

Ferdinand Gruber fer.grub at yahoo.de
Fri Apr 5 10:36:00 UTC 2019


Am 05.04.19 um 08:26 schrieb Ralf Lang:
> Hi Ferdinand,
>
> Am 04.04.19 um 22:09 schrieb Ferdinand Gruber:
>> Am 04.04.19 um 08:00 schrieb Ralf Lang:
>>> Let's do an exercise.
>>> We will need the external API of kronolith, especially
>>>
>>> put() https://github.com/horde/kronolith/blob/master/lib/Api.php#L263
>>> browser() https://github.com/horde/kronolith/blob/master/lib/Api.php#L58
>> The file kronolith/lib/Api.php already exists in my Horde directory.
>> Why should I download it ???
> I referenced the relevant lines with the method signatures and the
> documentation comments. I did not mean you should download that file.
>
>
>>> Create a new file kronolith/bin/events and make it executable (+x) - you
>>> could also use the horde admin php shell and select context Kronolith
>>>
>>> First some boilerplate
>>>
>>> #!/usr/bin/env
>>> php
>>>
>>> <?php
>>>
>>> $baseDir = __DIR__ . '/../';
>>> require_once $baseDir . 'lib/Application.php';
>>> Horde_Registry::appInit('kronolith', array('cli' => true));
>>>
>>> This initializes kronolith as admin.
>>>
>>> Now let's begin browsing.
>>>
>>> // authorize as lang (replace with your name)
>>>
>>> $registry->setAuth('lang', array(), array());
>>>
>>> // Dive into the calendar path step by step (app, owner, calendar)
>>>
>>> print_r($registry->call('calendar/browse', array()));
>>>
>>> // This gives you the available calendars both as a dir of individual
>>> event files and as an ics file of all events
>>>
>>> print_r($registry->call('calendar/browse', array('kronolith/lang')));
>>>
>>> // dive into one of these
>>>
>>> print_r($registry->call('calendar/browse',
>>> array('kronolith/lang/KI14jYtCMpbet4ecYzAg1bn.ics')));
>>> print_r($registry->call('calendar/browse',
>>> array('kronolith/lang/KI14jYtCMpbet4ecYzAg1bn')));
>> I created the file kronolith/bin/events as you described above.
>> Then I run:
>>
>> php ./events
>>
>> and I get the output - some arrays and the events in ICS format.
>>
>> But on the last line, I get an error message - i commented it out.
>>
> I reproduced that. Seems the old webdav API is broken for this use case.
> I will look into this later.
>
>
>> print_r($registry->call('calendar/browse',array('kronolith/ferdinand/gO9NqonqPBun1TwWNl148w1.ics')));
>>
>> //
>> print_r($registry->call('calendar/browse',array('kronolith/ferdinand/gO9NqonqPBun1TwWNl148w1')));
>>
>>> Now you know how to use the api and you see examples of event
>>> description structure.
>> Unfortunately I don't know anything how to use the API. In this case I
>> am an absolute beginner.
>> Please help.
>>
>> I don't know how to use the API in my project.
>>
>> I don't understand, how to use an API.
>>
> OK, give me some time. I will come up with a tested end user solution,
> but it will take some time - other work has priority.
>
> Can you please tell me in what format you have the events which you want
> to feed into kronolith?
>
> (csv, ics, ...)
>
> For ical format there is already a script you can use:
>
> https://github.com/horde/kronolith/blob/master/bin/kronolith-import-icals

Hi Ralph,

I apologize for my helplessness. Now I discovered the function put() 
inApi.php

     public function put($path, $content, $content_type)

I have a form on my site and I would like to try to submit the form as 
usual or over AJAX.
It seems to me, that I cannot simple pass the $_POST Array to the put() 
function as the second parameter ($content)?

If this is not possible, I will try to parse the $_POST Array into ical 
format. I need some time for this, it is my first contact with such things.

I will try something in the next days. I am very grateful for the tipps 
so far.

-- 
Regards from Austria
Ferdinand Gruber



More information about the kronolith mailing list