Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: 1 [2]   Go Down
Print
Author Topic: Different categories idea  (Read 1515 times)
0 Members and 1 Guest are viewing this topic.
yullah
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #15 on: April 16, 2003, 02:01:00 PM »

I can't get this feature to work at all... I've been playing with it for weeks... i'm just not a programmer by nature!

$20 paypal if someone would be willing to customise my script!

I need a search box feature right on the calendar (left margain near nav) that will search *all event fields*

and I need a drop down list that will filter events by location... (by state etc)

drop down search should return findings in the normal calendar view (grid & list) and the search box should return findings in list view as i have it set up.

also it is important that these functions work cross-browser

please email me if you can help me out with this!

thanks!!!

------------------

Logged
kd4rdb
New Member
*

Karma: 0
Offline Offline

Posts: 0

engineer


WWW
« Reply #16 on: April 23, 2003, 09:58:00 AM »

When listing a filter in the LIST view, the calendar will show a date for each event in the calendar even if no events are eligible to print.  This is a little annoying, so what I did was to duplicate the 'foreach eventlist' loop and set $event_flag if any events showed up. Then, the second time thru the 'foreach eventlist', I print the date header if the $event_flag had been set indicating an event should be printed.
Wes

<%-- LIST STYLE DISPLAY --%>
<CENTER><TABLE BORDER="0" WIDTH="90%"><TR><TD ALIGN="left">
<SPAN CLASS="text">
<DL>
<%$total_events=0;%>
<%FOREACH EVENTLIST%>
<%$event_flag=0;%>
<%IF EVENTS EXIST%>
<%FOREACH EVENT%>
<% if (($in{filter} eq "All") or ($in{filter} eq $EVENT->{'details'}->{'category'}) or ($EVENT->{'details'}->{'category'} eq "" )) { %>
<% next if (($EVENT->{details}->{eventtype} eq "Private") and ($EVENT->{details}->{author_id} ne $User->{username}) ); %>
<% next if (($EVENT->{details}->{eventtype} eq "Employee") and ("anonymous" eq $User->{username}) ); %>
<%$event_flag=1;%>
<% } %>
<%/FOREACH%>
<%/IF%>

<%IF EVENTS EXIST%>
<%$total_events++;%>
<% if ($event_flag eq "1") {%><DT><B><A HREF="<%=$CGI_URL_QUERYSTRING%>selected_datestring=<%=$DAY->{'datestring'}%>&datestring=<%=$DAY->{'datestring'}%>&view=Day" CLASS="text"><%=$DAY->{dayname}%>, <%=$DAY->{monthname}%> <%=$DAY->{dd}%></A></B><DD><%}%>
<%FOREACH EVENT%>
<% if (($in{filter} eq "All") or ($in{filter} eq $EVENT->{'details'}->{'category'}) or ($EVENT->{'details'}->{'category'} eq "" )) { %>
<% next if (($EVENT->{details}->{eventtype} eq "Private") and ($EVENT->{details}->{author_id} ne $User->{username}) ); %>
<% next if (($EVENT->{details}->{eventtype} eq "Employee") and ("anonymous" eq $User->{username}) ); %>
<% if ($_SHOW_GRID_EVENT_BULLET) {%>•<%}%>
<% if ($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START") { %>
<% if ($EVENT->{'schedule'}->{'start_time'}) { %><%= SCHEDULE FIELD(start_time) %><% } %>
<% } %>
<% if ($_SHOW_EVENT_TIMES eq "ALL") { %>
<% if ($EVENT->{'schedule'}->{'end_time'}) { %>-<%= SCHEDULE FIELD(end_time) %><% } %>
<% } %>
<% if (($_SHOW_EVENT_TIMES eq "ALL" | | $_SHOW_EVENT_TIMES eq "START") && ($EVENT->{'schedule'}->{'start_time'})) { %> : <% } %>
<A HREF="<%=$CGI_URL_QUERYSTRING%>view=Event&event_id=<%= EVENT FIELD(id) %>&datestring=<%=$DAY->{datestring}%>" STYLE="text-decoration:underline;" CLASS="text"><%= EVENT FIELD(machine) %> <%= EVENT FIELD(title) %></A><BR>
<% } %>
<%/FOREACH%>
<%/IF%>
<%/FOREACH%>
</DL>
<%unless($total_events){%>
<I><%= $_NO_EVENTS_LABEL %></I>
<% } %>
</SPAN>
</TD></TR></TABLE></CENTER>
<% } %>
<%-- END LIST STYLE DISPLAY --%>

[This message has been edited by kd4rdb (edited April 24, 2003).]

Logged
mraj
New Member
*

Karma: 0
Offline Offline

Posts: 0

Software Engineer


« Reply #17 on: February 25, 2005, 11:21:00 PM »

Instead of duplicating the eventlist loop, just do this:

<%-- LIST STYLE DISPLAY --%>
<CENTER><TABLE BORDER="0" WIDTH="90%"><TR><TD ALIGN="left">
<SPAN CLASS="text">
<DL>
<%$total_events=0;%>
<%FOREACH EVENTLIST%>
<%IF EVENTS EXIST%>
<%$total_events++;%>
<%my $eventsPerDay = 0;
my $header = "<DT><B><A HREF='${CGI_URL_QUERYSTRING}selected_datestring=$DAY->{'datestring'}&datestring=$DAY->{'datestring'}&view=Day' CLASS='text'>$DAY->{dayname}, $DAY->{monthname} $DAY->{dd}</A></B><DD>";%>

<%FOREACH EVENT%>
<%if($in{filter} eq "all" | | $in{filter} eq $EVENT->{'details'}->{'category'} or $EVENT->{'details'}->{'category'} eq "" ) { %>
<% if(++$eventsPerDay == 1) { print $header;} %>

New/modified lines are bold.
-- Mark

------------------

Logged

See some of my modifications to CalendarScript at
http://www.prayforoneanother.org/cgi-bin/cal/calendar.pl
mraj
New Member
*

Karma: 0
Offline Offline

Posts: 0

Software Engineer


« Reply #18 on: February 25, 2005, 11:27:00 PM »

Note that if you copy and paste TubaDave's code (from post #2 above), you might have problems because '| |' has a space inbetween the first | and the second |.  Remove any space.


This is not Dave's fault... seems to be a quirk with the bulletin board (because this post also has a space between | |).

[This message has been edited by mraj (edited February 25, 2005).]

Logged

See some of my modifications to CalendarScript at
http://www.prayforoneanother.org/cgi-bin/cal/calendar.pl
Pages: 1 [2]   Go Up
Print
Jump to: