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
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)drop down search by region
Pages: [1]   Go Down
Print
Author Topic: drop down search by region  (Read 509 times)
0 Members and 1 Guest are viewing this topic.
yullah
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: June 11, 2002, 01:37:00 PM »

my calendar lists events from all over the us. i would like to include a way for users to filter events by those that are in thier region.

does anyone know how I might include a drop down list by region or state?

this would go on the left side near that existing navigation (grid view etc)
either above or below all those boxes.

i know it is possible to do this through a search, selecting one state from the drop down list-

i'd like to have users choose one or more states, or organize states into regions, and show only those events, right from the calendar view.

any ideas would be greatly appreciated!!!

thanks,
Yullah
www.yullah.com

Logged
kayleigh
New Member
*

Karma: 0
Offline Offline

Posts: 0

Computer Analyst


WWW
« Reply #1 on: June 13, 2002, 06:47:00 PM »

I set up a separate custom field with a drop-down listing for regions & made it searchable; users select the region when they add events. They can then search by regions & get a listing of all the events within their region.

------------------
Stephanie Meemken
Webmaster, Minnesota Jaycees

http://www.mnjaycees.org/

Logged

Stephanie Meemken
Webmaster, Minnesota Jaycees

http://www.mnjaycees.org/
yullah
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: June 15, 2002, 12:28:00 AM »

thanks kayleigh,
i have that going right now- i was just wondering if i could add a search with that drop down list only right onto the calendar page to make it easier to search.

it might be more trouble than it's worth, and i don't want to do anything to slow down the calendar- it's already kind of loaded with over a hundred events -

but my users would appreciate a list that they could choose thier location from, maybe even on the home page (not the calendar default.html) this is just an idea, i don't know how doable it is. maybe with ssi...

any ideas?

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: June 15, 2002, 02:08:00 PM »

 
quote:
it might be more trouble than it's worth, and i don't want to do anything to slow down the calendar- it's already kind of loaded with over a hundred events

The jist of it is to make links that pass a unique variable and value back to the calendar. In the calendar template every place it prints the events (usually after <%FOREACH EVENT%> ), you set up a if conditional using the unique variable's value for whether to print the event HTML code or not. Eg.

Assuming the name of the unique variable you're using is $unique_variable and the value you are passing is actually one value from an event field's select list, something like the following could be used:

<%FOREACH EVENT%>

<% if ($EVENT->{'details'}->{'Real_Field_Name'} eg $unique_variable ) { %>

code to be printed here

<% } %>

If you passed "unique_variable=Region1" and the event to be displayed contained that value, it would be printed.

Or you could use something like:

<%FOREACH EVENT%>

<% next if ($EVENT->{'details'}->{'Real_Field_Name'} ne $unique_variable ); %>

In that case if the event to be displayed didn't contain that value, it would be skipped. This way is probably simpler.


Dan O.

BTW I think the actual overhead would be minimal as the information is already in an array so nothing extra would have to be loaded.

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

[This message has been edited by DanO (edited June 15, 2002).]

Logged
yullah
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: March 28, 2003, 07:48:00 PM »

Thanks for your reply DanO-

Unfortunately my mind is swimming in all that stuff- I'm not so hot with Perl etc...

would it be possible to put together a sample bit of code for me to try out? I want to have a drop down menu of states/regions right on the calendar interface that allows users to narrow down the calendar information to events in their area.

code:

<SELECT size=1 name=state>
<OPTION value=all>Show All</OPTION>
<OPTION value=AL>alabama</OPTION>
<OPTION value=AK>Alaska</OPTION>
<OPTION value=AR>Arkansas</OPTION>  
</SELECT>

something like this that would filter events to only show the region that is picked.

Can anyone give me some exact code to try out?  and please include what file to add it to- (default.html etc)

(event state IS currently a field on my calendar)

thanks!!!

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

[This message has been edited by yullah (edited March 28, 2003).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #5 on: April 01, 2003, 02:49:00 PM »

** I want to have a drop down menu of states/regions right on the calendar interface that allows users to narrow down the calendar information to events in their area. **

I believe that is discussed in the previous forum message Different categories idea.

Dan O.

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

Logged
Pages: [1]   Go Up
Print
Jump to: