PDA

View Full Version : Is there an editable calendar in ILance?


Laurel
06-26-2008, 12:56 AM
I see some references to a calendar and am wondering if it is in the software, and if so, where do you edit it in the admin cp?

Peter
06-26-2008, 09:01 PM
I see some references to a calendar and am wondering if it is in the software, and if so, where do you edit it in the admin cp?

Hi There,

Well I have some good news. Basically, in a previous version of ILance we developed a calendar API widget which was to be used to present visually projects and auction listing events occuring on specific days.

We never ended up going that far (with so many other things going on) so we decided to leave that function in the software which can be used by any PHP developer. Let me show you how it works:


$ilance->calendar = construct_object('api.calendar');
$ilance->calendar->generate_calendar(date('Y'), date('m'), date('d'));
$ilance->calendar->setTableWidth('100%');
$ilance->calendar->setDayNameFormat('%A');

($apihook = $ilance->api('main_cp')) ? eval($apihook) : false;

// until we figure out the best method to use for the calendar widget, it will be temporarily disabled. -Peter
//$ilance->calendar->addEvent('21', 'Invoice for Escrow Account #12090239', '');

//$ilance->calendar->addEvent('23', 'test', 'test');
$mycalendar = '
<table class="tableborder" cellpadding="0" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tablehead_alt2" colspan="2" align="left">' . $ilance->calendar->getFullMonthName() . ' ' . date('Y') . '</td>
</tr>
<tr>
<td class="panelbackground" align="center">' . $ilance->calendar->display() . '</td>
</tr>
</table>';


As you can see, it's all there ready to be used. Specifically, look at the function $ilance->calendar->addEvent(). This is where your programmer will connect the dots to plot that data on the calendar.

He'll need to comment out the places we've commented and then present any information you'd like to show users when displaying this calendar. You're programmer will have no problem working with this aspect of ILance.

Let us know if you have any other questions.

Regards,
Peter