Tommy, aka trf from the phpWebSite forums had an idea. What, if it would be possible to filter your sites' calendar by its category? Like: You select the “Party” category and would only see all parties in your Calendar
Well, I've seen that idea, talked to Tommy and we implemented it. The whole project didn't even take a week and I got a very generous amount of money on my paypal account.
v7 (2005-03-10) instead of simply setting all checkboxes in the category selector to false when the Master category is selected, I commented the whole check out. This wasn't exactly a good idea as it generated an "invalid argument" warning during the foreach loop in CatSel.php. Fixed in this version
The basics | |
---|---|
What do you need to use the hack? Actually, you only need a working phpWebSite installation. Installing it is also very easy. Just download this already patched version of it and boost it in like every other module. It will create a table called mod_calendar_trans where it can put “translations” of the category names. |
Using it | |
---|---|
As soon as you've installed the patched calendar module, you'll see something you aren't used to from other versions. Enter the Calendar and notice the line reading “Master”. Below it, you should read “apply filter” To filter categories, you click that apply filter link. The hacked Calendar module will show you all categories in fatcat together with a checkbox. If all or no categories are selected, it will revert to “Master”, which includes all categories. If you've chosen only one category, it will show that instead of “Master” together with “change filter”. If you've chosen more categories, but not all, they will show below the first one as “Including also”. |
Translating sections | |
---|---|
“if you have the rights to change settings, you will find a new link “map category names...” there. It will show every category together with a (probably) empty textbox next to it. In case you wouldn't want the calendar to show the categories the way they are entered in fatcat, you can change them here. This mapping only works in the calendar module. After entering all the translations you want to have, you click “go”. As there is no caching whatsoever, this change will be immediately visible to all current sessions after the next page load. |
Special URLs | |
---|---|
To override the user selection and to get informations at a glance, a webadministrator can use certain urls. ./index.php?module=calendar&show_cat shows you all entries of the calendar, together with their category as seen to the hack and the corresponding category translation ./index.php?module=calendar&cat_select=1,2,3 will set the current filter to filter the fatcat-categories 1, 2 and 3. Any applied user-filter will be reset. ./index.php?module=calendar&cat_select=all will reset the current filter. The calendar module shows the “Master” category, which includes all the calendar items. |
Comments - Make a comment |
The comments are owned by the poster. We are not responsible for its content.
|
AdministrativeTexts
updated by freddiemac1993, 2013-06-14
wiki
Re: adventures
created by brittdavis10, 2012-02-23 (1 rply, 3 views)
thread
Re: how to run phpwebsite...
created by alexander, 2011-08-25 (2 rpls, 3607 views)
thread
Re: Forum tags
created by HaroldFaragher, 2011-08-22 (3 rpls, 8488 views)
thread