smartypants settings not displayed
jbjaaz - October 11, 2007 - 23:32
| Project: | Typogrify |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | mikl |
| Status: | closed |
Jump to:
Description
I was looking through the code, and think I noticed a bug in typogrify.module, line 154
if (! function_exists('smartypants')) {
In the body of the if statement is some form elements for setting up smartypants. These settings never show up.
If I change line 154 to
if (! module_exists('smartypants')) {
then the settings show up.

#1
Hi jbjaaz,
I think you've identified a confusing design decision I made in the admin UI. I hide the smartypants options if someone is already using another module that involves smartypants. Maybe I can fix it by giving folks the option to modify the settings anyway -- or at least I could let people know that the options have been intentionally hidden. I'll look into it.
In the meantime, in case you're curious, here's why we have the problem in the first place:
In order to keep users from being confused about where to configure smartypants (in the smartypants module? in the typogrify module? in the marksmarty module?) typogrify doesn't display configuration options for smartypants if you have any other module using smartypants installed.
Are you using the marksmarty module? Any other module that uses the smartypants function? The problem is, the smartypants function is used by modules other than the smartypants module. To head off potential incompatibilities, typogrify checks for the smartypants function -- that way, if you're running some other module that uses the smartypants function (like marksmarty, for example) there won't be a conflict. The modification you made may set you up for some incompatibilities down the line (but you should let me know how it goes... maybe I'm just being overly cautious).
Thanks jbjaaz, for identifying that point of confusion. Hopefully we can fix it. Let me know what you think.
#2
Going back in time a little, these threads explain why we check for the smartypants function rather than the smartypants module -- your modification may cause fajerstarter and TallDavid's bugs to reappear.
#3
#4
#5
This was fixed in beta 4.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.