Anda di halaman 1dari 31

GCalendar 1.7.

1 Documentation 2007-2008 Brian Neal August 30, 2008

GCalendar Documentation
Version 1.7.1 - August 30, 2008 This documentation is best viewed with Internet Explorer 7, Firefox 1.x or 2.x, and Opera 9.

Table of Contents

0. Introduction 1. Copyright & License 2. Using GCalendar


o

2.1 User Functions


2.1.1 User Submitted Events 2.1.2 RSVP Feature 2.1.3 Editing Repeating Events 2.2.1 Approve Pending Events 2.2.2 Add Event 2.2.3 Edit Events 2.2.4 Categories 2.2.5 Options 2.2.6 Groups 2.2.7 About 2.2.8 Purge Expired Events Button

2.2 Admin Functions


3. Installation
o o o o o o o o o

3.1 Requirements 3.2 Uploading The Files 3.3 Database Table Installation 3.4 Changing GCalendar's Appearance With CSS 3.5 Modifying mainfile.php 3.6 Configuring The Supplied Blocks 3.7 Activating The Module And Block 3.8 View And Edit Icons 3.9 Right Blocks

4. Support & Contact Info

5. Donations 6. Change Log 7. Credits Appendix A - Using GCalendar on a 7.x Unpatched PHP-Nuke Appendix B - Sample CSS Definitions

Top

0. Introduction
Bienvenido a GCalendar, un calendario de eventos para PHP-Nuke Sistemas de Gestin de Contenidos! En la actualidad, GCalendar tiene las siguientes caractersticas: Informe mensual, semanal, diaria, y el individuo vistas de eventos Los eventos pueden repetirse a diario, semanal, mensual (de da o de la fecha) y anuales las ocurrencias individuales en la repeticin de los acontecimientos puede ser editado o borrado puntos de vista para imprimir Una imagen configurable se puede mostrar en todos los puntos de vista Los usuarios pueden enviar eventos con la aprobacin del administrador opcional admin opcional notificacin por correo electrnico de las presentaciones de un nuevo evento Los niveles de usuario presentacin: nadie, slo los miembros, cualquiera El uso de CSS, los administradores pueden personalizar la apariencia de GCalendar para que coincida con los temas de su sitio Los eventos se pueden clasificar en categoras especficas admin Las vistas pueden ser filtrados por categora de eventos 12 o 24 horas formatos de visualizacin de la hora Personalizable formatos de visualizacin de la fecha para apoyar a nivel mundial convenciones visualizacin de la fecha Configurable da primero de la semana Configurable fines de semana, fines de semana tienen diferentes clases de CSS Los bloques de prximos eventos (central y laterales) se suministran Los bloques muestran los eventos en un da como una punta de la herramienta Los eventos pueden tener opcionalmente una caracterstica de RSVP, el creador del evento puede ser enviado por correo electrnico cuando alguien RSVP o cancela La seguridad era una prioridad en el desarrollo de este cdigo, la entrada del usuario es filtrado y esterilizado Una lista configurable de las etiquetas HTML son aceptados en todas las entradas del usuario Opcin de "auto-linking", caracterstica de la entrada del usuario Integracin con RavenNuke 2.10 's editor WYSIWYG

Integracin con los grupos de NSN. Slo grupos especficos pueden enviar eventos, grupos especificados no necesitan que sus eventos aprobados, y las categoras de eventos se pueden asignar a grupos. "evento de correo electrnico a amigo" compatible con XHTML 1.0 Transicional GCalendar es un nuevo mdulo de PHP-Nuke, escrito especficamente para mi sitio. Lo estoy liberando la esperanza de que otros lo encuentran til. He basado el aspecto y el funcionamiento de NuCalendar, que se basa en WebCalendar. Me gust NuCalendar, pero yo quera repetir eventos como el calendario de mi Palm Pilot. Por lo tanto GCalendar naci. No se utiliz cdigo de NuCalendar, es un desarrollo completamente nuevo. Les agradecera mucho cualquier retroalimentacin y sugerencias de caractersticas para futuras versiones de GCalendar. Ver la informacin de contacto y el apoyo ms adelante en este documento.
Top

1. Copyright & License


GCalendar is Copyright 2007-2008 by Brian Neal.

GCalendar hace uso de la clase InputFilter PHP que es Copyright by Daniel Morris. La clase InputFilter fue modificado por Louis Landry para el CMS Joomla. La versin de Joomla fue modificado por Brian Neal en una forma algunos pequeos, consulte el archivo class.gcInputFilter.php para ms detalles.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 021101301 USA A copy of the GNU General Public License (GPL) is in the file COPYING in the top-level directory of the archive file. You may also find more information on the GPL at the GNU website.

Top

2. Using GCalendar
Top

2.1 User Functions


Esperemos que las caractersticas del usuario de GCalendar son bastante intuitivo por lo que no se molestar en explicar la mayora de ellos en detalle. Sin embargo, algunas caractersticas merecen algunos comentarios adicionales, a continuacin.
Top

2.1.1 User Submitted Events


Si ha configurado para permitir GCalendar eventos de usuario submittable (ver las opciones de administracin), una "Enviar Evento" enlace estar disponible para el usuario. El usuario puede hacer clic en este y luego llenar un formulario que describe el evento. Cuando el usuario enva el formulario, el evento puede ser activa inmediatamente o vaya en una cola de espera de la aprobacin. Una notificacin por correo electrnico de envo de eventos tambin se pueden enviar. Vea las opciones de administracin para obtener ms informacin.
Top

