CGCalendar not displaying list option
Posted: Fri Jul 15, 2011 8:59 am
Hi,
I really hope someone can help. I recently upgraded my version of CMS Made Simple from 1.5.4 to 1.9.4.2.
Everything works fine except I can not use the display='list' in the CGCalendar module.
Here is my tag :
{cms_module module="CGCalendar" category='Services' display='list' inline='1'}
and this is the error message I receive on the page:
Fatal error: Call to a member function RecordCount() on a non-object in /home/cchurch/public_html/modules/CGCalendar/function.displaylist.php on line 196
I have downloaded the file and looked at line 196 and it calls this function:
if($rs->RecordCount() > 0)
{
while($row = $rs->FetchRow())
{
$titleSEO = munge_string_to_url($row['event_title']);
$destpage = $module->GetPreference('defaultcalendarpage',-1);
$destpage=$destpage!=-1?$destpage:$returnid;
$destpage=$detailpage!=''?$detailpage:$destpage;
$prettyurl = sprintf($module->GetPreference('url_prefix','calendar')."/%d/%d-%s",
$destpage,
$row['event_id'],
$titleSEO);
$parms = array();
$parms['event_id'] = $row['event_id'];
$parms['display'] = 'event';
if( isset($parameters['lang']) )
{
$parms['lang'] = $parameters['lang'];
}
if( isset($parameters['eventtemplate']) )
{
$parms['eventtemplate'] = $parameters['eventtemplate'];
}
$url = $module->CreateLink($id, 'default',$destpage, $contents='',
$parms, '', true, '', '', '', $prettyurl);
$row['url'] = $url;
$row['author'] = $users[$row['event_created_by']]->username;
$row['authorname'] = $users[$row['event_created_by']]->firstname.' '.$users[$row['event_created_by']]->lastname;
====================
Unfortunately I don't know enough about code to understand how to fix it.
Charmie
I really hope someone can help. I recently upgraded my version of CMS Made Simple from 1.5.4 to 1.9.4.2.
Everything works fine except I can not use the display='list' in the CGCalendar module.
Here is my tag :
{cms_module module="CGCalendar" category='Services' display='list' inline='1'}
and this is the error message I receive on the page:
Fatal error: Call to a member function RecordCount() on a non-object in /home/cchurch/public_html/modules/CGCalendar/function.displaylist.php on line 196
I have downloaded the file and looked at line 196 and it calls this function:
if($rs->RecordCount() > 0)
{
while($row = $rs->FetchRow())
{
$titleSEO = munge_string_to_url($row['event_title']);
$destpage = $module->GetPreference('defaultcalendarpage',-1);
$destpage=$destpage!=-1?$destpage:$returnid;
$destpage=$detailpage!=''?$detailpage:$destpage;
$prettyurl = sprintf($module->GetPreference('url_prefix','calendar')."/%d/%d-%s",
$destpage,
$row['event_id'],
$titleSEO);
$parms = array();
$parms['event_id'] = $row['event_id'];
$parms['display'] = 'event';
if( isset($parameters['lang']) )
{
$parms['lang'] = $parameters['lang'];
}
if( isset($parameters['eventtemplate']) )
{
$parms['eventtemplate'] = $parameters['eventtemplate'];
}
$url = $module->CreateLink($id, 'default',$destpage, $contents='',
$parms, '', true, '', '', '', $prettyurl);
$row['url'] = $url;
$row['author'] = $users[$row['event_created_by']]->username;
$row['authorname'] = $users[$row['event_created_by']]->firstname.' '.$users[$row['event_created_by']]->lastname;
====================
Unfortunately I don't know enough about code to understand how to fix it.
Charmie