diff --git a/app/config/config.php b/app/config/config.php index 01cae91..5cafe37 100755 --- a/app/config/config.php +++ b/app/config/config.php @@ -27,12 +27,23 @@ | Base Url |-------------------------------------------------------------------------- | -| This is the url path where the framework is located. Requires trailing +| This is the url path of the domain. Requires trailing | slash. | */ define('BASE_URL', '//' . $_SERVER['HTTP_HOST'] . '/'); +/* +|-------------------------------------------------------------------------- +| Base Path +|-------------------------------------------------------------------------- +| +| This is the url path where the framework is located. Requires trailing +| slash. +| +*/ +define('BASE_PATH', 'meta/'); + /* |-------------------------------------------------------------------------- | Url index file @@ -41,7 +52,7 @@ define('BASE_URL', '//' . $_SERVER['HTTP_HOST'] . '/'); | This determines whether "index.php" is in generated urls | */ -define('URL_INDEX_FILE', ''); +define('URL_INDEX_FILE', BASE_PATH . 'index.php/'); /* |-------------------------------------------------------------------------- @@ -51,7 +62,7 @@ define('URL_INDEX_FILE', ''); | This is the domain used for serving content, such as css, javascript. | */ -define('CONTENT_DOMAIN', BASE_URL); +define('CONTENT_DOMAIN', BASE_URL . BASE_PATH); /* |-------------------------------------------------------------------------- @@ -73,7 +84,7 @@ define('STATIC_LIB_PATH', CONTENT_DOMAIN.'assets/'); | stylesheet minifier. This should not need to be changed. | */ -define('STYLE_PATH', STATIC_LIB_PATH . 'css.php/g/'); +define('STYLE_PATH', STATIC_LIB_PATH . 'css.php?g='); /* |-------------------------------------------------------------------------- @@ -84,7 +95,7 @@ define('STYLE_PATH', STATIC_LIB_PATH . 'css.php/g/'); | javascript minifier. This should not need to be changed. | */ -define('SCRIPT_PATH', STATIC_LIB_PATH . 'js.php/g/'); +define('SCRIPT_PATH', STATIC_LIB_PATH . 'js.php?g='); /* diff --git a/app/controllers/genre.php b/app/controllers/genre.php index 38caa82..776d4a0 100755 --- a/app/controllers/genre.php +++ b/app/controllers/genre.php @@ -25,6 +25,8 @@ class genre extends \miniMVC\Controller { */ public function index() { + //$this->data_model->create_tables(); + $data = array(); $data['genres'] = $this->data_model->get_genres(); diff --git a/assets/js/meta.js b/assets/js/meta.js index 617186f..11df711 100755 --- a/assets/js/meta.js +++ b/assets/js/meta.js @@ -223,7 +223,7 @@ $_.ext('center', function (sel){ $_.event.live('#edit_form', 'submit', meta.update_item); // WYSIWYG on section/data pages - if (document.getElementsByTagName('textarea') != null) + if (document.getElementsByTagName('textarea').length > 0) { meta.initTINY('val'); } diff --git a/sys/common.php b/sys/common.php index 9e92b53..5d5f340 100755 --- a/sys/common.php +++ b/sys/common.php @@ -286,6 +286,8 @@ function route() // get the incoming request URL path $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); + $path = str_replace(URL_INDEX_FILE, '', $path); + $path = str_replace(BASE_PATH, '', $path); // get the route based on the path and server $route = $router->match($path, $_SERVER);