2.1.2 RSVP Feature


Nuevo a la versin 1.5.0 es una "RSVP" caracterstica. Si la funcin de confirmar su asistencia, los usuarios pueden enviar eventos con un valor de un evento de RSVP pone en "No RSVP", "Permitir RSVP" o "Permitir RSVP con notificaciones por correo electrnico". Si RSVP est permitido, otros usuarios pueden "suscribirse" a los acontecimientos, y GCalendar mantendr una lista de usuarios que han RSVP'ed a tales eventos. Si las notificaciones de correo electrnico est permitido en el panel de administracin, y el usuario que ha creado el evento seleccionado "Permitir RSVP con notificaciones por correo electrnico", el usuario ser notificado por correo electrnico cuando alguien RSVP o cancela su RSVP. Vea la seccin de opciones de administracin para obtener ms informacin.
Top

2.1.3 Editing Repeating Events

En la versin 1.6.0, la posibilidad de editar eventos que se repiten se mejor considerablemente. Al editar un evento que se repite de una de las vistas del calendario, el usuario o el administrador puede realizar lo siguiente: Modificar una sola aparicin - esto crear una "excepcin" a la cita repetitiva Modificar el actual y todos los incidentes en el futuro - esto va a cambiar la fecha de finalizacin del evento ya existentes y crear un nuevo evento con los datos modificados Modificar todos los eventos de la serie, pero mantener la fecha original de inicio Modificar todos los eventos de la serie, incluyendo el cambio de la fecha de inicio Si el administrador ha permitido a los usuarios actualizar sus eventos, a continuacin, tenga en cuenta que un usuario puede crear nuevos eventos sin la aprobacin inicial de la modificacin de su evento que se repite en la forma anterior. Si un administrador intenta editar un evento que se repite desde el panel de administracin, GCalendar no sabe qu fecha especfica en la serie que desea modificar. Por lo tanto slo se puede cambiar todos los eventos de la serie en el panel de administracin. Si no se desea, edite el caso de la parte de usuario del mdulo.
Top

2.2 Admin Functions


En el rea de administracin de GCalendar, los administradores se les presenta con 5 sub-mens y un botn de "purga". Estos se describen a continuacin.
Top

2.2.1 Approve Pending Events


Si ha configurado para requerir la aprobacin GCalendar para eventos enviados por los usuarios, este men muestra una tabla de eventos pendientes. La tabla se puede ordenar por ID de evento, fecha de inicio, el ttulo y presentador haciendo clic en los encabezados de columna. Para aprobar un evento, haga clic en el icono Editar en la columna Acciones. En la parte inferior del formulario de evento es una casilla de verificacin para su aprobacin. Marque esta casilla y pulse el "evento de actualizacin" para aprobar el evento. Eventos pendientes tambin se pueden eliminar por una seleccin de mltiples eventos y haga clic en "Eliminar Eventos seleccin".
Caution: Once an event is deleted there is no way to recover it except for restoring a database backup (assuming someone made one...). Top

2.2.2 Add Event


Esta forma permite que un administrador para aadir un evento. El evento es aprobado automticamente por defecto. El "presentado por" caja automticamente se rellena con "Admin". Este nombre puede ser sustituido por otro nombre de usuario si est llenando el formulario en nombre de un usuario. De lo contrario, dejarlo como "Admin".
The default Admin name can be changed by editing the file modules/GCalendar/language/lang-<language>.php. See the constant _ADMIN_NAME. Top

2.2.3 Edit Events


Este men se muestra una tabla de todos los eventos aprobados. La tabla se puede ordenar por ID de evento, fecha de inicio, el ttulo y presentador haciendo clic en los encabezados de columna. Los eventos pueden ser vistos y editados aqu por la utilizacin de los iconos de la columna "Acciones" para cada evento. Los eventos tambin se pueden eliminar por una seleccin de mltiples eventos y haga clic en "Eliminar Eventos seleccionados"
. Caution: Once an event is deleted there is no way to recover it except for restoring a database backup (assuming someone made one...). Top

2.2.4 Categories
Este men presenta un formulario para editar las categoras de eventos GCalendar. Las categoras pueden ser utilizados para categorizar los acontecimientos y puede ser usada en los bloques en el futuro. Las siguientes funciones se pueden realizar aqu. Modificar una categora existente - seleccione una categora, modificar la descripcin en la casilla correspondiente, y luego presione el botn "Modificar Categora seleccin". Aadir una categora - llenar la casilla situada junto a la "Categora Agregar" y luego haga clic en "Agregar categora" botn. Eliminar una categora - seleccione una categora, haga clic en "Eliminar Categora seleccin".
Be careful about deleting categories if there are still events that reference them.

Ttulos de eventos son de estilo nico con CSS en la vista mensual de acuerdo a la categora. Mueva su ratn sobre los nombres de categora en la lista de eventos para ver cada uno de ID de la categora, o consulte la tabla en la parte inferior de la pgina. Vea la seccin 3.4 para ms informacin sobre este CSS categora. De esta manera, un administrador puede ttulos de estilo en diferentes colores, fuentes, bordes, etc de acuerdo a la categora.
Top

