You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
169 lines
3.8 KiB
PHTML
169 lines
3.8 KiB
PHTML
2 years ago
|
<?php
|
||
2 years ago
|
/**
|
||
|
* \file
|
||
|
* PHP environment variables.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @var string $PROJECT_ROOT
|
||
|
* Root directory of the project.
|
||
|
*/
|
||
2 years ago
|
$PROJECT_ROOT=__DIR__;
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $PHP_ROOT
|
||
|
* Root directory for PHP scripts.
|
||
|
*/
|
||
2 years ago
|
$PHP_ROOT="$PROJECT_ROOT/php";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $CACHE_ROOT
|
||
|
* Root directory for temporary storage.
|
||
|
*/
|
||
2 years ago
|
$CACHE_ROOT="$PROJECT_ROOT/cache";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $DOCUMENT_ROOT
|
||
|
* Root directory for main site documents.
|
||
|
*/
|
||
2 years ago
|
$DOCUMENT_ROOT="$PROJECT_ROOT/output";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $ROOMS_FILE
|
||
|
* Path to file containing fetched servers.
|
||
|
*/
|
||
2 years ago
|
$ROOMS_FILE="$DOCUMENT_ROOT/servers.json";
|
||
2 years ago
|
|
||
1 year ago
|
/**
|
||
|
* @var string $TAGS_FILE
|
||
|
* Path to file containing tag text-description pairs.
|
||
|
*/
|
||
|
$TAGS_FILE="$DOCUMENT_ROOT/tags.json";
|
||
|
|
||
2 years ago
|
/**
|
||
|
* @var string $TEMPLATES_ROOT
|
||
|
* Root directory containing sites in PHP.
|
||
|
*/
|
||
2 years ago
|
$TEMPLATES_ROOT="$PROJECT_ROOT/sites";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $LANGUAGES_ROOT
|
||
|
* Directory containing languages module.
|
||
|
*/
|
||
2 years ago
|
$LANGUAGES_ROOT="$PROJECT_ROOT/languages";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $QR_CODES
|
||
|
* Directory containing served QR codes.
|
||
|
*/
|
||
2 years ago
|
$QR_CODES="$DOCUMENT_ROOT/qr-codes";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $QR_CODES_RELATIVE
|
||
|
* Web-relative path to served QR codes.
|
||
|
*/
|
||
1 year ago
|
$QR_CODES_RELATIVE="/qr-codes";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $ROOM_ICONS_CACHE
|
||
|
* Directory containing cached room icons.
|
||
|
*/
|
||
2 years ago
|
$ROOM_ICONS_CACHE="$CACHE_ROOT/icons";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $ROOM_ICONS
|
||
|
* Directory containing served room icons.
|
||
|
*/
|
||
2 years ago
|
$ROOM_ICONS="$DOCUMENT_ROOT/icons";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $ROOM_ICONS_RELATIVE
|
||
|
* Web-relative path to served room icons.
|
||
|
*/
|
||
1 year ago
|
$ROOM_ICONS_RELATIVE="/icons";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $LONG_TERM_CACHE_ROOT
|
||
|
* Root directory for long-term cached resources.
|
||
|
*/
|
||
2 years ago
|
$LONG_TERM_CACHE_ROOT="$PROJECT_ROOT/cache-lt";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $SOURCES_CACHE
|
||
|
* Directory containing cached responses from Community sources.
|
||
|
*/
|
||
2 years ago
|
$SOURCES_CACHE="$LONG_TERM_CACHE_ROOT/sources";
|
||
2 years ago
|
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $LISTING_PROVIDER_ROOT
|
||
|
* Root directory for listing provider API resources.
|
||
|
*/
|
||
2 years ago
|
$LISTING_PROVIDER_ROOT="$PROJECT_ROOT/listings";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $LISTINGS_INI
|
||
|
* Path to file containing Community listing configuration.
|
||
|
*/
|
||
2 years ago
|
$LISTINGS_INI="$LISTING_PROVIDER_ROOT/listings.ini";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $LISTING_PROVIDER_OUTPUT
|
||
|
* Directory with content served by listing provider API.
|
||
|
*/
|
||
2 years ago
|
$LISTING_PROVIDER_OUTPUT="$LISTING_PROVIDER_ROOT/lp-output";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $LISTING_PROVIDER_LISTING_SUMMARY
|
||
|
* File containing overview of served Community listings.
|
||
|
*/
|
||
2 years ago
|
$LISTING_PROVIDER_LISTING_SUMMARY="$LISTING_PROVIDER_OUTPUT/listings";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $LISTING_PROVIDER_LISTINGS
|
||
|
* Directory of individual Community listings.
|
||
|
*/
|
||
2 years ago
|
$LISTING_PROVIDER_LISTINGS="$LISTING_PROVIDER_OUTPUT/listing";
|
||
2 years ago
|
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $REPOSITORY_CANONICAL_URL
|
||
|
* The canonical URL for this project's Git repository.
|
||
|
*/
|
||
2 years ago
|
$REPOSITORY_CANONICAL_URL="https://codeberg.org/gravel/sessioncommunities.online";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $REPOSITORY_MIRROR_URL
|
||
|
* The mirror URL for this project's Git repository.
|
||
|
*/
|
||
2 years ago
|
$REPOSITORY_MIRROR_URL="https://lokilocker.com/gravel/sessioncommunities.online";
|
||
2 years ago
|
|
||
|
/**
|
||
|
* @var string $REPOSITORY_CANONICAL_URL_FILES
|
||
|
* The base URL for this project's repository files.
|
||
|
*/
|
||
2 years ago
|
$REPOSITORY_CANONICAL_URL_FILES="$REPOSITORY_CANONICAL_URL/src/branch/main";
|
||
2 years ago
|
|
||
2 years ago
|
/**
|
||
|
* @var string $SITE_CANONICAL_URL
|
||
|
* The base URL for this project's website.
|
||
|
*/
|
||
|
$SITE_CANONICAL_URL="https://sessioncommunities.online";
|
||
|
|
||
2 years ago
|
/**
|
||
|
* @var string $API_CANONICAL_URL
|
||
|
* The base URL for the listing provider API.
|
||
|
*/
|
||
2 years ago
|
$API_CANONICAL_URL="https://lp.sessioncommunities.online";
|
||
2 years ago
|
|
||
2 years ago
|
set_include_path(implode(PATH_SEPARATOR, array(
|
||
|
get_include_path(),
|
||
|
$PHP_ROOT,
|
||
|
$PROJECT_ROOT
|
||
|
)));
|
||
|
|
||
2 years ago
|
// do not report warnings (timeouts, SSL/TLS errors)
|
||
|
error_reporting(E_ALL & ~E_WARNING);
|
||
2 years ago
|
|
||
2 years ago
|
date_default_timezone_set('UTC');
|