Easy PHP Calendar - We really take care of your dates!


Go Back   Easy PHP Calendar > General Discussion > Customizations (Themes / Templates)

Customizations (Themes / Templates) Help with customizing the themes and templates. Post your own custom themes for others to enjoy.

Closed Thread
 
Thread Tools Search this Thread Display Modes

Filter listmode for year?
Old 11-06-2005, 01:36 PM   #1
neubeedoo
Calendar User
 
neubeedoo is offline
Join Date: Aug 2005
Posts: 24
Default Filter listmode for year?

I have the calendar up on a site that need to archive their events in a particular way.

I currently have a ListMode on page that is set to lists all the events for the current year for a particular category. I do not need the filter plug in for a category change, as this category will never change.

But I would like some kind of dropdown YEAR selection - so that it shows the current year, but can view the previous year list by selecting the year in a dropdown -
Code:
<?php $LIST=1; $DF = "M d Y - l"; $listYear = "2005"; 
$template="modern1_2.php"; $noOld = 0; $showCat="1|4|2|5|"; require ("calendar/calendar.php"); ?>
So really, I'm just wanting to swap out the "$listYear=2005" with the year picked from the dropdown -
problably dead simple php for those who know it, but I haven't a clue -
any ideas or pointers - or possible future modification of the cat filter plugin?!!


thanks
- k
 

Old 11-06-2005, 05:54 PM   #2
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,907
Default

Just add a regular HTML form with the year selections in a drop-down and assign it to a name like selectYear.

Then add some code to your page that says:
PHP Code:
<?php
if (!$selectYear$selectYear=2005;
?>
This way, it will default to 2005, but will allow selections from the form for other year(s).
__________________
-- Brian

Questions?

Instructions | FAQs | Errors FAQ | Forums | Support
| Web Site Hosting
 

Old 11-06-2005, 07:50 PM   #3
neubeedoo
Calendar User
 
neubeedoo is offline
Join Date: Aug 2005
Posts: 24
Default

Like I said -- dead easy if you know this stuff - this is gonna take me 2 weeks ...
I know this isn't the place for tutorials in the basics, so I understand if I can't get the answer here directly ...
but just incase someone has a spare moment ...
So if I have:
Code:
<?php
if (!$selectYear) $selectYear=2005;
?>
then how do I plug in the result into the following:
Code:
<?php $LIST=1; $DF = "M d Y - l"; $listYear = "2005"; 
$template="events1_all1.php"; $noOld = 0; $showCat="1|4|2|5|"; require ("calendar/calendar.php"); ?>
$listYear="2005" in the above should now say what ... "$selectYear" ?? $listYear="$selectYear" ??
And how do I make the Form talk to all of this?
Code:
<form name="selectYear" action=" ????" method="????  ">
<div>
<select name="selectYear">
<option value="2004">2005</option>
<option value="2005">2004</option>
</select>
</div>
<input type="submit" name="Submit" value="???">
</form>
What would be the method and action?
---
Off to google some form and php tutorials ...

- k
 

Old 11-06-2005, 08:06 PM   #4
Brian
EPC Developer
 
Brian's Avatar
 
Brian is offline
Join Date: Jun 2001
Location: Florida, USA
Posts: 10,907
Default

I should have also said to change:

$listYear = "2005"; to $listYear = $selectYear;

Get or Post forms will work. You may need to chage the $selectYear variables to $_REQUEST[selectYear'] if your server has global variables disabled.
__________________
-- Brian

Questions?

Instructions | FAQs | Errors FAQ | Forums | Support
| Web Site Hosting
 

Old 11-06-2005, 09:01 PM   #5
neubeedoo
Calendar User
 
neubeedoo is offline
Join Date: Aug 2005
Posts: 24
Default

thanks - I'll give it a go ...
 
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjusting spacing on filter plugin cbaisden Customizations (Themes / Templates) 10 10-27-2005 02:34 PM
Filter on multiple categories mikejd General Support 10 10-19-2005 06:06 PM
Where is the "Advanced Filter screen" dan_cameron General Support 1 09-02-2005 06:33 PM



All times are GMT -4. The time now is 02:49 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright 2009 NashTech, Inc.

| Home | Register | Today's Posts | Search | New Posts |