Browse Source

Sync from DRUPAL-5 branch.

David Lesieur 16 years ago
parent
commit
e07642ca35
3 changed files with 59 additions and 111 deletions
  1. 56 0
      README.txt
  2. 3 0
      url_replace_filter.info
  3. 0 111
      url_replace_filter.module

+ 56 - 0
README.txt

@@ -0,0 +1,56 @@
+$Id$
+
+README file for the URL Replace Filter Drupal module.
+
+
+Description
+***********
+
+The URL Replace Filter module allows administrators to replace the base URL in
+<img> and <a> elements.
+
+Users tend to create links and images in their content with absolute URLs. This
+can be a problem if the site moves to another domain (perhaps between
+development and production sites) or is behind a proxy, with a different address
+for authenticated users.
+
+Some replacement examples:
+
+Before: <a href="http://example.com:8080/somepath">Some link</a>
+After: <a href="/somepath">Some link</a>
+
+Before: <img src="http://dev.example.com/files/image.jpg" alt="Some image" />
+After: <img src="/files/image.jpg" alt="Some image" />
+
+You can setup such replacements in the URL Replace Filter settings as follow:
+
+Original: http://example.com:8080/
+Replacement: %baseurl/
+
+Original: http://dev.example.com/
+Replacement: %baseurl/
+
+%baseurl is a token for your site's base URL. The above examples assume a site
+%located in the domain's root directory (in which case %baseurl is actually
+%empty).
+
+Like any Drupal filter, the original user-entered content is not altered. The
+filter is only applied (and its result cached) when the node is viewed.
+
+
+Installation
+************
+
+1. Extract the 'url_replace_filter' module directory into your site's modules
+   directory.
+
+2. Go to the Administer > Site configuration > Input formats page, and click
+   configure next to the input format that shall replace URLs.
+
+3. Enable the URL Replace Filter in the input format's configuration page, and
+   save the configuration.
+
+4. Click the Configure tab. In the URL Replace Filter box, enter original and
+   replacement URLs in the appropriate fields and save the configuration. More
+   empty replacement fields will automatically be added after saving, in case
+   you need more fields than provided by default.

+ 3 - 0
url_replace_filter.info

@@ -0,0 +1,3 @@
+; $Id$
+name = URL Replace Filter
+description = "Allows administrators to replace base URLs in &lt;img&gt; and &lt;a&gt; elements."

File diff suppressed because it is too large
+ 0 - 111
url_replace_filter.module


Some files were not shown because too many files changed in this diff