Created
February 2, 2012 21:03
-
-
Save kolber/1725749 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- open /app/page-data.inc.php | |
-- about line 130 add | |
# @absolute_url | |
$page->absolute_url = $page->data['@base_url'].'/'.str_replace('./','', $page->file_path); | |
-- about line 52 (get_thumbnail function) replace with this: | |
static function get_thumbnail($file_path) { | |
$thumbnails = array_keys(Helpers::list_files($file_path, '/thumb\.(gif|jpg|png|jpeg)$/i', false)); | |
# replace './content' with relative path back to the root of the app | |
$relative_path = 'http://'.$_SERVER['HTTP_HOST'].str_replace('/index.php', '', $_SERVER['PHP_SELF']).'/'.str_replace('./','', $file_path); | |
return (!empty($thumbnails)) ? $relative_path.'/'.$thumbnails[0] : false; | |
} | |
-open /app/asset-types/asset.inc.php | |
-- about line 30 add | |
# @absolute_url | |
$this->data['@absolute_url'] = 'http://'.$_SERVER['HTTP_HOST'].str_replace('/index.php', '', $_SERVER['PHP_SELF']).'/'.str_replace('./','', $file_path); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment