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.

AttachmentSize
typogrify-drupal-6.patch3.24 KB

#1

stefanor - September 18, 2008 - 22:20

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

AttachmentSize
typogrify-drupal-6.patch 11.05 KB

#2

willfe - September 19, 2008 - 14:36

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

sym - September 29, 2008 - 15:08

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.

AttachmentSize
typogrify-drupal-6_0-1.patch 12.45 KB

#4

frjo - September 30, 2008 - 21:43

Subscribe

#5

CosmicVoyager - October 5, 2008 - 05:12

Are there plans to make a 6.x module?

#6

panji - November 7, 2008 - 20:05

Subscribe

#7

adam_b - November 13, 2008 - 10:47

Subscribe

#8

veriKami - November 22, 2008 - 23:24

subscribing :-)

#9

batje - November 25, 2008 - 09:10

subscribe

#10

no2e - December 3, 2008 - 03:38

will there be a Drupal 6 release?

#11

Shannon Lucas - December 15, 2008 - 19:21

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

#12

canaryMason - December 18, 2008 - 19:22

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

#13

sym - December 19, 2008 - 15:51

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

mikl - December 28, 2008 - 22:35
Status:needs review» reviewed & tested by the community

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

AttachmentSize
typogrify-drupal-6_0-2.patch 32.04 KB
typogrify.class_.php_.txt 6.81 KB

#15

mikl - December 29, 2008 - 01:14

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

rhache - January 5, 2009 - 20:02

subscribing

#17

alan426 - January 7, 2009 - 05:42

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

alan426 - January 7, 2009 - 05:52

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:

AttachmentSize
typogrify.module.gz 2.13 KB

#19

neochief - January 8, 2009 - 19:41

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.

AttachmentSize
typogrify.class_.zip 2.4 KB

#20

mikl - January 9, 2009 - 14:33

#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

neochief - January 9, 2009 - 17:12

#22

mikl - January 13, 2009 - 12:17
Version:5.x-1.x-dev» 6.x-1.0-beta1
Assigned to:Anonymous» 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

#23

System Message - January 27, 2009 - 12:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.