Command-line Variables

From Easy PHP Calendar Instructions
Jump to: navigation, search

$noNav="1";

Do NOT show the navigational links, regardless of what is configured in the settings.

Add this just before require("calendar/calendar.php");

$noEvents="1";

Do NOT show any events on the calendar, regardless of what is configured in the settings or events are in the database.

Add this just before require("calendar/calendar.php");

$showCat="X";

Filter the list of events by category "X".

Use the Advanced Filter option of the Event Manager to construct specific filters. While viewing the Advanced Filter screen after executing a filter (click Find / Filter then Advanced in the Event Manager), at the end of the yellow Filter table is a code. Add this code to the $showCat variable to perform this filter operation in your own pages. It will appear like "1|4|7 or a|2|5|9".

Add this just before require("calendar/calendar.php");

$showGrp="X";

Filter the list of events by group(s) "X".

Using the group page in the settings, hover your mouse over the group title box(es) to get the group ID (it will take a few seconds to appear). Use these ID(s) to create your group filter. If filtering by a single group, set "X" to the single group ID number. If filtering by multiple groups, separate each ID with the pipe symbol "|".

Example: To filter by group 2, set "X" to be "1". To filter by groups 2 and 4, set "X" to be "2|4".

Add $showGrp="X"; just before require("calendar/calendar.php");

$showTheme="X";

Choose a different theme than the one configured in the settings where "x" is the exact name (and case) of the directory containing the theme to display. If the script cannot find this theme, it will default to the one set in the settings.

Add this just before require("calendar/calendar.php");.

unset($epcAltLink); $epcAltLink="X"; By inserting this line just before requiring the normal calendar, the calendar will not display pop-ups and will instead link to the URL X when clicked (Example: $epcAltLink="http://www.easyphpcalendar.com/events.php";). This is useful when you have a small calendar on the home page, that when clicked, will then open another page with the standard calendar or to the listing module, etc...

$EPCANCHOR="X";

Used when adding an anchor tag (<a name="TagName"></a>) to the location of the calendar on your page(s). X = the anchor tag name on your page.

Add this just before require("calendar/calendar.php");.

$epcHideColumns = "X,X";

Enter one or more column numbers (1 through 7) separated by commas to cause the specified day columns to not display on the standard Mode calendar. Example: $epcHideColumns = "1,7"; will hide columns 1 and 7 (US weekend, Sunday and Saturday).

Add this just before $TOC = "1";.

$thisFile="X.php";

In some rare instances, PHP can not determine the correct file name of the page in which the calendar is integrated. This could then cause PHP to instruct the calendar to display a different page file name when trying to navigate between months resulting in a page not found error or another entirely different page loading. If this is occurring, add this line at the top of the file in which the calendar is integrated and add the correct file name to the variable.