SmartyPants / Texturize

Creating and modifying plugins.
Post Reply
pronik
Regular
Posts: 5
Joined: Tue May 15, 2007 5:01 pm

SmartyPants / Texturize

Post by pronik »

I've been wondering if there is a reason why s9y doesn't have any typographic plugins yet -- known in other system by the name of SmartyPants or Texturize. Does anybody use these with s9y?

SmartyPants can be used as a Smarty plugin, however, I know too little about Smarty and s9y plugin structure to activate it. Could someone give me a hint on how to include it with my s9y installation?

Thanks!
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi

Matt Groeninger's 'Typeset/Extended Buttons for non-WYSIWYG editors' is a typographic plugin that might do what you want. I think it's available with Spartacus or you can download it from http://spartacus.s9y.org/

HTH

Dave
pronik
Regular
Posts: 5
Joined: Tue May 15, 2007 5:01 pm

Post by pronik »

Sorry, evaluated that, it's not what I want. That plugin provides some buttons with some "more typographic" characters in the editor. What SmartyPants does is convert plain-text entities to typographic symbols -- for example, "--" becomes en-dash, quotes are automatically set to the right ones for the locale, "..." becomes ellipsis, "(c)" becomes the copyright sign and so on. As this is just a simple filter, it's a more flexible and transparent approach.

Maybe you have an idea how to put a smarty filter to work in s9y?
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Note, that plugin works manually... You have to click a button to add the proper typographic character. ( I prefer this because it stores the proper encoded character in the database, rather than changing it dynamically).

So it is not as simple/easy as SmartyPants (I've never used Texturize, but I assume it is similar).

There the plugin "Layout-Plugin: Quote-Markup", but I have never used it.

I have whipped together a SmartyPants based markup plugin, available here:
http://www.theledge.net/uploads/serendi ... nts.tar.gz

It is based on the Markdown markup plugin, but just calls the SmartyPants PHP library instead. I'll talk to Garvin about whether it should be placed in Spartacus or whether we need to look at combining/relabeling some of the plugins.
pronik
Regular
Posts: 5
Joined: Tue May 15, 2007 5:01 pm

Post by pronik »

Perfect! Exactly what I wanted, works like a charm. Thanks!
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

There the plugin "Layout-Plugin: Quote-Markup", but I have never used it.
Whoa.... I think I am way wrong on the one... I think the Quote-Markup plugin does css changes to change actual quoted text. Sorry about that.

Yeah, "Markup: Smart Quotes" is what I was looking for.
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Glad it worked!

I will try to remember to post here again, once it is either added to spartacus or combined with another plugin.
pronik
Regular
Posts: 5
Joined: Tue May 15, 2007 5:01 pm

Post by pronik »

Magic Quotes only converts left and right quote. SmartPants does more ;) Thank you for your help!
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Ok, I have removed my download because Garvin has uploaded a new version of the Smart Quotes plugin (now called "Markup: Typographic Smart Quotes" to explain it a little better) that allows the user to use SmartyPants as the replacement engine. All you have to do is switch the "Use SmartyPants?" setting from false to true in the plugin configuration.

This adds the functionality, without cluttering up Spartacus with simple wrapper plugins.

If you have downloaded my plugin I would recommend that you switch to the "Typographic Smart Quotes" plugin (once Spartacus has updated) since any bug fixes/feature enhancements will be made to that in the future.

pronik, thanks for the suggestion and I hope you make more!
u1amo01
Regular
Posts: 273
Joined: Fri Sep 28, 2007 3:55 pm
Location: Kurpfalz, Germany
Contact:

Post by u1amo01 »

Hi,

would it be possible to add quotes like »this« to your plugin?

Best,
Klaus
Post Reply