[TYPO3-calendar] External Calendar with username and password

Christian Hernmarck linux at lists.hernmarck.ch
Mon Apr 11 09:14:16 CEST 2011


Hi

I don't want to create a login ...
http://svn.webempoweredchurch.org/issues/1714

So I write the part of the solution here....

If you use cURL then you either need to modify t3lib_div::getURL
(~/t3lib/class.t3lib_div.php)

Or insert a copy of this function into
{ext}/cal/service/class.tx_cal_icalendar_service.php
and modify this new function:

add this block at a good place (e.g. after the proxy support):

// User:Pass
$_myURL = parse_url($url);
if ($_myURL['user'] && $_myURL['pass']) {
 // if user and pass are given
 curl_setopt($ch, CURLOPT_USERPWD, 
   "{$_myURL['user']}:{$_myURL['pass']}");
 // generate new URL without user:pass (cURL dow not like user:pass)
 $_myNU = '';
 if ($_myURL['scheme'])   $_mNU .= $_myURL['scheme'].'://';
 if ($_myURL['host'])     $_mNU .= $_myURL['host'];
 if ($_myURL['path'])     $_mNU .= $_myURL['path'];
 if ($_myURL['query'])    $_mNU .= '?'.$_myURL['query'];
 if ($_myURL['fragment']) $_mNU .= '#'.$_myURL['fragment'];
 curl_setopt($ch, CURLOPT_URL, $_mNU);
}


This might work... but for the "non-cURL" users you need to modify at
a different place in the same function.

Maybe it's beeter to move this "bug" to the core development... (if it
does not already exist there...)


/Christian


Mario Matzulla schrieb am Samstag, 1. Mai 2010 19.21 im Beitrag
<mailman.1.1272734735.30264.typo3-project-calendar at lists.typo3.org>:

> Hi Emiliano,
> 
> Am 28.04.10 14:34, schrieb Emiliano Kamppeter:
>> Hell,
>>
>> first of all I would like to thank you for this marvelous
>> extension.
>>
>> I have a problem though...
>> I would like to use an External Calendar generated by eGroupware. I
>> do have a link to it, but I also have to be authenticated in
>> eGroupware to access it.
>> Therefore I tried the following address:
>> http://USERNAME:PASSWORD@domain.tld/groupdav.php/calendar/3.ics
>>
>> This does work in Sunbird and iCal, but unfortunately it doesn't
>> with calendar base...
>>
>> Do you have an idea how I could acomplish this?
> 
> This is currently not possible. The url you can enter in the backend
> doesn't support authentication. But please add it to our bugtracker
> [1]. Btw. sponoring is welcome ;)
> 
> Regards,
> Mario
> 
> [1] http://svn.webempoweredchurch.org/projects/calendar/issues/new
>>
>> Thanks a lot,
>>
>> Emil



More information about the TYPO3-project-calendar mailing list