More Drupal wizardry

Submitted by inducer on Tue, 04/01/2005 - 15:37

I’ve been molding this site according to my publishing needs, and in the process of doing so, I’ve ventured into the Drupal source code. I’ve made a few changes that I believe are generally useful. Besides submitting them to the respective maintainers, I’ll post them here for added accessibility.

  • I’ve modified the Drupal core to provide “Clean URLs” without needing proper mod_rewrite support. Instead, you only need to be allowed set the ErrorDocument to the provided 404.php page. There is a slight complication that the implementation handles properly: HTML forms submitted via HTTP POST cannot use these clean URLs since the form data does not propagate through the ErrorDocument redirection. This NOT FOUND: drupal-4.5.1-clean404-2005-01-04-v3.patch=patch against version 4.5.1 of Drupal implements this. (upstream)

    Update 1: It turns out that my web hosting company, Alturo, does support this. In order to enable it, you need to say RewriteBase / in .htaccess. They do not document that, though. (In general, they document fairly little.) As a result of this, I won’t be maintaining the Clean-URLs-via-404 patch.

    Update 2: I’ve put a modified version of the patch onto the Drupal bug tracker that applies to current Drupal CVS.

  • I’ve modified and fixed inline.module in several ways in this NOT FOUND: inline-2005-01-04-v1.patch=patch: (upstream)

    • You can now specify [ inline:filename.ext] instead of only the number, for added link stability.
    • A bold, red NOT FOUND message is shown if the given file name or number does not exist.
    • The module previously generated spaces around the img and a tags. Those are gone.
    • Images are only inlined if linked to with [ inline:...]. If you say [ file:my.png], this will remain a file link.
    • The recent fix for multiple links in one node is part of this patch.
    • (The spaces were necessary to keep inline.module from picking up these example links.)
  • I’ve added two patches to the title module.

AttachmentSize
drupal-4.5.1-clean404-2005-01-04-v3.patch8.28 KB
inline-2005-01-04-v1.patch3.41 KB

Post new comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>.
  • You can use Markdown syntax to format and style the text. Also see and Markdown Extra for tables, footnotes, and more.

More information about formatting options