Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#13 2007-06-12 03:29:58

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

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

Thanks again for the plugins.

Glad to hear that it worked out, and you’re very welcome. :-) Let me know if the plugin gives you any trouble.

Jeremie said

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

You’re probably right about that.

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

I’ll look into it. There must be some “do this on save” hooks, because plugins like rss_unlimited_categories would require them. I’m not sure what they are and how they work, however. Even if I find out that it can be done, it may be a week or two before I get around to updating the plugin accordingly.

Meanwhile, can anyone see any drawbacks to applying Typogrify when an article is saved? Here’s the only one I can think of: If you decide to get rid of the plugin, all you have to do is remove it from your templates and delete it from the plugin tab. If Typogrify is applied on save, you’ll have to re-save every article on your site to remove its changes from the database. (On the other hand, you could just remove the relevant styles from your CSS.)

Offline

#14 2007-06-12 07:22:36

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

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

Logoleptic wrote:

(On the other hand, you could just remove the relevant styles from your CSS.)

exactly, the extra bit of markup wouldn’t do any harm! what about existing sites? how would one apply typogrify to the articles that already exist… in general, i really like the idea not having to crawl through each and every article form (if you’re having complex sites), adding (or deleting) the wrapper tags. doing this in a preference pane would be really cool!

Offline

#15 2007-06-12 08:22:30

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

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

sthmtc wrote:

what about existing sites? how would one apply typogrify to the articles that already exist… in general, i really like the idea not having to crawl through each and every article form (if you’re having complex sites), adding (or deleting) the wrapper tags. doing this in a preference pane would be really cool!

For something like that to work, you’d need the ability to selectively apply the filters to certain built-in template tags or HTML tags. As far as I know (which isn’t very far — this is only my second plugin), Txp doesn’t make any hooks available for that kind of thing.

Even if it did, you’d still be applying the filters to the site as it’s displayed rather than when articles are saved. The only way to alter the saved HTML content of an article is to re-save the article, or to run a MySQL query across all the articles in the site.

I tend to think that the results of a Typogrify-on-save solution might be questionable. Widon’t, when used on body text, can produce some pretty awkward-looking paragraphs and lists. I’ll keep thinking about it while I tend to some other work over the next several days. If anyone knows of some documentation for applying non-Textile filters when articles are saved, please let me know and I’ll give it a look.

Offline

#16 2007-06-13 03:30:26

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

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

I’ve thought of a small improvement that I’ll try to implement as soon as I get some free time: allowing the aam_typogrify tag to take attributes for which filters you want to apply. If I end up adding support for Typogrify’s more extensive caps-wrapping down the road, this will make selective filter application a lot more convenient.

Offline

#17 2007-06-19 20:45:09

ferenczi
Member
Registered: 2005-01-31
Posts: 67

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

Brilliant. Thanks.

Offline

#18 2007-06-27 23:07:02

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

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

Textpattern 4.0.5 RC 1 has been released. I can’t think of anything in Typogrify that would conflict with a new Txp version, but if any testers have trouble please let me know.

Offline

#19 2007-06-29 00:37:28

mlarino
Member
Registered: 2007-06-29
Posts: 367

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

Hi
I am new to textpattern, I am trying to convine my web www.mlarino.com with my blog www.staticforest.blogspot.com into one, I dont really know any php, but i am ok with html and css…

The thing is, I love typography, and I think Typogrify could be great, but I cant really get it to work…
I used the <txp:aam_typogrify> in my default form, but I am not really sure if its there where I should use it.
-I see it eliminated the typographical widows but the (“”) and the (&) are still the same….
Can someone help me?
www.mlarino.com/web2-

UPDATE!: Nevermind I figured out, I have to put the spans in the css.

But could you guys help me on how to manage the “” somehow the plugin is not wraping them in a span.
I am using this:
<txp:aam_typogrify><h2><txp:permlink><txp:title /></txp:permlink></h2></txp:aam_typogrify>
in the default page

Thanks

Last edited by mlarino (2007-06-29 10:23:00)

Offline

#20 2007-06-29 16:57:16

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

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

mlarino said:

But could you guys help me on how to manage the “” somehow the plugin is not wraping them in a span. I am using this:

<txp:aam_typogrify><h2><txp:permlink><txp:title /></txp:permlink></h2></txp:aam_typogrify>

in the default page

Thanks for posting this. I won’t have time to check into it until sometime this weekend, unfortunately. Meanwhile, can anyone else here reproduce mlarino’s problem?

Offline

Board footer

Powered by FluxBB