Calendar Blocks


As I mentioned, the module comes complete with a bunch of blocks that display upcoming events in the left or right columns of your site. These blocks are unfortunately named Calendar1, Calendar2, and so forth; you add them to your site's display using the Blocks item on the Administration menu, but first you need to figure out which one is which. Here's a cheat sheet:

  • Calendar1 shows events for only the current day.

  • Calendar2 is a monthly calendar with a daily events list.

  • Calendar3 is the cool scrolling list of upcoming events.

  • Calendar4 is the monthly calendar again, with links and a day/month view selection.

  • Calendar5 is an enhanced version of Calendar3.

  • Calendar6 is the same as Calendar4 but is designed to be a Center Block that appears at the top or bottom of your page, either above the module content or below it.

Some of the blocks are configurable, meaning they have options inside that you can edit to change their behavior or appearance. Figure 33.5 shows Calendar5.php opened in Windows Notepadnot, unfortunately, a pretty sight for the uninitiated.

Figure 33.5. Editing a calendar block in Windows Notepad.


In this one, you'll see some comments that give you some clues to what can be customized. Here's a section of the file, with the parameter in question boldfaced:

 /* Indicate here the numbers of days of events you want to have scrolled */ $days_to_see = 10; $noun="days"; if ($days_to_see == 1) { $noun="day"; } 

Changing the 10 to a 20 lists 20 days of upcoming events in the block instead of 10 days. Most of the rest of the file is incomprehensible unless you spend a lot of late nights working in the PHP programming language (that'd be me, by the way), so don't mess with it. General rule: You'll find the configurable stuff at the beginning of the file, with comments (surrounded by /* and */) telling you what to do.

Sidebar . FAQ

Can I use this module to give each user a private calendar?

No. I haven't run across any PHP-Nuke modules that do that, although that doesn't mean one doesn't exist out there somewhere. The Calendar module I cover here, at any rate, has just the one calendar for the entire site, so it's like a public calendar that you might find on the bulletin board in an office lunchroom.




    PHP-Nuke Garage
    PHP-Nuke Garage
    ISBN: 0131855166
    EAN: 2147483647
    Year: 2006
    Pages: 235
    Authors: Don Jones

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net