Is there a way to get "curly" quote marks in my text blocks automatically

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
thetallguy

Is there a way to get "curly" quote marks in my text blocks automatically

Post by thetallguy »

I noticed that a lot of my site text has straight quote marks (") in it.  (This is what happens when one uses a straight text editor to create the site text, I guess. :)

Does anyone know a setting in Apache, PHP or CMSMS that will automatically convert these straight quotes into the typographically better open and close quotes?

(This seems like a stretch, but I'm really not excited about manually converting all the text on my site!)

Thanks!
Michael
thetallguy

Re: Is there a way to get "curly" quote marks in my text blocks automatically

Post by thetallguy »

Hey, now THAT'S cool!  I'll check it out.

Thanks!
Michael
jelle

Re: Is there a way to get "curly" quote marks in my text blocks automatically

Post by jelle »

With replacing alone you won't get what you want, as you probably want to emulate the 'smart quotes' as done by word et al. They replace pairs of straight quotes with a opening and qlosing quote. Tha tis two different characters. Maybe you are better served with a css solution to put your required chars before and after a ?
You can do that with the :before and :after pseudo classes like:

Code: Select all

cite:before {
    content: "\"";
    }
Not really sure how you can get the correct char to show up (check with a different codepage!) but you should be able to figure it out from here. 
Last edited by jelle on Tue Feb 07, 2006 8:57 am, edited 1 time in total.
thetallguy

Re: Is there a way to get "curly" quote marks in my text blocks automatically

Post by thetallguy »

Thanks, Jelle!  The CSS trick is useful, but won't solve this particular problem, since I'm talking about the quotes that are embedded in the normal page text all over the place.  (Like the quotes I'm using here: "Smart Quotes".)  I'd forgotten about the :before and :after pseudo-classes, though, which I can use elsewhere on the site.

Michael
jelle

Re: Is there a way to get "curly" quote marks in my text blocks automatically

Post by jelle »

Yes, that is true, if your text has already been entered and you do not want to edit it then adapting the display of  <cite> won't work. But replacing straight quotes with the correct curly one will be very hard too. Not evry opening quote will be matched by a closing quote. If you do not take any precautions against that and use some sort of counting scheme, you might end up closing a quote where the user intended to open it.
On the other hand, that is not the end of the world.
Locked

Return to “CMSMS Core”