Drupal 6 support
stefanor - September 14, 2008 - 20:34
| Project: | Typogrify |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | mikl |
| Status: | closed |
Description
Here is a Drupal 6 support patch.
Also removed trailing "?>" lines to comply with Drupal coding standards.
| Attachment | Size |
|---|---|
| typogrify-drupal-6.patch | 3.24 KB |

#1
Updated patch, to meet coding standards (even though the included php scripts won't)
#2
This works well for me, though there was one rejection when patching the latest build (as of September 19, 2008). All patches applied except for typogrify.info. The rejection file:
***************
*** 3,26 ****
name = Typogrify
description = Adds typographic refinements.
package = "Input filters"
- dependencies = filter
project = "typogrify"
-
-
- ; Information added by drupal.org packaging script on 2007-06-19
- version = "5.x-1.x-dev"
- project = "typogrify"
- datestamp = "1182212752"
-
-
- ; Information added by drupal.org packaging script on 2007-07-10
- version = "5.x-1.x-dev"
- project = "typogrify"
- datestamp = "1184069636"
-
-
- ; Information added by drupal.org packaging script on 2007-07-24
- version = "5.x-1.x-dev"
- project = "typogrify"
- datestamp = "1185279036"
-
--- 3,8 ----
name = Typogrify
description = Adds typographic refinements.
package = "Input filters"
+ dependencies[] = filter
project = "typogrify"
+ core = 6.x
The only two lines that don't get added are "dependencies[] = filter" and "core = 6.x"; I had to yank the existing "dependencies = filter" line as well. After that change, though, all is well -- all the expected replacements happen and my site looks better for it.
It's really amusing to have a module with version 5.x-1.x-dev humming right along in my D6 installation alongside all the 6.x modules :) Thanks for this patch!
I dunno if my chiming in counts as "tested by the community" but at least count me among the "it works!" crowd.
#3
Patch in #1 applied fine, however my PHP (5.2.6) needs:
* Quotation marks around the function in preg_replace_callback on lines 156 and 194 of php-typogrify.php and
* $characters_to_convert to be defined as an array on line 86 of typogrify.module
This patch fixed those problems.
#4
Subscribe
#5
Are there plans to make a 6.x module?
#6
Subscribe
#7
Subscribe
#8
subscribing :-)
#9
subscribe
#10
will there be a Drupal 6 release?
#11
The patch from #3 works for me under Drupal 6.8.
#12
The patch for #3 works for me as well. (d6.8)
#13
Can a few more people try this so we can move it on? As far as I can see, it's ready to be branched in to drupal 6. I'm willing ot take this on, if need be.
#14
I've tweaked syms patch from #3 a bit. Most important change is that I've taken the latest version of php-typogrify and converted it to a class (which in my opinion makes more sense and gives less namespace pollution). Otherwise, I agree with sym, this feels ready to be called 1.0 for Drupal 6 :)
#15
Btw, the new version included in typogrify.class.php should also fix #245187: Widont treats <pre> as </p> and alters preformatted text, so it should probably be merged into the Drupal 5 version.
#16
subscribing
#17
Patch in #14 works ok with 6.8, with one fix: the class file doesn't match the module_load_include. Either rename the file with lower-case t ('typogrify.class.php') or change lines 88 and 152 in the patched module to:
module_load_include('class.php', 'typogrify', 'Typogrify');
Otherwise, great work -- thanks for the effort!
#18
Oops, never mind. I renamed the class.php according to the comments in the file, not according to the way you named it. Works fine as is -- here's a copy of the patched module:
#19
Thanks, guys, great job. One thing I should tell—the selected widont implementation breaks my site. I've added working implementation from #245187: Widont treats <pre> as </p> and alters preformatted text (first patch). Here's a patched typogrify.class.php file.
#20
#18: Ah, yes, good catch. I hope to take over this project soonish and roll a BETA-release or something :)
#19: Well, just going back to an earlier version that has other issues (#245187: Widont treats <pre> as </p> and alters preformatted text) isn't really a good solution. Can you post the actual error message so I can try and work around it?
#21
Posted details about #245187: Widont treats <pre> as </p> and alters preformatted text into it's queue.
#22
Thanks everyone. I've rolled this patch into a beta-release for Drupal 6 :)
http://drupal.org/cvs?commit=164513
#23
Automatically closed -- issue fixed for 2 weeks with no activity.