Skip Navigation

University of Nebraska–Lincoln

Web Developer Network Wiki

Herein Lies the Accumulated Knowledge of Mankind

UNL Event Publisher Installation

Contents

[edit] Downloading/Installation

The event publisher is divided into three packages which can all be installed on the same server or separated out for more advanced web server architectures.

To install the calendar system, you will need the PEAR Installer which is distributed with PHP. The PEAR installer will allow you to install PEAR packages from various servers on the Internet. Installation without the PEAR installer is not recommended.

From the command line on your web server, run the following commands:

pear upgrade pear
pear channel-discover savant.pearified.com
pear channel-discover pear.unl.edu
pear install --alldeps -f MDB2_Driver_mysqli unl/UNL_EventPublisher-alpha

Once the packages are installed, you should then run the post install scripts for the Event Publisher packages. This will setup the database, create default permissions, copy the necessary files to your web root directory, and create an account to begin creating events.

pear run-scripts unl/UNL_UCBCN
pear run-scripts unl/UNL_UCBCN_Manager
pear run-scripts unl/UNL_UCBCN_Frontend

[edit] Configuring Access

The 'frontend' is considered a public interface to the calendar and has no access restrictions.

The Manager is intended to provide a interface for users which will submit events or moderate which events are published to the general public.

By default, no authentication mechanism is provided with the Manager, but many external authentication mechanisms can be used.

Access for the Manager is controlled through the PEAR Auth package, and can utilize any backend supported by PEAR Auth. At UNL, LDAP authentication is used, but many other backends are supported, including a simple database of usernames and passwords.

[edit] Template Customization

The 'default' template is the UNL Template which is available externally, and expected to be available at http://localhost/ucomm/templatedependents/

The calendar system can handle different templates to change the visual appearance of the system. The easiest way to implement a new template is to copy the default template to a new directory and change the template reference within the index.php file for the frontend and manager. Most visual design changes can easily be applied by simply altering the included CSS, or by changing the Frontend.tpl.php file to your university html template.

[edit] Adding Event Types

bsteere has provided a sample console script for adding event types and calendars

  • add_eventtype.php
<?php
if ($_SERVER["argv"][1] == "--help" || !($_SERVER["argc"] == 2)) {
	echo "This program requires 1 argument.\n";
	echo "add_eventtype.php eventtype\n\n";
	echo "Example: add_eventtype.php Party\n";
	echo "That will add the eventtype Party. If \n";
	echo "the event already exists, it will not \n";
	echo "be re-added.\n";
} else {
	require_once 'UNL/UCBCN.php';
	$backend = new UNL_UCBCN(array('dsn'=>'mysql://eventcal:eventcal@localhost/eventcal'));


	// Backend is a UNL_UCBCN object.
	$eventtype = $backend->factory('eventtype');

	$eventtype->name = $_SERVER["argv"][1];
	if (!$eventtype->find()) {
		$eventtype->name = $_SERVER["argv"][1];
		$eventtype->description = $_SERVER["argv"][1];
		$eventtype->insert();
		echo "{$_SERVER["argv"][1]} has been added to the database.\n";
	} else {
		echo "{$_SERVER["argv"][1]} already exists and has not been re-added.\n";
	}
}

?>