2012-05-28, 15:50:42
(This post was last modified: 2012-06-05, 14:12:52 by kuba.sanitrak.)
Edit: I recommend against doing the following, it's more a hack than anything and it seems to break custom field image paths.
This was annoying me too but I managed to force paths only for both images AND local links.
So instead of
I get
Unfortunately it involved editing core files (filebrowser.php and template_functions.php) and I'm pretty sure this will only work if your install is a root install (not in a folder). Surely a minor tweak could remedy this though.
Anyway, to fix image paths, in /admin/filebrowser.php
...and to fix links to local pages, in /admin/inc/template_functions.php
This was annoying me too but I managed to force paths only for both images AND local links.
So instead of
Code:
<a href="http://domain.com/about/team/">Our Team</a>
<img src="http://domain.com/data/uploads/image.jpg">
Code:
<a href="/about/team/">Our Team</a>
<img src="/data/uploads/image.jpg">
Anyway, to fix image paths, in /admin/filebrowser.php
Code:
25. --- $sitepath = suggest_site_path();
25. +++ $sitepath = tsl(suggest_site_path(true));
Code:
726. --- array_push($pageList, array( $dash . $page['title'], find_url($page['url'],$page['parent'])));
726. +++ array_push($pageList, array( $dash . $page['title'], find_url($page['url'],$page['parent'],'abs')));