Help on Calendar module - funky code when click on events [solved]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
CRobledo

Help on Calendar module - funky code when click on events [solved]

Post by CRobledo »

Hello,

I recently installed (and have been running) CMSMS version 1.0.2.  I've installed the Calendar module/plugin, created a Calendar css, and linked to that css from my CMSMS template just fine.  The calendar shows up correctly on the right page, and displays links to the events I entered. 

But, when I click on the event link to view that event entry, the following displays.
Can anyone please tell me what I am doing wrong?

Thank you,
Colleen Robledo



categories_table_name; $events_to_categories_table_name = $module->events_to_categories_table_name; $events_table_name = $module->events_table_name; $category = get_parameter_value($parameters, 'category', ''); $summaries = get_parameter_value($parameters, 'summaries', 1); $first_day_of_week = get_parameter_value($parameters, 'first_day_of_week', 1); $table_id = get_parameter_value($parameters, 'table_id', 'calendar-'.$id.$returnid); $event_id = get_parameter_value($parameters, 'event_id', -1); if($event_id == -1) { // no event echo '
Cannot find event
'; return; } $use_session = get_parameter_value($parameters, 'use_session', true); if($use_session) { $month = get_parameter_value($parameters, 'month', date('n'), 'calendar-month'.$id.$returnid); $year = get_parameter_value($parameters, 'year', date('Y'), 'calendar-year'.$id.$returnid); } else { $month = get_parameter_value($parameters, 'month', date('n')); $year = get_parameter_value($parameters, 'year', date('Y')); } $db =& $module->GetDb(); $where = 'WHERE'; $sql = "SELECT DISTINCT $events_table_name.* FROM $events_table_name WHERE event_id = $event_id"; $rs = $db->Execute($sql); if($rs->RecordCount() != 1) { // something's wrong echo '
Either event_id is not in the database, or there is more than one event with this id! ('.$event_id.')
'; return; } $event = $rs->FetchRow(); // pick up categories $sql = "SELECT DISTINCT $categories_table_name.* FROM $categories_table_name LEFT JOIN $events_to_categories_table_name ON $events_to_categories_table_name.category_id = $categories_table_name.category_id WHERE $events_to_categories_table_name.event_id = $event_id"; $rs = $db->Execute($sql); $categories = array(); if($rs) { $categories = $rs->GetArray(); } $return_url = $module->CreateReturnLink($id, $returnid, $module->lang('cal_return')); $day_names = $module->GetDayNames(); $day_short_names = $module->GetDayShortNames(); $month_names = $module->GetMonthNames(); if($first_day_of_week != 0) { for($i = 0; $i GetLabels(); // assign to Smarty $module->smarty->assign_by_ref('month_names', $month_names); $module->smarty->assign_by_ref('day_names', $day_names); $module->smarty->assign_by_ref('day_short_names', $day_short_names); $module->smarty->assign_by_ref('event', $event); $module->smarty->assign_by_ref('categories', $categories); $module->smarty->assign_by_ref('return_url', $return_url); $module->smarty->assign_by_ref('table_id', $table_id); $module->smarty->assign_by_ref('lang', $lang); $module->smarty->assign_by_ref('mo', $lang); // Display template if (isset($params['eventtemplate'])) { echo $module->ProcessTemplate($params['eventtemplate']); } else { $t = $module->GetTemplate('event'); if(empty($t)) { $module->SetTemplate('event', $module->GetDefaultTemplate('event')); } echo $module->ProcessTemplateFromDatabase('event'); } } ?>
Last edited by CRobledo on Thu Jan 04, 2007 4:44 pm, edited 1 time in total.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Help on Calendar module - funky code when click on events

Post by Dee »

That's PHP code from the Calendar module showing... it looks like a PHP file got partly uploaded (only the last bit, so the opening tag <?php is missing).
Try deleting the module folder and uploading it again.

Regards,
D
CRobledo

Re: Help on Calendar module - funky code when click on events

Post by CRobledo »

Thank you!..... clean reinstallation fixed it!
Locked

Return to “CMSMS Core”