Here is a Drupal 6 support patch.

Also removed trailing "?>" lines to comply with Drupal coding standards.

Comments

stefanor’s picture

FileSize
11.05 KB

Updated patch, to meet coding standards (even though the included php scripts won't)

willfe’s picture

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.

sym’s picture

FileSize
12.45 KB

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.

frjo’s picture

Subscribe

CosmicVoyager’s picture

Are there plans to make a 6.x module?

panji’s picture

Subscribe

adam_b’s picture

Subscribe

veriKami’s picture

subscribing :-)

batje’s picture

subscribe

no2e’s picture

will there be a Drupal 6 release?

Shannon Lucas’s picture

The patch from #3 works for me under Drupal 6.8.

mason@thecodingdesigner.com’s picture

The patch for #3 works for me as well. (d6.8)

sym’s picture

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.

mikl’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
6.81 KB
32.04 KB

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 :)

mikl’s picture

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.

rhache’s picture

subscribing

alan426’s picture

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!

alan426’s picture

FileSize
2.13 KB

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:

neochief’s picture

FileSize
2.4 KB

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.

mikl’s picture

#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?

neochief’s picture

mikl’s picture

Version: 5.x-1.x-dev » 6.x-1.0-beta1
Assigned: Unassigned » mikl
Status: Reviewed & tested by the community » Fixed

Thanks everyone. I've rolled this patch into a beta-release for Drupal 6 :)
http://drupal.org/cvs?commit=164513

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.