2.2.5 Options
1. Este men presenta una forma que le permite personalizar el comportamiento y la apariencia de GCalendar. 1. Ttulo - Este texto se mostrar en las vistas mensual, diaria, y el evento. 2. Imagen - Si este campo no est en blanco, se supone que es un camino a una imagen. Esta imagen se mostrar por encima del ttulo en la vista mensual, diaria, y el evento. 3. Min Ao - Este ao es el ms pequeo que GCalendar operar en (mostrar al usuario como una opcin). Utilizar para controlar cuntos aos aparecen en los cuadros desplegables. Lea la siguiente nota de los lmites de seguridad de Min y Max ao. 4. Ao Max - Este es el mayor ao en el que operar en GCalendar (se muestra al usuario como una opcin). Utilizar para controlar cuntos aos aparecen en los cuadros desplegables. Lea la siguiente nota de los lmites de seguridad de Min y Max ao. 2. 2. Envos de los usuarios - Esta opcin controla qu clase de usuarios normales que se pueden presentar eventos. Administradores siempre pueden aadir eventos. Las opciones son: Nadie o - No se puede enviar eventos. Miembros o Slo - Slo los miembros registrados pueden enviar eventos. Cualquier persona o - Cualquier usuario, incluidos los no registrados (annimo), los usuarios pueden enviar eventos. o Grupos - Slo los grupos especificados en las opciones de los grupos pueden presentar eventos. Nota: debes tener instalado Grupos NSN para utilizar esta caracterstica. Algunas distribuciones Nuke, como RavenNuke, han Grupos NSN ya est instalado. 3. Se necesita aprobacin eventos - Comprobacin de las cajas este medio todos los eventos enviados por los usuarios deber ser aprobado por un administrador. Si no se controla, los eventos se agregan automticamente a la agenda sin la aprobacin del administrador. 4. Los usuarios pueden actualizar sus eventos - Esta opcin permite a los usuarios actualizar / editar sus eventos aprobados que previamente presentarse en cualquier momento. Sus actualizaciones no requieren de aprobacin de administrador. 5. Formato de hora - Seleccione de entre 12 horas (AM / PM) o 24 horas de tiempo de militar. 6. Primer da de la semana - Elija el primer da de la semana para las vistas mensual y semanal.

7. Das de semana - Elija los das que se consideran los fines de semana en su localidad. Esto va a generar diferentes clases CSS para los fines de semana, lo que permite el estilo de manera diferente. Vea la seccin 3.4 para ms detalles. 3. 3. Formatos de fecha - A fin de apoyar el gran nmero de formatos de visualizacin de la fecha en uso en todo el mundo, GCalendar utiliza un mtodo de cadena de formato para mostrar fechas. Esto proporciona una gran flexibilidad, pero quizs es un poco confuso para los no programadores. Administradores deben proporcionar una cadena de plantilla que instruye GCalendar cmo mostrar las fechas. Esta plantilla contiene marcadores de posicin para indicar dnde se debe mostrar el da, mes, ao y los valores. Adems, los personajes de la fecha habitual puntuacion, tales como. , / Etc se pueden poner en la plantilla. Adems, pide GCalendar administradores para proporcionar tres cadenas de plantillas de la siguiente manera: 1. Fechas corto - Se utilizan en bloques, o en cualquier lugar que no hay una gran cantidad de espacio en la pantalla. Por lo general, slo indican el da y nmero de meses y dejar el ao fuera. 2. Fechas regulares - GCalendar utiliza las fechas regulares en los puntos de vista todos los das y para la visualizacin de la fecha de hoy. Por lo general, indicar el nmero de das, el nombre del mes y ao en una fecha regular. 3. Fechas de largo - GCalendar utiliza la fecha larga en el ttulo de la vista del da, y en el campo Notas en las vistas de da para la repeticin de los acontecimientos. La intencin era permitir a los administradores para mostrar el da de la semana en el nombre adems del nmero de das de costumbre, el nombre del mes y ao.
Here are the placeholders that GCalendar recognizes. Note that these placeholders are a subset of the conversion specifiers as used in the PHP function strftime().

Date Format String Placeholders

Placeholder

Meaning

%A

full weekday name

%Y

full 4 digit year

%C

century number (00-99)

%B

full month name

%m

month as a decimal number (01-12)

%d

day of the month as a decimal number (01-31)

Here are some examples you can use for your format strings.

Example Format Strings

Type

Format String

Displayed As

Short Date

%m/%d

01/31

Short Date

%d.%m

31.01

Regular Date %B %d, %Y

January 31, 2007

Regular Date %d. %B %Y

31. January 2007

Long Date

%A, %B %d, %Y Wednesday, January 31, 2007

You can put whatever you like in a format string, up to 16 characters. It is recommended you only put the month number and day number in the Short Date template, as short dates are typically displayed where there isn't a lot of room (like in blocks). The author would appreciate it if you could send him sample format strings for your country. A future version of GCalendar could provide suitable format string choices in the install script.

4. Etiquetas HTML permitidas - GCalendar ofrece su propio sistema de filtrado de HTML que es independiente de PHP-Nuke. Rellene este campo con una lista separada por comas de las etiquetas HTML que desea permitir en el ttulo,

ubicacin, y las cajas de detalles para eventos. 5. Admite los atributos de etiquetas HTML - GCalendar ofrece su propio sistema de filtrado de HTML que es independiente de PHP-Nuke. Rellene este campo con una lista separada por comas de los atributos de las etiquetas HTML que desea permitir en el ttulo, ubicacin, y las cajas de detalles para eventos. 6. Enable Auto-Links - Al seleccionar esta opcin hace que GCalendar de forma automtica "enlace activo" de texto que el usuario ha introducido para la ubicacin del evento y los detalles. Un usuario que no tiene conocimiento sobre HTML puede introducir un enlace en el www.something.com forma o http://somesite.org. GCalendar concluir este texto en etiquetas HTML <a> para fines de visualizacin, lo que los enlaces. No visibles espacios tambin se inserta en los enlaces para que los vnculos mucho tiempo no se estira mesas y contenedores. Tenga en cuenta que estos espacios no visibles, de hecho, se muestra en Internet Explorer 6. He intentado encontrar un compromiso, pero la solucin que yo uso no funciona en Internet Explorer 7, Firefox 1 y 2 y Opera 9. Yo soy simplemente renunciar a este tema y dejar que se vea fea (pero funcional) en IE6. Esperamos que usted y sus usuarios pueden utilizar mejor los navegadores. 7. Utilice el Editor del RavenNuke - Marque esta opcin si est utilizando RavenNuke 2.10 o ms y desea usar el editor WYSIWYG para aadir y editar los detalles del evento. Tenga en cuenta debe tener activado el editor en su archivo rnconfig.php para que esto funcione. Adems, GCalendar utilizar check_html RavenNuke () de serie la funcin y lugar de instalacin AllowedHTML filtrado GCalendar para el campo de los detalles del evento, con esta opcin. 8. Campo Lugar requerido - Marque esta casilla si desea que los usuarios que llenar el campo de ubicacin cuando un usuario introduce un nuevo evento. Recuerde que no todos los eventos tienen una ubicacin (por ejemplo vacaciones). 9. Detalles del evento Campo obligatorio - Marque esta casilla si desea que los usuarios que llenar el campo de datos cuando un usuario introduce un nuevo evento. 10. Mostrar leyenda Categora - Marque esta casilla si desea que el "Legend Gnero" que se mostrar en las vistas del calendario. Esta leyenda tambin permite a los usuarios filtrar los eventos que se muestran con JavaScript. 11. RSVP - Esta caja controla la funcin de RSVP. Las opciones son "off", "on", o "con notificaciones por correo electrnico". La eleccin de "on" o "con notificaciones por correo electrnico" permitir a los usuarios que presenten eventos para seleccionar las opciones de confirmacin de asistencia a su evento. Seleccione la opcin "a" si desea permitir que la funcin de confirmar su asistencia, pero no permitir que las notificaciones de correo electrnico. 12. Sin perjuicio de RSVP Email - El contenido de este cuadro ser utilizada como el tema de mensajes de correo electrnico de notificacin de RSVP RSVP si est habilitado. Se sugiere poner el nombre del sitio en el tema. 13. Notificacin por correo electrnico de nuevos eventos - Al marcar esta casilla, GCalendar para tratar de enviar una notificacin por correo electrnico cada vez que un usuario ha enviado un nuevo evento. Si se selecciona esta casilla, asegrese de que las cajas de correo electrnico relacionados con (a continuacin) se rellenan correctamente.

14. A la direccin de correo electrnico - Escriba una lista separada por comas de direcciones de correo electrnico que se envi un correo electrnico de notificacin si activa la notificacin. 15. Correo electrnico de Direccin - Escriba una direccin de correo electrnico de que aparecer en cualquier correo electrnico de notificacin de GCalendar. 16. Asunto del correo electrnico - Escriba un asunto que aparecer en cualquier correo electrnico de notificacin de GCalendar. 17. Mensaje de correo electrnico - Escriba el texto del mensaje que aparecer en cualquier correo electrnico de notificacin de GCalendar.
Safe ranges for years are 1902-2037 for most Unix/Linux servers. Windows servers typically only support years in the range of 19702037. Using a min or max year outside of the safe range will produce erroneous calendar displays for dates outside the safe range. If you are running your PHP-Nuke on the open internet, it is recommended you set the User Submissions option to "Members Only" or "Groups" if you want to allow user submissions. Otherwise, set it to "Nobody". If you set it to "Anyone" you may start getting spam events. If you are running your PHP-Nuke on the open internet, it is recommended you set the Events Require Approval option to checked (yes). This will mean more work for you to approve events, but will cut down on spam events. Top

2.2.6 Groups
Usted debe tener instalado Grupos NSN para utilizar esta caracterstica. Algunas distribuciones Nuke, como RavenNuke, han Grupos NSN ya est instalado. Esta pantalla contiene dos formas. La forma superior dispone de dos funciones. Para cada grupo que ha creado, usted puede controlar si se pueden presentar eventos y si los eventos requieren de aprobacin de administrador. Tenga en cuenta que debe tener el conjunto de Envos de usuarios la opcin de grupos con el fin de permitir o restringir los grupos de la presentacin de eventos. Por tanto, si desea permitir que todos sus miembros a ser capaz de enviar eventos, establecer la opcin de Envos de usuarios a los miembros solamente. Sin embargo, si desea permitir que slo ciertos grupos a presentar eventos, establezca la opcin Envos de usuarios a los grupos y seleccionar los grupos de aqu. La funcin de aprobacin de administrador es independiente de la configuracin de Envos de usuarios. Que funcionar independientemente de la configuracin del usuario Envos. La forma ms baja se utiliza para asignar categoras a los grupos. Seleccione un grupo en el cuadro de la izquierda, a continuacin, seleccionar los grupos

