Better admin UI for SmartyPants settings.

jiangxijay - October 3, 2007 - 02:11
Project:Typogrify
Version:5.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:mikl
Status:active
Description

I am using Filtered HTML as my default input format, and I've enabled all four Typogrify refinements.

I also added to the allowed tags.

None of the refinements are appearing.

Is there something else I need to do?

#1

jiangxijay - October 4, 2007 - 03:05

Follow-up. The only refinements that aren't appearing are those generated by SmartyPants; the others (in tags) are fine.

Are there known conflicts with themes or other modules?

#2

jiangxijay - October 4, 2007 - 03:52

SmartyPants/Typogrify convert quotes into curly quotes, but not " into curly quotes.

Can that be changed:? In other words, can SmartyPants (php-typogrify.php or smartypnts.php) be trained to look for the entity?

#3

jiangxijay - October 4, 2007 - 03:54

Clarification: " isn't being translated into curly quotes.

#4

jiangxijay - October 4, 2007 - 03:59

According to the original developer, support for converting " entities is in SmartyPants.

http://daringfireball.net/projects/smartypants/

Added a new option to automatically convert " entities into regular double-quotes before educating quotes. This is mainly for the benefit of people who write posts using Dreamweaver, which substitutes this entity for any literal quote char. The one and only way to invoke this option is to use the letter shortcuts for the smarty_pants attribute; the shortcut for this option is “w” (for Dream_w_eaver). (Suggested by Jonathon Delacour.)

Is this not implemented in Typogrify?

#5

jiangxijay - October 4, 2007 - 04:10

In smartypants.php, a configuration line needs to be edited to include the translation of " into curly quotes:

From this ...

$smartypants_attr = "1";  # Change this to configure.

... to this ...

$smartypants_attr = "qDew";  # Change this to configure.

However, php-typogrify.php appears to ignore this attribute.

#6

BrightLoudNoise... - October 18, 2007 - 03:42

Look for line 82 in smartypants.php, which should look like $convert_quot = 0;  # should we translate " entities into normal quotes?

change it to $convert_quot = q;  # should we translate " entities into normal quotes?

that took care of it for me.

#7

BrightLoudNoise... - October 18, 2007 - 03:45

To further clarify, you don't need to touch the $smartypants_attr = "1";  # Change this to configure. line.

#8

jiangxijay - October 20, 2007 - 01:10

Bingo. Thank you!

#9

BrightLoudNoise... - October 23, 2007 - 00:56
Assigned to:Anonymous» BrightLoudNoise@drupal.org
Status:active» closed

#10

Tim Gambell - November 17, 2007 - 22:45
Status:closed» active

I'll add some admin UI for this option. Thanks for tracking it down!

#11

Tim Gambell - November 17, 2007 - 23:53
Assigned to:BrightLoudNoise@drupal.org» Tim Gambell

#12

mikl - January 13, 2009 - 13:18
Title:Refinements not appearing» Better admin UI for SmartyPants settings.
Category:support request» feature request
Assigned to:Tim Gambell» mikl
 
 

Drupal is a registered trademark of Dries Buytaert.