• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: SOLVED: CG Calendar search not working
PostPosted: Tue Jun 12, 2012 10:34 am 
Offline
Forum Members
Forum Members

Joined: Tue Mar 20, 2012 5:52 pm
Posts: 16
Sorry for long post - just wanted to get it all down first time.

CMSMS 1.10.3 (recently upgraded)
CG Calendar:1.9.6
CG extensions:1.29.1
PHP: 5.2.11

on page smarty:
{cms_module module="CGCalendar" display="list"}
placed this at top of CGcalendar list template as would like on all pages:
{cms_module module="CGCalendar" action="search"}

Issue: I just need a category search above the list display. I have removed date selection from the search template. and am now left with input fields for text term, search type and category.
All combinations seem to return "no results found...".

Does the search rely on having a start and end date to work?

I have run the debug facility in the search script and can see the following being passed to the page:

{$search_category} 2
{$search_end_date} null
{$search_start_date} null
{$search_text} ""
{$searchprompt} "Search"

AND with the following errors...

Notice: Undefined variable: search_start_date in .../html/modules/CGCalendar/action.searchresults.php on line 115

Notice: Undefined variable: search_end_date in .../html/modules/CGCalendar/action.searchresults.php on line 115

Notice: Undefined variable: search_start_date in .../html/modules/CGCalendar/action.searchresults.php on line 122

Notice: Undefined variable: search_end_date in .../html/modules/CGCalendar/action.searchresults.php on line 122

Notice: Undefined variable: search_start_date in .../html/modules/CGCalendar/action.searchresults.php on line 326

Notice: Undefined variable: search_end_date in .../html/modules/CGCalendar/action.searchresults.php on line 327

Calendar Search Results
Search Words:
Start Date:
End Date:
Category:

Notice: Undefined variable: query in
.../html/modules/CGCalendar/CGCalendar.module.php on line 540

Notice: Undefined offset: 1 in .../html/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc on line 320

The template for the search results is currently default:

{* original search result template *}
{debug}
<h3>{$mod->Lang('search_results')}</h3>
<p>{$mod->Lang('search_words')}:&nbsp;{$search_text}</p>
<p>{$mod->Lang('start_date')}:&nbsp;{$search_start_date|cms_date_format}</p>
<p>{$mod->Lang('end_date')}:&nbsp;{$search_end_date|cms_date_format}</p>
<p>{$mod->Lang('category')}:&nbsp;{if $search_category == '-1'}{$mod->Lang('cal_any_category')}{else}{$mod->GetCategoryName($search_category)}{/if}</p>
{if !isset($events)}
{$mod->Lang('no_results_found')}
{else}
<br/>

{* pagination stuff *}
{if isset($firstpage_url) || isset($lastpage_url)}
<div style="text-align: center;">
{if isset($firstpage_url)}
<a href="{$firstpage_url}">{$mod->Lang('first_page')}</a>&nbsp;
<a href="{$prevpage_url}">{$mod->Lang('prev_page')}</a>&nbsp;
{/if}
{$mod->Lang('page_of',$pagenum,$numpages)}
{if isset($lastpage_url)}
&nbsp;<a href="{$nextpage_url}">{$mod->Lang('next_page')}</a>
&nbsp;<a href="{$lastpage_url}">{$mod->Lang('last_page')}</a>
{/if}
</div>
{/if}

{* display the output *}
{foreach from=$events key=key item=event}
<div class="calendar-event">
<h4>{$event.event_title}</h4>

{assign var=month_number value=$event.event_date_start|date_format:"%m"}
{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
<div class="calendar-date-from"><span class="calendar-date-title">{$lang.date}: </span>{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y"}</div>
{else}
{if $event.event_date_start|date_format:"%d%m%Y" == $event.event_date_end|date_format:"%d%m%Y"}
<div class="calendar-date-from"><span class="calendar-date-title">{$lang.date}: </span>{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y %H:%M"} {$lang.to} {$event.event_date_end|date_format:"%H:%M"}</div>
{else}
<div class="calendar-date-from"><span class="calendar-date-title">{$lang.date}: </span>{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y %H:%M"} {$lang.to} {$event.event_date_end|date_format:"%d"} {$month_names[$end_month_number]} {$event.event_date_end|date_format:"%Y %H:%M"}</div>
{/if}
{/if}
{if $event.event_summary !="" && ($detail != 1 || ($event.event_details =="" || $event.event_details == "<br />"))}
<div class="calendar-summary"><span class="calendar-summary-title">{$lang.summary}: </span>{$event.event_summary}</div>
{/if}
{* optionally display detail information
{if $event.event_details !="" && $event.event_details != "<br />"}
<div class="calendar-details"><span class="calendar-details-title">{$lang.details}: </span>{$event.event_details}</div>
{/if}
*}
<a href="{$event.url}">{$mod->Lang('cal_more')}</a>

</div>
{/foreach}
{/if}


Last edited by son123 on Thu Jul 19, 2012 1:54 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: CG Calendar search not working
PostPosted: Wed Jun 13, 2012 5:59 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 11812
Location: Arizona
Try it with all default templates first then remove one piece at a time...

What did you mean by "on page smarty:" and why do I see...

{* original search result template *}
{debug}

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
 Post subject: Re: CG Calendar search not working
PostPosted: Fri Jun 22, 2012 2:35 am 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 11812
Location: Arizona
I take it you are trying to use cgcalendar search w/o the start end date select, if so, sorry, it has to have them...

You can put hard coded preselected start/end selects in the template and then hide them from front end, as seen here (not hidden)...

http://multiintech.com/modules/calendar.html Calendar search link on left...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
 Post subject: Re: CG Calendar search not working
PostPosted: Mon Jun 25, 2012 12:46 pm 
Offline
Forum Members
Forum Members

Joined: Tue Mar 20, 2012 5:52 pm
Posts: 16
Urmm.

While in an ideal would i only really need a category search at this point any working search would be a good place to be.

I set up a whole new install of cmsms and cgcalander plus it's cg extensions dependant and still not got a working calendar. then went to your demo calander to find the same issue.

for instance if you search on your demo calendar you search for:

text: bill
any word
your preset dates
any category

Nothing is return. Is it broken or am i missing something?


Top
 Profile  
 
 Post subject: Re: CG Calendar search not working
PostPosted: Sat Jun 30, 2012 9:37 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 11812
Location: Arizona
Try the second selection in Search Type: for it and it works...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting