Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-06-08 06:40:16

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

Bug Work-Around

I’ve received a bug report stating that the ampersand-wrapping feature doesn’t work in some circumstances, due to a conflict in the way Typogrify and the built-in widont functionality work. This can also lead to double-widonting:

<h3>My Awesome&nbsp;Article&#160;Title</h3>

To get around this, disable built-in widont for article titles like this:

<txp:title no_widow="0" />

A pending update will fix this problem, as well as simplifying the plugin to use a single template tag (the old ones will still work).

Credit goes to Benjamin White for finding this bug. Thanks, Benjamin!

Plugin Description

This plugin brings the typographical goodies of the Typogrify filters for Django to our favorite CMS. It includes the widow-prevention of aam_widont, along with some other good stuff.

I’ll post more details here when I get the chance, but you’ll find all the details you can handle in my blog post on the plugin. You can also skip right to the good part and download it now, safe in the knowledge that this plugin’s documentation rocks pretty darned hard. Well… at least as hard as one can reasonably expect documentation to rock, anyway.

NOTE: aam_typogrify is not compatible with the older aam_widont plugin. They both use the same template tag for widow control, but use different code to do the job. Having them both installed and active is kind of like the Ghostbusters crossing the streams — a bad idea1. Deactivate and uninstall aam_widont before installing Typogrify.

current release: v0.1

1 Okay, so it won’t cause total protonic reversal. It will make any problems you find more difficult to troubleshoot, however.

Last edited by Logoleptic (2008-05-21 03:11:51)

Offline

#2 2007-06-08 06:45:08

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

very nice! will definitely use it in future projects. now on to typogrify :)

Offline

#3 2007-06-08 07:09:45

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

Actually, I just downloaded the Typogrify plugin for WordPress. It looks like a dead easy port. I think I just found my next project. :-)

Offline

#4 2007-06-11 07:25:54

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

Heads up, Sven. Typogrify for Textpattern is here. :-)

See original post for details.

Offline

#5 2007-06-11 08:57:15

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

sweet. will test it as soon as i can…

Offline

#6 2007-06-11 09:24:16

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

Thanks! If you run into any problems, let me know.

Offline

#7 2007-06-11 11:48:02

kus
Member
From: madiun, Indonesia
Registered: 2007-03-15
Posts: 64
Website

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

Ouuughhh thanks a lot comarde :D , very nice .

But I cant make a comments on your site.

My IP is blacklisted …. arggghhh

Offline

#8 2007-06-11 16:46:51

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

kus said

But I cant make a comments on your site.

My IP is blacklisted … arggghhh

That’s weird. I just double-checked, and there are no banned IPs in my database. Are you sure that you clicked “submit” after previewing your comment? The comment preview will appear with a yellow background, but it won’t actually be published until you click the submit button.

Let me know, please, because if there’s something wrong with my site I’d definitely like to fix it. Meanwhile, you can leave any comments or questions you have about the plugin here. I get an e-mail notification when there are new posts for me to read.

Offline

#9 2007-06-11 16:52:32

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

adam, read this FAQ entry about blacklist false positives.

Offline

#10 2007-06-11 17:40:02

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

ruud wrote:

read this FAQ entry about blacklist false positives.

I’d spaced out the remote blacklist check for a moment when I responded to kus, but I’ve already made that fix to my settings. It could be that kus is just unfortunate enough to share an ISP with a known spammer.

Offline

#11 2007-06-12 01:21:20

kus
Member
From: madiun, Indonesia
Registered: 2007-03-15
Posts: 64
Website

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

is just unfortunate enough to share an ISP with a known spammer.

Yes this is all about my ISP provider , that using open proxy. Now I change the IP address and everything look like fine.

And hey now I can make a comment on your site.

Thanks again for the plugins.

Offline

#12 2007-06-12 02:35:57

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: aam_typogrify - Typogrify: Widon't + CSS hooks for better typography

Glad to see you could make this as a plugin. I think it belong as one more than as core :)

A note about performance:

One of the reasons that Textpattern is so fast is that Textile’s formatting is applied when an article is saved, not whenever a page is viewed. Plugins like mine don’t have that luxury, and this plugin’s extensive regex use might cause some websites to perform more slowly.

Maybe you could register your plugin as administrative, and have it triggered when an article is saved, after the Textile step (I’m not sure there’s a hook here, but I think it might just be). And have an extension panel to control what options are applied, where, etc.

Offline

Board footer

Powered by FluxBB