que desea asignar esa categora en el cuadro de seleccin derecha. Se pueden asignar varios grupos a una categora. Este es un navegador especfico, pero por lo general un control-clic o Mays-clic se puede utilizar para seleccionar varios grupos. Recuerde pulsar el botn de actualizacin de la categora para guardar la configuracin para cada grupo. Si una categora se asigna a un grupo, los eventos en estas categoras slo son visibles para los miembros del grupo.
Top

2.2.7 About
This menu item displays some information about GCalendar. Top

2.2.8 Purge Expired Events Button


Clicking this button deletes events that have expired. This deletes any nonrepeating event with a start date in the past. It will also delete repeating events that have an end date in the past. Caution: Once an event is deleted there is no way to recover it except for restoring a database backup (assuming someone made one...). Top

3. Installation
Follow these steps if you are either installing GCalendar for the first time, or upgrading from a previous version. As a precaution, you should always back up your site's databases and files before installing any new module or block. Top

3.1 Requirements
Please read this section carefully. GCalendar has somewhat stricter requirements than some PHP-Nuke modules. GCalendar currently requires:

1. PHP-Nuke 7.6 (or higher) with Chatserv's patches (found at


www.nukeresources.com). GCalendar has been reported to work on PHPNuke 8.0 and 8.1 (but the author doesn't recommend this). You can make GCalendar run on an unpatched 7.x series Nuke by following the instructions in Appendix A. Note that using an unpatched version of PHPNuke is NOT recommended. GCalendar may or may not run on a PHPNuke earlier than 7.6. The author of GCalendar highly recommends RavenNuke. RavenNuke is the most secure, stable, and supported PHPNuke distribution. GCalendar contains support for using the WYSIWYG editor found in RavenNuke.

2. A webserver running PHP 4 (tested with 4.3.11 and 4.4.2), or PHP 5


(tested with 5.2.2).

3. GCalendar supports the MySQL database only. It has been tested with
MySQL 4.1.10a and 5.0.41. It has been reported to work under MySQL 4.0.x. Top

3.2 Uploading The Files


The archive you should have received these files in contains a "html" directory. The contents of this directory, not the directory itself, should be uploaded to the root of your PHP-Nuke installation while maintaining the directory structure of the archive. In other words, the gcal_install.php file should be placed in the same directory as your existing config.php file, the blocks/block-GCalendar.php file should go into your <PHP-Nuke root>/blocks directory, etc. Top

3.3 Database Table Installation


Once the files have been uploaded, you need to install the GCalendar database tables. This is accomplished by running the gcal_install.php script. Open a web browser and navigate to your site's main page. In your browser's URL bar, execute gcal_install.php. For example, if you access your site as www.yoursite.com, you would type in www.yoursite.com/gcal_install.php. This script will present you with several choices: a fresh install, or various upgrades from previous versions. Please select accordingly, then click the go button. The script will then create and populate (or alter) the necessary

database tables for GCalendar. After running the install script, immediately delete it from your server. Important: Please delete the gcal_install.php file from your server immediately after running it! Top

3.4 Changing GCalendar's Appearance With CSS


GCalender emits CSS class information that allows admins to alter the appearance of GCalendar to match their own personal taste and existing site themes. If you are unfamiliar with CSS, there are many good references and tutorials on the web, for example The WDG Guide to CSS. You will typically place your CSS in your themes/<your_theme>/style/style.css file, where your_theme is your theme you wish to modify. Note that GCalendar doesn't have to have any CSS defined for it. It will look reasonably well without it (but nothing spectacular). Some example CSS can be found in Appendix B and in the css directory of the GCalendar distribution archive. You may wish to start with those definitions and modify it to your tastes. The GCalendar event form (used for submitting and editing events) uses the following CSS classes:

gcal-error - for form error messages form.gcal-event-form - the event form will be given this class name form.gcal-event-form .normal-label - non-error labels on the event form will by styled with this class form.gcal-event-form .error-label - error labels on the event form will by styled with this class

The supplied block, block-GCalendar.php, uses the following CSS classes:


table.gcal-block-cal - The mini-calendar that appears in the block. table.gcal-block-cal a.today - The link for the current day in the block calendar. table.gcal-block-cal td.no-day - For table cells in the calendar that are not days in the current month.

table.gcal-block-cal td.day-no-event - For table cells in the calendar that are days without any events on them. table.gcal-block-cal td.day-event - For table cells in the calendar that are days with events on them. table.gcal-block-cal td.today-no-event - For the table cell in the calendar that represents today without any events on it. table.gcal-block-cal td.today-event - For the table cell in the calendar that represents today with events on it. table.gcal-block-events - The table in the block that lists the upcoming events will be styled with this class.

The main module monthly and weekly views use the following CSS classes:

table.gcal-month - The monthly/weekly view table is styled with this class. table.gcal-month td.no-day - For table cells in the month view that are not days in the current month. table.gcal-month td.day - For table cells in the month view that are valid days in the current month. table.gcal-month td.weekend - For table cells in the monthly/weekly views for weekends; i.e. Saturday or Sunday. The exact days considered "weekend days" are configurable in the options section.

table.gcal-month td.today - For the table cell in the monthly/weekly view that represents the current day. table.gcal-month a.day-link - Links for the days of the month/week are styled with this class. span.gcal-cat-# - Event titles are styled with span tags that have the class gcal-cat-#, where # is the category ID. See the categories section in the admin panel to determine the ID for each category. In this way you can display events in certain colors, font styles, with borders, etc. according to the category they are in.

table.gcal-cat-legend - The table that displays the category legend is styled with this class.

The day and event views use the following CSS classes:

table.gcal-event - The event table is styled with this class.

I freely admit that I am not a CSS expert, and I chose what I thought were basic and essential elements to style. I would appreciate any suggestions and feedback about the CSS. I would also like to see any screenshots of GCalendar in action with your custom CSS styles.

Top

3.5 Modifying mainfile.php

If you wish to be able to approve user submitted events, and you wish to see a count of pending events in the Admin "Waiting Content" block, then follow these steps. Otherwise this part is optional. In mainfile.php, find:

$content .= "<strong><big></big></strong> <a href=\"". $admin_file.".php? op=DownloadsListBrokenDownloads\">"._BROKENDOWN."</a>: $brokend<br>";

After that line, add the following:

$result = $db->sql_query('SELECT COUNT(*) FROM ' . $prefix . '_gcal_event WHERE approved = 0'); $row = $db->sql_fetchrow($result); $content .= "<strong><big></big></strong> <a href=\"{$admin_file}.php?op=gcalendar\">Calendar Events</a>: {$row[0]}<br>";

Top

3.6 Configuring The Supplied Blocks

GCalendar comes with two sample blocks, block-GCalendar.php and blockGCalendar_Center.php. You can change their behavior by modifying the block files and uploading them to your server to the blocks sub-directory. At the top of each file there are a few lines that you may wish to modify. /////////////////////////////////////////////////////////////////// //// // block configuration: $modName = 'GCalendar'; under modules // must match directory name

$blockConfig = array('maxTitle' => 21, // maximum length of title for block (includes ...) 'eventPrefix' => '&bull;&nbsp;', // This gets prefixed onto events, customize as you wish 'maxEvents' => 10, // maximum # of events listed in block 'lookahead' => 2, // how many months (including current one) to look for events 'twoColumn' => false, // true for 2 column event display (date - title) or false for date and // title on separate lines // an array of category numbers to exclude from the block; // see the GCalendar admin panel / categories to get the numbers: 'excludeCats' => array(), 'force_center' => true, // force the block to be centered );

Modify the lines as follows:

$modName - In general you won't modify this. The value you assign to $modName must match the directory name under modules. In most cases you will leave this to read 'GCalendar'.

maxTitle - This puts a limit on the number of characters that will be displayed for an event title. Change the numeric value to your liking. Note that the block will append an ellipsis (...) on titles that get truncated, and this 3 character count is included. Thus if you set the

value to 20, then titles can only be 17 characters followed by 3 dots for a total of 20 characters.

eventPrefix - This is the prefix that is placed in front of events listed in the block. By default, it is a bullet followed by a space. You can put whatever you like here, including other HTML tags or entities.

maxEvents - This controls the maximum number of events that are listed in the block event list. The larger the number, the greater the impact on your page load times.

lookAhead - This controls how many months, including the current one, to look ahead for upcoming events. The larger the number, the greater the impact on your page load times.

twoColumn - This controls how events are displayed; either in two column mode or with the date and title on separate lines. Set this to either true or false. Try both to see which you prefer.

excludeCats - This is an array of category numbers to exclude from displaying in the block. You can obtain the category numbers for your categories by going into the GCalendar admin panel, and clicking on Categories. For example, to exclude categories 3 and 5 from your block, this line should look like 'excludeCats => array(3, 5),.

force_center - This forces the block to be centered. Enter a true or false here. Some themes emit div and font tags that may override your CSS settings. In that case setting this value to true will cause a center tag to be emitted to force the block to be centered.

A future version of GCalendar may have these parameters stored in the configuration table, and editable using the admin panel. Top

3.7 Activating the Module and Block


Finally, if this is a new install, don't forget to go into your admin panel and activate your new module and block(s). Top

3.8 View And Edit Icons


GCalendar assumes your PHP-Nuke has two images files: images/view.gif and images/edit.gif. If your version of Nuke does not have these files, please copy

the contents of the images directory from the distribution to your Nuke's images directory. Top

3.9 Right Blocks


If you would like right blocks to appear in the GCalendar module views (not everyone does), make the following code changes. In the file modules/GCalendar/index.php, find the line of code: gcalGetLang($module_name);

After this line, add the following line of code: define('INDEX_FILE', true);

Repeat this same change for the files modules/GCalendar/viewday.php and modules/GCalendar/viewweek.php. Top

4. Support & Contact Info


The support website for GCalendar is at http://sourceforge.net/projects/gcalendar-nuke/. There you will find the latest version and documentation for GCalendar. You can also submit bug reports, feature requests, and seek help in our forums. You can also make donations to the project (see below). Top

5. Donations
If you find GCalender useful, please consider donating to the project. Many, many hours were spent developing and testing GCalendar, and I plan on supporting and adding features to GCalendar for some time. Your donations will

encourage future development of the project. To donate, please visit the GCalendar homepage, or click on the image below. Thank you!

Top

6. Change Log

Version 1.7.1 August 30, 2008


o o o o

Fixed missing semicolon in French language file. Bug #1913978 Exceptions to Weekly Events in Monthly View Don't Work. Feature #1803953 Incorporate Norwegian Language Files. Feature #1782973 More on centering the block. Feature #1664067 Add NSN Groups Support Feature #1782973 More on centering the block Bug #1774674 Get language bug. Fall back to English if language file is not found.

Version 1.7.0 September 22, 2007


o o o

Version 1.6.1 August 11, 2007


o o

Bug #1768289 Update Repeating Event with Exception Feature #1763291 Filter category in blocks Bug #1755819 Weely Repeat Bug Bug #1747998 Fix notices on weekly view Feature #1749648 Remove links from Printable view Feature #1748797 Add a cancel button to the submit event form Feature #1734092 Add ability to delete / update singular events within series

Version 1.6.0 July 21, 2007


o o o o o

Version 1.5.0 July 1, 2007


o o o o o o

Bug #1734082 Re-occurring monthly by day event not working properly Bug #1734480 Monthly by day bug Bug #1734448 nukeWYSIWYG menu options cut off with IE7 Bug #1740630 Eliminate Notices Feature #1721609 Use Nuke's _CHARSET constant instead of making one up Feature #1725254 Make weekends configurable

o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o

Feature #1734432 Add tool tip to blocks to show events on a given day Feature #1734441 Add reciprocal links between admin and module Feature #1687203 RSVP Feature Feature #1734088 Center calendar in blocks Feature #1741909 Add an About Page in Admin Feature #1741214 Incorporate Norwegian Language Files Feature #1741907 Incorporate Spanish Language file updates Bug #1700819 &amp; in Send to Friend links Complete 1.4.0 Dutch translation from Mathijs Lubbertsen. Feature #1683140 RavenNuke 2.10 WYSIWYG editor support Feature #1687200 Email Event to Friend Feature #1689518 Additional event editing options Feature #1689529 Show start date in admin area Feature #1694651 Use htmlspecialchars instead of htmlentities Feature #1694655 Use language file constant for character set Feature #1694657 Separate CSS for weekends vs weekdays Feature #1696503 Don't filter for admins Bug #1685148 Dates Display Wrong (in blocks) Feature #1664066 Make Completely XHTML 1.0 Transitional Compliant Feature #1683139 Italian User Language File (partial) Bug #1680662 1.3.0 Block bugs fixed Feature #1666620 Weekly View Feature #1668524 Display Category ID's in Admin Area Feature #1671094 Center Block Bug #1669229 Monthly By Day Event Bug Bug #1669532 Monthly View Links have incorrect event ID Feature #1664069 Email notification of new events. Feature #1663093 Optionally require non-blank location and details fields. Feature #1652680 Category CSS and filtering. Feature #1657079 Auto-Links.

Version 1.4.1 April 20, 2007

Version 1.4.0 April 14, 2007

Version 1.3.2 March 22, 2007 Version 1.3.1 March 18, 2007

Version 1.3.0 March 12, 2007

Version 1.2.0 February 24, 2007

o o o

Feature #1660172 French Language Files. Feature #1661708 Updated Dutch Language files, including admin. Bug #1661709 Need language constant for "None." (Removed completely)

Version 1.1.3 February 7, 2007


o o

Bug #1653743 Rename InputFilter class to avoid conflicts with class of same name in Nuke Evolution. Feature #1646586 Improve page navigation in Admin section; ensure pending event count is current.

Version 1.1.2 January 31, 2007


o o

Bug #1648943 DIV operator not supported in MySQL 4.0.x Feature #1649317 Block improvements: provide either 1 or 2 column option for events. Truncate event titles. Add configurable prefix.

Version 1.1.1 January 30, 2007


o o

Bug #1648329 Installer fails for some users Bug #1648330 Events don't show for some users (MySQL LAST_DAY() not supported)

Version 1.1.0 January 27, 2007


o o o o o o o o o

Feature #1642072 Display Version Number to Admin Feature #1642048 Add a 24 hour time option Feature #1641836 Configurable first day of the week Feature #1643067 User configurable date display based on format strings Bug #1642049 Links in Printable Views aren't Printable Bug #1642047 Language constant needed for "Today's Date" Bug #1643077 Admin table sort by links need language constant Bug #1643082 Categories delete confirm prompt has internationalization issues Bug #1643086 Alt tag for title image is in English

Version 1.0.0 Initial Release January 20, 2007

Top

7. Credits
Main development, testing, and documentation: Brian Neal.

InputFilter class by Daniel Morris with contributors: Gianpaolo Racca, Ghislain Picard, Marco Wandschneider, Chris Tobin and Andrew Eddie. Modifications by Louis Landry and Brian Neal. Javascript function changeDisplay() by Mark "Tarquin" Wilton-Jones at www.howtocreate.co.uk. Dutch translation by Mathijs Lubbertsen. German translation by azakow. Spanish translation by Juan Cabezas Moreno & Jose F Florez. French translation by Stphane Richer. Italian translation by Gerardo Dassi. Norwegian translation by Paal Fondevik. General help and advice: Evaders99, Raven, montego, fkelly, hitwalker, kguske, Guardian2003, CodyG, 64bitguy, and the rest of the crew at Raven PHP Scripts. A big thank-you to hitwalker for helping me be compatible with MySQL 4.0.x. XHTML Transitional compliant copyright.php code by Raven. Project hosting courtesy of SourceForge.net. Thanks to my wife Shari and my parents Marilyn and Gerri. Top

Appendix A - Using GCalendar on a 7.x Unpatched PHP-Nuke


I must stress it is not recommended running an unpatched version of PHP-Nuke. Your site will have many bugs and security holes. Obtain and install the patches from nukeresources.com. Not only will your site run better, you will sleep better as well! ;-) If you must run on an unpatched version of PHP-Nuke 7.x, you must make the following changes. Note that these changes do not have to be made for an unpatched PHP-Nuke 8.0 (but you better get the patches for 8 anyway...). In the following files:

1. modules/GCalendar/admin/case.php 2. modules/GCalendar/admin/index.php 3. modules/GCalendar/admin/links.php Find: if (!defined('ADMIN_FILE')) { die('Access Denied'); }

Change To: global $admin_file; if (!stristr($_SERVER['PHP_SELF'], $admin_file . '.php')) { die('Access Denied'); }

In the following files: 1. modules/GCalendar/index.php 2. modules/GCalendar/submit.php 3. modules/GCalendar/viewday.php 4. modules/GCalendar/viewmonth.php Find: if (!defined('MODULE_FILE')) { die('You can\'t access this file directly...'); }

Change To: if (!stristr('modules.php', $_SERVER['PHP_SELF'])) { die('You can\'t access this file directly...'); }

In the file blocks/block-GCalendar.php:

Find: if (!defined('BLOCK_FILE')) { Header('Location: ../index.php'); die(); }

Change To: if (stristr('block-GCalendar.php', $_SERVER['PHP_SELF'])) { Header('Location: ../index.php'); die(); }

Top

Appendix B - Sample CSS Definitions


I used these definitions for a theme that featured a lot of green and white colors. Please feel free to use these as a starting point and modify them according to your site's themes. It is likely you will need to modify things such as colors, font sizes, and padding in order to match your existing themes. Please note that starting with version 1.2.0, the GCalendar distribution archive now contains a CSS directory with sample CSS files. Users are encouraged to send the author their CSS definitions to share with others. Refer to section 3.4. /* GCalendar styles */ .gcal-error { font-weight: bold; color: red; background-color: white; }

form.gcal-event-form legend { font-weight: bold; color: black; background-color: white; } form.gcal-event-form .normal-label { font-weight: bold; color: black; background-color: white; } form.gcal-event-form .error-label { font-weight: bold; color: red; background-color: white; } table.gcal-block-cal { width: 100%; border-width: 1px; border-style: solid; border-color: black; } table.gcal-block-cal a { } table.gcal-block-cal a:link { text-decoration: underline; } table.gcal-block-cal a:visited { text-decoration: underline; } table.gcal-block-cal a:hover { text-decoration: underline; } table.gcal-block-cal a:active { text-decoration: underline; } table.gcal-block-cal a.today { color: white; }

table.gcal-block-cal th { color: white; text-align: center; background-image: url(../../../modules/Forums/templates/subSilver/images/cellpic3.gif ); border-width: 1px; padding: 2px; border-style: outset; border-color: black; } table.gcal-block-cal td { border-width: 1px; padding: 2px; border-style: hidden; text-align: center; } table.gcal-block-cal td.no-day { } table.gcal-block-cal td.day-no-event { } table.gcal-block-cal td.day-event { border: solid 1px teal; } table.gcal-block-cal td.today-no-event { background-image: url(../../../modules/Forums/templates/subSilver/images/cellpic3.gif ); color: white; border-style: outset; border-color: black; } table.gcal-block-cal td.today-event { background-image: url(../../../modules/Forums/templates/subSilver/images/cellpic3.gif ); font-weight: bold; border-style: outset; border-color: black;

} table.gcal-block-events { border: solid 1px black; width: 100%; } table.gcal-block-events a:link { text-decoration: underline; } table.gcal-block-events a:visited { text-decoration: underline; } table.gcal-block-events a:hover { text-decoration: underline; } table.gcal-block-events a:active { text-decoration: underline; }

table.gcal-month width: 100%; border-width: border-style: border-color: padding: 1px; }

