Calendars


Calendars can be a very important tool for generating traffic and building an online community. Users who are granted access to post events to a calendar can set dates and create events so others in the community can come together and interact. Visitors are encouraged to return to see the updated future events, and new entries ensure your site remains current.

PostCalendar

PostCalendar is a very popular third-party module for many PostNuke sites. It has been released by its original developer and adopted by some of the core PostNuke developers. PostCalendar itself is not yet a core module, but it's likely that the module will eventually be part of the PostNuke package.

Version 4.0.1 is included with this book's additional materials. Current versions of PostCalendar are available on the PostNuke Network Operations Center (NOC) project site at http://noc.postnuke.com/projects/postcalendar/. Uncompress the archive and move the resulting PostCalendar directory tree over to your server's /modules/ folder.

Note

PostCalendar must have write access to these directories:

 /modules/PostCalendar/pntemplates/compiled /modules/PostCalendar/pntemplates/cache 

If you are using a specific server account for Web access, the account must be given permissions to write to both folders. On a Windows server, the web server process must have access.


Regenerate the module table and Initialize PostCalendar. You also need to click the Activate link to complete the install. The PostCalendar main administration screen has eight sections:

  • Settings Shows the default Global Settings page

  • Add Adds new events to the calendar

  • Clear Smarty Cache Forces a recompile of event information

  • Test System Lists system details and checks for permissions

  • Categories Defines color-coded groups for events

  • Queued Shows events waiting for approval

  • Approved Lists only the events currently approved

  • Hidden Displays all the currently nonvisible events

Click Test System first to be certain all your permissions are working. You need to fix any issues found in the test before testing out the calendar's options.

PostCalendar has an extensive manual available at http://www.postcalendar.tv/wiki/. Most of the module's features are intuitive and require no explanation, but if you don't understand how something works, try the information found in the manual first because it's very complete.

Now, you can add some events to PostCalendar. For this chapter, the examples center on live music performances. Table 7.1 displays two data examples used throughout the chapter. Click the Add link and enter both of these events into PostCalendar. Change the Month and Year fields to match the current date, and be certain to set the Sharing field to either "Public," for registered users, or "Global," for all users.

Table 7.1. Data Examples

Performer/Band:

Billy Plays Sax

Jenna Marx

Date:

February 10, 2006

February 11, 2006

Time:

8:00pm

7:00pm

Venue:

Blue 44

Boulevard Café

Address:

500 44th Street

938 E. Lincoln Blvd.

City/State:

Metropolis, ZA 12345

Metropolis, ZA 12345

Phone:

(123) 555-1234

(123) 555-5678

Contact:

John Smith

Jenna Marx

Email:

jsmith@billy-plays-sax.com

jenna@jennamarx.com


Users cannot see the events without making a PostCalendar block. Make a new block called Event Calendar and add it to your site with a Right position and the block name PostCalendar/Calendar Block.

You are presented with an additional screen of options; for this example, you need to check the Display the Calendar? and Display Upcoming Events in Block? check boxes. Set the Display How Many Events? field to 5 and the How Many Months Ahead to Query for Upcoming Events? field to 1. When you are done, it should look like Figure 7.1.

Figure 7.1. PostCalendar block settings.


Click the Commit Changes button, and return to your site's home page. Your calendar should appear with your other right blocks and have the information shown in Figure 7.2.

Figure 7.2. Calendar with upcoming events.


Click on the calendar month, and you are presented with the full-page version. Events are boxed in a color matching their category. The default category is red. You can see from this view that the default heading does not look attractive over events, so you should develop your own custom categories for your calendar to keep your site polished.

Note

The calendar display works off of the server's system date settings. If your server date and/or time is not correct, PostCalendar does not display the current date.


By default, the calendar uses variables defined in the site's theme for its only colors and interface. PostCalendar is fully configurable and you can develop a theme just for PostCalendar that is not connected with your site's theme.

pnConcert/pnEvent

pnConcert is a simplified event module designed to provide concert information in a calendar format. It is a much simpler module than PostCalendar, and if you find you don't need all the features of the larger module, pnConcert might work better for you. pnEvent is a hacked version of pnConcert that has all references to "concert" replaced with "event" to make it more general. Both modules install the same and have all the same interface screens.

pnConcert 0.4 is the version included with this text's online materials. At the time of this writing, the module is still very young with many as yet unimplemented features. The module developer has plans to port pnConcert to the upcoming PostNuke 0.8 where the module's development will be continued from there. You can check for a more recent version at http://sourceforge.net/projects/pnconcert/.

If your events are not related to music, you should try the pnEvent 0.4 that has also been made available with this book's materials.

Uncompress the pnConcert archive to a temporary folder location. The resulting pnConcert folder has two paths:

 pnconcert/html/includes/search/ pnconcert/html/modules/event/ 

The entire directory tree is not needed on your server; it was included in the archive as a guide to show you where to place the module files. The actual pnConcert module is contained in the concert directory. Copy the concert directory over to your site's modules folder.

Your PostNuke install already has a directory path of /includes/search/ off its root. The concert.php file must be copied to your server and into the matching location from the archive (/includes/search/concert.php). This file allows pnConcert content to be included in general PostNuke site searches.

Now, you can Initialize the module on the Modules Administration page. After regeneration of the list, pnConcert appears simply as concert, whereas pnEvent displays as event. The new module needs to be activated after installation.

Go to your main Administration page, and you see a new icon and link. pnConcert and pnEvent both use the same guitar icon. Inside the pnConcert administration, you have the following five options:

  • Add Concert

  • Approve Concerts

  • Show Only Next Concerts

  • Show All Concerts

  • Edit Module Configuration

To see how pnConcert works, add in the two sample events you used earlier (see Figure 7.3).

Figure 7.3. Adding a simple concert event.


Edited events are placed back into the approval queueeven if you are an administratorwhen making changes. It might seem like your event disappears from the listing after an edit, but the listing views only display approved events. Click the Approve Concerts link to preview and approve an event.

The Module Configuration page lets you adjust how many concerts you want to display per page and has a check box for enabling user submission of events. The current release of pnConcert doesn't have settings for separated permissions between users and site administrators. If you allow users to submit their own events, they can also edit or delete existing events.

Make a new block called Concert Events with the block selection of Concert/Show Next X Concerts Scheduled. Commit your changes and view the new block from the home page. You can see from Figure 7.4 that the events listing generated by pnConcert is similar to the Upcoming Events list with PostCalendar (see Figure 7.2).

Figure 7.4. A pnConcert events block.


Note

pnConcert blocks tend to require width space to prevent hard wrapping and content bunching. Try to keep your block width to at least 150 pixels, and if possible, use 200 pixels or more.


pnEvent blocks are designed to disappear completely if there are no future events to display. After new events are added, the block returns automatically.



    PostNuke Content Management
    PostNuke Content Management
    ISBN: 0672326868
    EAN: 2147483647
    Year: 2003
    Pages: 207
    Authors: Kevin Hatch

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