The announcements.php and announcements.cgi files provide the frontend layout and functionality of the OpenCrypt Announcements system.
The Announcements system enables you to post announcements to all your members, or to specific members areas. This article details the basic configuration of the announcements system, and the configuration options available.
The difference bewteen announcements.php and announcements.php
announcements.php is the latest version of the OpenCrypt announcements frontend system. The PHP interface supports all the latest OpenCrypt announcement features, including the abillity to specify year by query string, to predefine the appropriate members area by variables, and to display an archive of announcements made in different years.
The available variables for announcements.php must be set in the main announcements.php file, and are:
$announcement_area enables you to specify which member's area to display announcements for if you are using more than one. For example $announcement_area= "1" will display announcements posted to all member's areas, and those posted specifically to member's area ID 1. If you wish to view announcements sent to all areas, use $announcement_area ="0".
$announcement_type enables you to specify the ability to view either members area announcements, or those made to administrators (these are normally shown in the Administration Panel), we recommend this is left as $announcement_type = "1" though if you do have a requirement to display Administrator Announcement, you can contact support for additional uses of this variable.
The available query strings for announcements.php are:
y= enables you to choose which year to view announcements from, previous and future years will be available in the archive. The default is announcements.php?y=0, for 2009 use announcements.php?y=2009
announcements.cgi must be included using SSI (server-side includes) and is now available, but depreciated. The announcements.cgi method only allows the restriction by members area as a query string.
The available query string for announcements.cgi is:
a= which enables you to define the member's area to view, in a similar manner to the $announcement_area variable used in the PHP interface.
A typical include for announcements.cgi would be in an HTML or other page placed in a members area, and would look like:
|
<!--#include virtual="/cgi-bin/oc/announcements.cgi?a=0"-->
|