{ 1px; solid; black;

table.gcal-month th { color: white; text-align: center; background-image: url(../../../modules/Forums/templates/subSilver/images/cellpic3.gif ); padding: 2px; border: outset 1px black; } table.gcal-month td { margin: 0px; padding: 2px; border: outset 1px black; height: 75px; }

table.gcal-month td.no-day { background-color: #e0e0e0; } table.gcal-month td.day { } table.gcal-month td.today { background-color: #bdd6d6; } table.gcal-month a { } table.gcal-month a:link { text-decoration: underline; } table.gcal-month a:visited { text-decoration: underline; } table.gcal-month a:hover { text-decoration: underline; } table.gcal-month a:active { text-decoration: underline; } table.gcal-month a.day-link { font-size: 20px; background: none; color: black; } table.gcal-month a.day-link:link { text-decoration: underline; } table.gcal-month a.day-link:visited { text-decoration: underline; } table.gcal-month a.day-link:hover { text-decoration: underline; } table.gcal-month a.day-link:active { text-decoration: underline;

} table.gcal-event width: 80%; border-width: border-style: border-color: padding: 0px; } { 1px; solid; black;

table.gcal-event caption { padding-bottom: 5px; font-weight: bold; font-size: 11px; margin: 2px; } table.gcal-event th { background-color: #79b5a9; color: white; text-align: right; padding: 4px; border: solid 1px black; } table.gcal-event td { padding: 4px; border: solid 1px black; } table.gcal-cat-legend { border-width: 1px; border-style: solid; border-color: black; padding: 2px; } table.gcal-cat-legend td { border: none; } table.gcal-cat-legend caption { padding-bottom: 5px; font-weight: bold; font-size: 11px;

margin: 2px; }

Top
GCalendar 1.7.1 Documentation 2007-2008 Brian Neal August 30, 2008

Anda mungkin juga menyukai