Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#21 2007-07-02 02:48:26

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

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

I have been testing this all weekend, but I cant get the “” to work :(
Any sujestions?

Offline

#22 2007-07-03 07:41:30

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

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

I kept testing this, I thought the widowed words was working, but it was actually because I had it set up in the textpattern preferences, not because of typogrify.
The only thing that works is the wraping of the &.

Offline

#23 2007-07-03 18:08:05

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

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

I’m sorry you’re still having problems, mlarino. I won’t be able to look into this further until probably the weekend (gotta pay the bills), but there are a few things you can do to help me troubleshoot the issue once I get some more time:

  1. Pay a visit to the Diagnostics tab (Admin -> Diagnostics), and look for the following information in the text box on that screen:
    • What version of Textpattern are you using?
    • What version of PHP does your site run on?
    • What are your active plugins?
    • Are you shown any red error messages on the Diagnostics tab? If so, what are they?
  2. Put your site into Testing mode (on the Admin -> Preferences tab) and re-load the page where this problem occurrs. Do any PHP error messages appear at the top of the page?
  3. Put your site into Debugging mode, re-load the page again, and view its source code using your Web browser’s view source command. At the bottom of the page, you should see a whole lot of information contained within HTML comments. This is the tag trace for that page. Please e-mail the trace information to me, and I’ll look through it this weekend.
  4. Try putting the exact same template tags that you posted here into an article form instead of the default page template. Does the problem still occur?

Thanks for the extra information, and for your patience.

Offline

#24 2007-07-09 05:24:06

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

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

@mlarino: I’m not sure if you got my e-mail reply, but the code you sent through my contact form got truncated. I have a bunch of HTML source, but no tag trace.

Please try again, sending only the tag trace through either my website’s contact form or the one here on the forum. You can also post the trace in this thread, where other users may be able to help you out.

You can find the tag trace in your HTML source code by looking for lines similar to these:

<!-- Runtime:    0.1063 -->
<!-- Query time: 0.028467 -->
<!-- Queries: 25 -->

Those lines will appear at the beginning of the trace, which will extend from there to the end of your source code.

Thanks again. I’m sorry my contact form chopped up your message, but the character limit is in place to help prevent form abuse.

Offline

Board footer

Powered by FluxBB