Ticket #706 (closed defect: wontfix)
Allow optional scheme and optional domain in "Blog Url" option
Reported by: | genezys | Owned by: | olivier |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | module:blog | Version: | 2.1 |
Severity: | normal | Keywords: | |
Cc: |
Description
When entering the option "Blog Url", it seems that Dotclear needs the full URL because it extracts the scheme and hostname from this configuration (in core/class.dc.blog.php).
The problem is that the site then contains full URL included the scheme and domain name. It would be nice to be able to just indicate the full path of the blog in the "Blog URL" option and that links are generated accordingly.
I personnaly did a small modification to my Dotclear installation to allow that, I just changed the line
core/class.dc.blog.php(66) $this->host = preg_replace('|([a-z]{3,}:)(.*?)/.*$|','$1$2', $this->url); into $this->host = preg_replace('|([a-z]{3,}:)?(.*?)/.*$|','$1$2', $this->url);
The first part of the domain now being optional, I can enter "/" as my "Blog URL" and the links are correctly generated on the website.
Sorry about the formatting...