Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Relative URLs and Ckeditor
#20
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
Code:
<a href="http://domain.com/about/team/">Our Team</a>
<img src="http://domain.com/data/uploads/image.jpg">
I get
Code:
<a href="/about/team/">Our Team</a>
<img src="/data/uploads/image.jpg">
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
Code:
25. --- $sitepath = suggest_site_path();
25. +++ $sitepath = tsl(suggest_site_path(true));
...and to fix links to local pages, in /admin/inc/template_functions.php
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')));
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply


Messages In This Thread
Relative URLs and Ckeditor - by peterb - 2011-06-17, 04:24:54
RE: Relative URLs and Ckeditor - by zulusnet - 2015-06-18, 23:53:00
RE: Relative URLs and Ckeditor - by shawn_a - 2015-06-19, 00:17:41
RE: Relative URLs and Ckeditor - by shawn_a - 2015-06-19, 00:32:20
RE: Relative URLs and Ckeditor - by datiswous - 2015-06-19, 19:07:23
Relative URLs and Ckeditor - by yojoe - 2011-06-17, 04:30:51
Relative URLs and Ckeditor - by gSvoren - 2011-06-17, 04:52:00
Relative URLs and Ckeditor - by Connie - 2011-06-17, 05:44:17
Relative URLs and Ckeditor - by peterb - 2011-06-19, 04:10:46
Relative URLs and Ckeditor - by yojoe - 2011-06-19, 04:17:40
Relative URLs and Ckeditor - by LogicalOctopus - 2011-06-22, 07:29:59
Relative URLs and Ckeditor - by Connie - 2011-06-22, 08:21:52
Relative URLs and Ckeditor - by LogicalOctopus - 2011-06-23, 01:46:35
Relative URLs and Ckeditor - by Connie - 2011-06-24, 20:32:32
Relative URLs and Ckeditor - by Lithie - 2011-10-04, 03:31:50
Relative URLs and Ckeditor - by stryker - 2012-03-01, 22:22:45
Relative URLs and Ckeditor - by mvlcek - 2012-03-01, 22:25:24
Relative URLs and Ckeditor - by stryker - 2012-03-01, 22:36:29
Relative URLs and Ckeditor - by mvlcek - 2012-03-01, 23:27:36
Relative URLs and Ckeditor - by stryker - 2012-03-02, 07:51:16
Relative URLs and Ckeditor - by Connie - 2012-03-02, 18:09:28
Relative URLs and Ckeditor - by stryker - 2012-03-02, 22:16:36
Relative URLs and Ckeditor - by cmb - 2012-03-03, 12:50:11
Relative URLs and Ckeditor - by sal - 2012-05-28, 15:50:42



Users browsing this thread: 1 Guest(s)