1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
<?php
declare(strict_types=1);
if (!defined("TFISH_ROOT_PATH")) die("TFISH_ERROR_ROOT_PATH_NOT_DEFINED");
define("TFISH_ADMIN_PATH", TFISH_ROOT_PATH . "admin/");
define("TFISH_PUBLIC_CACHE_PATH", TFISH_ROOT_PATH . "cache/");
define("TFISH_THEMES_PATH", TFISH_ROOT_PATH . "themes/");
define("TFISH_JS_PATH", TFISH_ROOT_PATH . "js/");
define("TFISH_UPLOADS_PATH", TFISH_ROOT_PATH . "uploads/");
define("TFISH_MEDIA_PATH", TFISH_UPLOADS_PATH . "media/");
define("TFISH_IMAGE_PATH", TFISH_UPLOADS_PATH . 'image/');
define("TFISH_CLASS_PATH", TFISH_PATH . "class/");
define("TFISH_DATABASE_PATH", TFISH_TRUST_PATH . "database/");
define("TFISH_ERROR_LOG_PATH", TFISH_TRUST_PATH . "log/tuskfish_log.txt");
define("TFISH_FORM_PATH", TFISH_PATH . "form/");
define("TFISH_LIBRARIES_PATH", TFISH_TRUST_PATH . "libraries/");
define("TFISH_PRIVATE_CACHE_PATH", TFISH_TRUST_PATH . "cache/");
define("TFISH_ADMIN_URL", TFISH_URL . "admin/");
define("TFISH_CACHE_URL", TFISH_URL . "cache/");
define("TFISH_THEMES_URL", TFISH_URL . "themes/");
define("TFISH_JS_URL", TFISH_URL . "js/");
define("TFISH_RSS_URL", TFISH_URL . "rss.php");
define("TFISH_PERMALINK_URL", TFISH_URL);
define("TFISH_MEDIA_URL", TFISH_URL . "uploads/media/");
define("TFISH_IMAGE_URL", TFISH_URL . "uploads/image/");
define("TFISH_LINK", rtrim(TFISH_URL, '/'));
if (parse_url(TFISH_URL, PHP_URL_SCHEME) === 'https') {
define("TFISH_ENCLOSURE_URL", "http://" . parse_url(TFISH_URL, PHP_URL_HOST)
. "/enclosure.php?id=");
} else {
define("TFISH_ENCLOSURE_URL", TFISH_URL . "enclosure.php?id=");
}
define("TFISH_LANGUAGE_PATH", TFISH_PATH . "language/");
define("TFISH_DEFAULT_LANGUAGE", TFISH_LANGUAGE_PATH . "english.php");
function tfish_autoload(string $classname) {
include TFISH_CLASS_PATH . $classname . '.php';
}
spl_autoload_register('tfish_autoload');