View Full Version : adding Category Drop-down, or date Filters?
seventhfire
10-04-2005, 06:10 PM
I'm a newbe to php, I reviewed the FAQ concerning installing Category and Date Drop-downs but I don't understand what code has to be included to make this work. I've been through the demo file but believe it or not I'm having a dificult time understanding what part of the code does what. Can someone help me out here.
Seventhfire
Brian
10-04-2005, 06:16 PM
There is a plugin for the Category filter:
http://docs.easyphpcalendar.com/Plugins/Filter.htm
What type of date drop-down do you need (what's it purpose).
seventhfire
10-04-2005, 06:24 PM
I have an events page on my site and rather then update this page manually every time there's a new event, I thought I'd just use the calendars feature for listing current events. It would be a plus to let the users select the categories and date span for this page. Thanks
Brian
10-04-2005, 06:49 PM
Again, the categories can be done by using the filter plugin.
For dates, you could use a simple form and assign the month to the variable $mo and the year to the $yr variable, and they will pass these to the calendar when submitted on a page.
(I can try to dig up and example if needed..)
seventhfire
10-04-2005, 07:38 PM
I guess I'm going to need an example. When I added the line for the filter.php the page quit working completely.
http://www.coastalbendmc.org/calendar/current-events.php
There's something here I'm missing in understanding what basic information is needed to get the calendar to display.
I just realized my directory structure is different. I don't have a /calendar/Plugins directory?
Brian
10-04-2005, 11:12 PM
What version are you using?
seventhfire
10-05-2005, 09:09 AM
I'm on 6.2.11, hope to update today to lastest today.
Brian
10-05-2005, 09:45 AM
The plugin should be in the version you're using... Not sure why you wouldn't have it. Did you upload the files via FTP or use the auto-installer?
seventhfire
10-05-2005, 09:58 AM
I used the auto installer for 6.2.11, I just updated to the lastest using ftp, I see the filter there now, I'll go back over the previous information you gave me and see if that works. Thanks for the quick response.
seventhfire
10-05-2005, 10:12 AM
Still not working. There is something I'm missing here. When I insert the line to pull in the filter everything dies. I guess I need to read up some on understanding the basics of php. You have a nice product here but for someone like me making what would be a very easy change for some is next to impossible. I'm surprised some of the others using the product that have a beter understanding of php have not dumped some examples for those newbs like me. Thanks very much for the quick response. I'll be back after some reading up on php.
Brian
10-05-2005, 10:20 AM
Should be just adding the code to your page...
Can you attach a copy of your php current-events.php page here (zip it up), with the plugin code inserted?
I'll see if anything looks amiss.
seventhfire
10-05-2005, 10:43 AM
Here's the file zipped, I created a new file named test, let me know if you have any troubles with the zip file. Thanks for the assistance
seventhfire
Brian
10-05-2005, 10:50 AM
Try moving the plugin code after the OL code.
(The OL code initializes the variables used by the plugin).
Brian
10-05-2005, 11:03 AM
BTW, I've updated the documentation to show this and it will be uploaded when the next version is released. (Maybe today)
seventhfire
10-05-2005, 11:47 AM
Moving the plugin code around did not do anything, however I found that changing
<?php require("calendar/plugins/filter.php"); ?>
to
<?php require("plugins/filter.php"); ?> Worked like a champ!
So can I now just drop in the date drop down code and be all set?
One other question, is it possible to remove the calendar and just get a listing of events? Thanks for you help with this
Seventhfire :clap:
Brian
10-05-2005, 12:51 PM
Sure you can. Just remove the first require("calendar.php"); that's on a line by itself.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.