WordPress Plugin: JavaScript Pull-Quotes

Calling All Translators: I am not bilingual, but I have made this plugin’s Options screen ready for WordPress localization files. If you would like to translate this plugin into your own language, please see the Readme file in the /lang/ folder of the download. Thanks!

Attention WordPress Theme Designers: This plugin now allows you to embed a pull-quote design in your WordPress theme. Just make the CSS file similar to those found in the jspullquotes/styles/ folder, and drop it in your theme folder with the name “jspullquotes.css”.

What is it?

The JavaScript Pull-Quotes plugin is an add-on for WordPress that allows you to easily insert pull-quotes into your posts and pages. It uses client-side JavaScript specifically because, as a purely visual effect, it seems appropriate to avoid “doubling up” the text for people on text-only browsers or older browser that probably won’t properly handle the CSS involved. If a browser has JavaScript turned off, or otherwise somehow can’t handle the pull-quotes, then they should be completely invisible and out of the way.

How do I use it?

The plugin will look for any text that is inside a tag with a class of “pullquote”, and turn it into a pull-quote. <span class="pullquote">This sentence is a pull-quote, for example</span> — though in a real post the span tags will not be visible to readers as they are in this case! If you are not using the rich-text editor in WordPress, there is actually an automatic “Pull-quote” button in the post editor screen; otherwise you should be able to add the manually.

If you like, you can specify a particular side for a particular quote. To do this, simply set the span’s class to “pullquote pqRight” or “pullquote pqLeft”. This will put that one pull-quote on the chosen side completely independently of any other side-related options in use.

There is a options panel in the WordPress admin screen that allows you to set various options. I recommend you check it out before adding any pull-quotes to posts — you can find it under the Presentation section.

In the aforementioned options panel there is a control to select a style for pull-quotes, much like selecting a Theme in WordPress. There is also a preview button, so you can see what a particular style looks like without having to activate it first.

Sometimes you have a sentence with some subsidiary clause that you don’t want to include in the pull-quote. We’ve got you covered. If you have some text that you want to quote, but leave out extraneous, repetitious, or just plain unnecessary text, you put the alternate text in an <!-- HTML comment --> immediately inside the span. This last part is important — <span class="pullquote"><!-- You can put any alternate text you want in the comment -->the comment must be the very first thing inside the span</span>: no spaces, quote marks, or anything else comes first. (Again, the spans and comments will not be visible to your readers — this is just for demonstration purposes!).

Using alternate text in this way is of course completely optional If you like to keep things simple, just put the quotable text in a span as noted above and you’ll be fine. That’s about all there is to it.

Features

  • The plugin is fully language-aware and ready for localization. Both French (Merci Ben!) and Italian localizations are included.
  • Styles menu. The Options panel has a drop down menu that allows you to choose a visual style for your pull-quotes. Styles are easily customized and open for third-party contributions (similar to WordPress Themes).
  • Preview styles without activating them
  • A pull-quote style can be embedded in a WordPress theme. If the active theme has a file called “jspullquotes.css” in it, that will be used automatically.
  • You can specify a side for a particular quote. To use, set span class to “pullquote pqRight” or “pullquote pqLeft”
  • Successive pull-quotes can alternate sides
  • Strip link information out of the quote text
  • Have pull-quotes that differ from the “auto-quoted” text
  • Allow user to choose default side
  • Advanced options to specify the HTML tag and CSS classes to be used

Installation

Download the file, unzip it, and put the jspullquotes folder into your blog’s wp-content/plugins/ directory. Next activate it in the WordPress Plugins panel.

REMEMBER: The Pull-Quotes Options panel appears under the Presentation section.

Download

Is this download worth a dollar to you? If you have found this plugin useful, please consider making a donation. Even as little as a dollar is appreciated:

Comments and suggestions are welcome.

Share the Love

If you like this plugin, please spread the word! I’ve made one o’ them handy sidebar link images that you can download and put on your own blog. Please link it to this page, of course! Here’s the image; just right-click and save:

JS Pull-Quotes

Or, if you have the plugin installed, you can simply paste the following into your sidebar (you may need to change the image “src” path, depending on your site):

<a href="http://striderweb.com/nerdaphernalia/features/wp-javascript-pull-quotes/"><img src="/wp-content/plugins/jspullquotes/extras/jspullquotes.png" alt="JS Pull-Quotes" title="JavaScript Pull-Quotes" height="15" width="80" /></a>

Acknowledgements

Thanks to Roger Johansson and “Viper007Bond” for laying much of the groundwork that led to this plugin. See the readme.txt file included with the download for further details.

Thanks to Ben for the French translation, and to my wife’s friend Toni’s cousin Ralph for the Italian.

Last but not least, thanks to the fine folks at WordPress who made this all possible.

Version History

  • v.1.6.7 — 15 January 2008 –
    • NEW French localization — Merci Ben!
    • BUGFIX - version display in page header was broken
    • Small fix to localization file, and various other code fixes
  • v.1.6.6 — 26 November 2007 –
    • Added User Option to _not_ link CSS — this way admin can put CSS in site’s main CSS file and save some HTTP requests
    • Plugin path now uses plugin_basename() (stability improvement)
    • BUGFIX - version display on Options screen was broken
  • v.1.6.5 — 31 August 2007 –
    • Now auto-sets defaults when activated. No need to visit the options screen
    • Lots of under-the-hood changes, including additional logic testing for user capabilities, and significant file reorganization
  • v.1.6 — 25 July 2007 –
    • Italian localization added
    • Changed user requirement for Options Screen. Was Access Level “7″, now requires Capability “edit_themes”
    • Minor experimental change that may or may not kick in in a future update of WordPress (yes, I like keeping you in suspense! :) )
  • v.1.5.4 — 16 June 2007 –
    • The preparations for localizations are complete. A POT file is now included with the download. Please send me translations and I will include them with the download! :)
    • Cleaned up the identification comments included in the page additions
    • Some code cleanup and rearrangement. The main PHP file is now much simplified, with the main code class in a separate file.
  • v.1.5.3 — 10 May 2007 –
    • Styles can now be in folders, which allows for organizing styles that include graphic elements or other additional files
    • Bug fix: There was a minor error with the side alternation if the first pull-quote had a side specified
    • More under-the-hood code fixes and optimizations.
  • v.1.5.2 — 6 April 2007 –
    • Added “Style Preview” button in options panel
  • v.1.5.1 — 29 March 2007 –
    • Added ability to embed pull-quote design into a WordPress theme
    • Now uses _e() function on Options screen to allow for translations
    • Minor cosmetic changes to Options screen
  • v.1.5 — 19 March 2007 –
    • Added drop down menu so user can select a style for the pull-quotes
    • New “Modern” style
    • Fixed “pull-quote” button in HTML post editor (not sure when this broke!)
    • Bug fixes and code improvements
  • v.1.4 — 20 February 2007 –
    • Added user-specified sides for particular pull-quotes.
    • Laid groundwork for planned text-modification options
    • Removed <p> option for containing object — conflicted with formatting
    • Disabled button in rich-text post editor, as it is broken in WP 2.1. Hopefully fixed with changes scheduled for WP 2.2
    • A large number of under-the-hood improvements and optimizations
  • v.1.3 — 20 November 2006 –
    • Added “Advanced” options that allow user to specify HTML and CSS for pullquotes
    • Rolled Beta WYSIWYG button into main plugin as an option
    • Fixed bug in “skip empty pull-quotes” code
    • Many under-the-hood code changes, including stability improvements and code reorganization that will make further updates easier
  • v1.3b1 — BETA VERSION — 11 November 2006 –
    • Added button to rich-text edit page.
    • Reduced risk of function name conflicts with other plugins.
  • v1.2.2 — 1 hour later –
    • Added a link to edit the CSS file that controls the appearance of the pullquotes
    • Cleaned up the Options panel a bit.
  • v1.2.1 — November 3, 2006 –
    • Bug Fix: Switched to a CSS selector that is far less likely to be already in use by a user’s stylesheet.
    • Bug Fix: Empty spans do nothing rather than creating an empty pull-quote. This allows for Safari bug work-around described below (and when Apple fixes the bug, no changes should be needed for Safari to work fully).
  • v1.2 — October 26, 2006 –
    • Added option to choose default side on which to display pull-quote
  • v1.1 — October 20, 2006 –
    • Initial public release

Troubleshooting/ Work-Arounds

  • If you want to use this effect on a non-WordPress website, I suggest you check out the original script on Roger’s site, or my “no links” version.
  • PROBLEM: You install it and nothing happens when you add the span tags to your post. SOLUTION: It may be your theme. Check in the header.php file — the following line must appear somewhere in the section of your page (usually toward the end):

    <?php wp_head(); ?>

  • BUG: There are issues with accented letters within alternate text comments that need to be fixed
  • You may have noticed “alternate text” pull-quotes throwing errors when you have a double-dash in them. This is an obscure technicality of HTML rearing its head. Technically speaking, a double-dash ends an HTML comment, and that means the comment is ending earlier than you want it to.
  • There is a bug in the Javascript rendering of Safari on Mac OS X (fixed in v3 beta), which causes it to miss the alternate text. Assuming that some of your users probably do use this browser, you have two options:
    • Do the alternate text as described. Safari will show the *actual* text in the span as though the alternate were not there.
    • Put the comment alone in a pullquote span, just before the sentence you’re (sort of) quoting. Safari will not show any pullquote, but other browsers will work normally. Example: <span class="pullquote"><!-- Darn that Safari! --></span>Darn that Javascript-mangling Safari!

95 Comments

  1. Posted October 26, 2006 at 12:42 am | Permalink

    This Pullquote plug-in is very neat and simple. Great job. I have recommended it to clients that are using WordPress for blogging. If you check out my URL you will see that I have obviously implemented the functionality on my own site.

    Thanks for some great work!

  2. Posted October 26, 2006 at 1:57 pm | Permalink

    I just discovered a bug, folks. The alternate text doesn’t work in Safari. Working on a fix.

    Also — a “choose default side” option is imminent done (working on that is what exposed the bug)

    Stay Tuned.

  3. Posted October 30, 2006 at 2:58 pm | Permalink

    Just the plugin I was looking for. I’ll be starting a new site in a few weeks with mostly text, and pullquotes will make it look much better.

    Isn’t there supposed to be a pullquote button in WYSIWYG? I didn’t get one. Other than that it works great.

    Thanks,

    Lowell

  4. Posted October 30, 2006 at 3:31 pm | Permalink

    No button in the WYSIWYG editor (yet). The button in the plaintext editor is actually part of the code that was done by others before I got to it (see the History section on this page).

    At some point I will probably take a crack at adding this. You’ll note it’s on my “in the works” list in the Features section.

  5. Mike
    Posted October 31, 2006 at 10:16 am | Permalink

    Doesn’t seem to work with FCKeditor.

  6. Posted October 31, 2006 at 9:55 pm | Permalink

    I’m not familiar with it, but FCKeditor appears to be a text/HTML editor. (The site is confusing. Are you meant to run it within your browser?)

    This is a WordPress plugin.

    If you mean you’re using that program to write your posts, and then drop them into Wordpress, you should be able to add a <span class=”pullquote”> to your text using any HTML editor. In this case, it looks as though you may have to use the “Source” button.

    I’m sure support on that site can help you more than I can.

  7. Posted November 2, 2006 at 1:22 am | Permalink

    Hi! Thanks for this great plugin, but I’ve got a problem, which is seen in this screen-shot:

    As you can see, the markup produces a blank line under the quoted text, which isn’t the case in your example. I’ve troubleshot [is this really the proper past tense version of the verb?] the issue by checking the post using Firefox 1.5.2 and Flock 0.7.6 on two different computers (WinXP Pro and OSX 10.4.8) with the very same result, no matter if the quotes are included in a published post or a draft.

    Can you help me? This plugin seems to have the upper hand on this one, but please, let competition be your carrot (and blissful delight in helping a stupid user) ;) Thanks!

  8. Posted November 2, 2006 at 1:25 am | Permalink

    Somehow the screenshot disappeared from the post (despite being viewable from the preview box when commenting) so here’s a direct URL to it: http://niklasblog.com/wp-content/2006-11-02-pullquotese...

  9. Posted November 2, 2006 at 8:32 pm | Permalink

    Not sure why that would happen. I’m guessing you don’t have an extra break within the <span>?

    One other possibility is that there is something else in your site’s style sheets that is causing this.

    Can you point me to an actual page where this is happening? I can only guess looking at a screenshot. (Stick a pullquote in an old post and give me the link…)

  10. Posted November 3, 2006 at 1:01 am | Permalink

    Hello, Stephen! Thanks for helping out! Here’s a sample, and you’re right, there’s no extra break within the : http://niklasblog.com/?p=1078

  11. Posted November 3, 2006 at 10:14 am | Permalink

    Got it — I’m using a too-common CSS selector “alt” for right-side pull-quotes. You also have an “alt” selector in your stylesheets, with a padding of 10px.

    I’ll change the code to account for this - probably should make it a user option since anything’s possible….

  12. Posted November 3, 2006 at 12:25 pm | Permalink

    Thanks a lot, Stephen. I’ll check it out when the plugin’s updated, and yet again, thanks!

  13. Posted November 3, 2006 at 3:16 pm | Permalink

    Okay, a couple of rapid-fire updates:

    I’ve fixed Niklas’ padding problem, worked in a workaround for the Safari bug, eliminated empty (no content) pull-quotes, added a link to edit the CSS file, and cleaned up the interface a bit. Whew! Version 1.2.2 is up.

  14. Posted November 4, 2006 at 10:25 am | Permalink

    Thanks a lot, Stephen! Up and running smoothly on my blog, making reading easier and a richer experience.

  15. Posted November 9, 2006 at 10:46 am | Permalink

    Heres my K-I-S-S take on a purely (X)HTML, CSS, semantic, and XHTML 1.0 Strict Validating way to create pullquotes.

    http://www.askapache.com/2006/css/pullquotes-using-css-...

    Great article and I really like the look of your end result, and the change from the outdated innerHTML method. When you can eliminate js, doit. NOTE: Im not anti-js, just a minimalist.

  16. Posted November 9, 2006 at 10:34 pm | Permalink

    The issue with that is that it requires you to duplicate text in the markup. One of the core concepts of web standards — that is, proper use of (X)HTML, CSS, and JavaScript, is the idea of separating structure, visual design, and behavior.

    So in a sense, you’re right, as I’m using JavaScript to create a purely visual effect, whereas your method maintains the visuals purely within the CSS. I’m breaking down the separation of design and behavior.

    The problem with *your* method is that it improperly breaks down the barrier between structure and design by requiring the writer to duplicate the text for the pull-quote. With my method, the quoted text is — deliberately — only duplicated programmatically, and disappears entirely when it doesn’t work, such as in text browsers.

    In other words, it “degrades gracefully” in browsers in which the effect doesn’t work; whereas your way will, under all circumstances, duplicate the text.

  17. Posted November 11, 2006 at 3:31 pm | Permalink

    I get the following error when I try to access the plugin’s Option page :

    Warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, ‘jspullquotes_subpanel’ was given in /home/mjbiscay/public_html/wireless/wp-includes/functions.php on line 1329

    Any ideas what’s wrong ? I’m using WP 2.0.5 and v1.2.2

  18. Posted November 11, 2006 at 9:00 pm | Permalink

    Sounds as though the jspullquotes_options.php file is missing. The first thought that jumps out at me is that you might have just installed the jspullquotes.php file alone. When you installed the plugin, did you put the entire jspullquotes folder in the plugins directory?

  19. Posted November 12, 2006 at 3:04 am | Permalink

    Yes, all the files were uploaded to /plugins/jspullquotes.
    v1.3b1 solved the issue though, thanks ! :)

  20. Posted November 13, 2006 at 3:43 pm | Permalink

    Final question and I’ll leave you alone ( :p ) : is there a way to tell the script when to put the pullquote on the right or on the left ? Apparently it’s all automatic, taken from the options.

    It’d be nice to have a “pullquote-right” and “pullquote-left” class. Is there any way we can implement that Stephen ?

  21. Posted November 14, 2006 at 2:49 pm | Permalink

    That shouldn’t be too hard, except for figuring out how it should interact with the “alternate down the page” option. Should the alternation be “reset” by a specific-side pullquote or should specifying a side override the one quote only and not affect anything else?

    My first instinct is to say it should affect the one quote only, but then in alternating pages you could easily get a sudden run of three quotes down one side….

    Or maybe I’m waaay overthinking things, as this plugin is purely cosmetic anyway… hmmm.

  22. Posted November 14, 2006 at 2:58 pm | Permalink

    There is a new BETA version up, which adds a button in the WYSIWYG editor. Please give me feedback!!! Is it working properly for those who’ve tried it? Anyone having problems?

    Currently the only issues I know if is that there is currently no actual indication that a pullquote is there until you actually publish and look at the post itself. (And the only way to remove a pullquote is to edit the HTML directly and remove the <span>) I’m working on it!

  23. Posted November 17, 2006 at 9:02 am | Permalink

    I am already using some styles for my blockquote. Unfortunately this plugin conflicts with those.

    Is there a reason to convert <span class=”pullquote”> to an existing element name (<blockquote> in this case)??

  24. Posted November 17, 2006 at 12:49 pm | Permalink

    The script takes the text within the <span> and duplicates it within a new <blockquote>. As the pullquote is a quotation, it seemed appropriate to use <blockquote>.

    If your CSS is interfering with the script’s CSS, you should be able to explicitly reset the declarations that are being screwed up. In the Options panel there is a button to edit the CSS for the blockquotes. (If the other way around, you should be able to edit your own CSS in the same way.)

    I see your point though. While I believe the <blockquote> tag is syntactically correct, perhaps an “advanced” option to use <span> or <div> is needed. As I was already going to add options to specify the CSS declaration used, this should not be too difficult to add (I hope :) ).

    In the meantime, I think the next minor version of the plugin will have more specific “no assumptions” CSS that will cut down on problems such as this. Can you tell me what CSS you used that interferes? It might help me do this (you can email me privately for this).

  25. Posted December 4, 2006 at 2:31 am | Permalink

    This plugin looks great! I just need more control over manually setting my individual pullquotes alignment left or right. Matt mentioned this above. Anyone figure it out yet?

  26. Posted December 5, 2006 at 12:09 am | Permalink

    There are several things in the works. I worked out an infrastructure change that will allow for a number of changes I want to make, including options that manipulate the quote text (for capitalization and such….)

    I also expect to get the per-quote right/left option working as people have suggested. I’m very busy lately, and might not get to it for a few weeks. Holidays, possibly moving. Lots of things on my plate lately. Rest assured this plugin is not forgotten! :)

  27. ovizii
    Posted December 12, 2006 at 11:20 am | Permalink

    hi there,

    very nice plugin you made, I jsut have one question:

    I also saw this plugin: http://www.cafelamarck.it/22/ and saw you posted there too, so you know it.

    I like your advanced settings for the plugin but I would like my pullquotes to look like those generated by the other plugin…

    could you give me a hand with that? It is not just about copying that other css style, because the other style somehow alternates, i.e. it makes certain words bolder, whatever…

  28. Posted December 12, 2006 at 8:59 pm | Permalink

    “the other [plugin] somehow alternates, i.e. it makes certain words bolder, whatever…”

    That’s interesting, I hadn’t noticed that before…. What that plugin does is take the quotes text and (semi-randomly?) add <b>bold</b> tags to some words. It is an interesting effect.

    Coincidentally, something I’ve already done to the (as yet unreleased) next version will make implementing things like this much easier. Some details here: JavaScript Function: dupeNode()

    In a nutshell, the groundwork has already been laid for new functionality that modifies the text within the pull-quote. So maybe this will happen down the road a spell.

  29. Posted December 31, 2006 at 8:44 pm | Permalink

    I’ll be damned if I can get the “altPq” command to work.

    Don’t know if it’s because I’ve set the display to “Right” (and thus, I’d hope that the “pullquote altPq” would display a quote on the left), but I can’t seem to figure it out.

    Is it me, or have I found a bug?

    Beyond that, of course, much appreciate the app!

  30. Posted January 1, 2007 at 12:28 pm | Permalink

    Brad –

    You do have to turn it on in the options panel (under the “Presentation” tab in the admin screen), but other than that it should work right out of the box.

    Happy New Year!

  31. Posted January 4, 2007 at 4:38 pm | Permalink

    Nicely done Stephen.
    I love it.

  32. Posted January 10, 2007 at 8:18 pm | Permalink

    I guess there’s a bug in line 30 of the “*_option.php” file. It must said:

    >left

    Would you please validate this?

    Thanks and very good job! Your script is geat!

  33. Posted January 11, 2007 at 4:44 pm | Permalink

    Claudio –

    The double ‘>’ is correct. The first is the end of a bit of PHP, and the second is part of the HTML.

    PHP segments begin with ‘<?php ‘ and end with ‘ ?>’

  34. Claudio
    Posted January 13, 2007 at 8:35 am | Permalink

    Thanks Stephen. I mean that the *_option.php file in line 30 says:

    checkcombo(’def_side’,’left’,’left’)

    but I believe that must say

    checkcombo(’def_side’,’left’,’right’)

    Regards.

  35. Posted January 13, 2007 at 3:07 pm | Permalink

    Claudio –

    The code is correct as written. The second defines the default, and as such should be the same for both options within a combo.

    That being said, my current (soon to be released) version uses an improved bit of code, wherein the default option has a “true” parameter set, and all others do not need the last parameter at all.

    I’ve been busy recently (buying and selling a home!), which is why it’s been so long without an update. I expect a new release very soon with one or two most-requested features rolled in. :)

  36. Posted January 19, 2007 at 5:35 pm | Permalink

    Stephen,

    I have a little problem here: the texts in pull-quotes are duplicating as you can see here. When I first installed the plugin, this didnt happen.

    Do you have any clue about this problem?

    Thanks.

  37. Posted January 24, 2007 at 11:03 am | Permalink

    Leonardo — I see the pull-quote but I’m not seeing the problem. What exactly is being duplicated? Also, what browser (and version), and OS are you using?

  38. Posted January 24, 2007 at 1:23 pm | Permalink

    Stephen, its ok now. For some reason, the javascripts of many plugins I use were duplicanting, this affected not just de pull-quotes. I changed the theme and the problem was solved. Anyway, thanks for you attention.

  39. Posted January 25, 2007 at 4:40 am | Permalink

    Stephen,

    I’ve just noticed that the alternate text is messed up when using accents. Is there a way to html_entity_decode the text ?

    Thanks.

  40. Posted February 19, 2007 at 4:49 pm | Permalink

    Matt —

    Sorry I didn’t respond earlier. I somehow missed your question and just now noticed it!

    I would think that you can double-encode the character, though I haven’t tested it.

    Example: &amp;eacute;

    However, this is certainly inelegant, and I will look into a fix. Thanks for the catch!

    [edit: possibly use escape() and unescape() in the JavaScript...]

  41. Posted February 19, 2007 at 6:09 pm | Permalink

    Stephen -

    Only now getting back to the comment I left in December and which you replied to on Jan 1. (both are up above).

    You say I need to “turn on the option” to allow for use of the “pullquote altPQ” option, but I don’t know where one would turn that on. Any hints?

    I don’t want to use the option for “Successive quotes on one page alternate sides” because that means pullquotes, on my main page (where I may have many articles using pullquotes) won’t necessarily be on the predicted side of the in each given article.

    So I don’t want to randomly alternate sides, I want to be able to specifically specify when the pullquote should be on the left instead of on the default right. But I don’t see where to “turn that on” as you suggest.

    When I use the “pullquote altPQ” div, the pullquote just goes on the right as the noramal “pullquote” div does.

    ADDITIONAL QUESTION/BUG-REPORT: The use of double hyphens, as in “–” inside a pullquote will cause it to err. At least when using the commented version (the one that allows me to use the quote on a different graf). A work around would be great since often I use pull-quotes to actually quote someone as in “Some great thing someone said. — Great Person named here”

  42. Posted February 19, 2007 at 7:52 pm | Permalink

    BradBlog –

    Aha, I misunderstood then. Currently there is no option to arbitrarily specify a side for a particular quote, but as you may notice above it is an oft-requested feature, and I expect to have it implemented in the next release (hopefully very soon).

    Regarding the Bug Report: This is an obscure technicality of HTML rearing its head, and I’ve added a note regarding this to the instructions on the next version. Technically speaking, a double-dash ends an HTML comment, and that is what’s happening here. I might suggest using an encoded em-dash instead (e.g. &#151; ).

    Hmm… I’ll also add that info to the “Workarounds” section on this page. Thanks for the reminder! ;)

  43. Posted February 19, 2007 at 9:18 pm | Permalink

    Thanks for the quick reply (and for the workaround on the other issue) Question then is what the heck is the “pullquote altPQ” for then???

  44. Posted February 20, 2007 at 8:26 am | Permalink

    “[W]hat the heck is the “pullquote altPQ” for then???”

    altPQ is used by the “alternate down the page” option. Basically, if that option is turned on, the script adds “altPQ” to the class of every second pull-quote div, which tells the CSS to put it on the other side.

  45. Posted February 20, 2007 at 1:58 pm | Permalink

    Ah, thank you! Had thought it was for manual specification of placement on the alternate (from the default) side of the page.

    Might request in your updated version (happy to test it, btw) that it do exactly that. Even if the “Alternate pullquotes on page” option is NOT selected.

    Should give users far more control over placement. As mentioned, I can’t use the selection to alternate them on the page, because it means on the main page, where there may be other articles that use the pull-quotes, the quote ends up on a different side of the page than planned/hoped for.

  46. Posted February 20, 2007 at 6:07 pm | Permalink

    New update folks!

    JavaScript Pull-Quotes 1.4 includes the much-requested ability to specify a side for a particular pull-quote!

    Just do you spans thus:

    <span class="pullquote pqLeft"> or
    <span class="pullquote pqRight">

    Also note that I’ve now got a sidebar image for you to put on your own site if you’d like to link to this page. :)

    Enjoy!

  47. Posted March 6, 2007 at 2:46 pm | Permalink

    Is there a way to stylize the pull quote - like to italicize or bold certain words? i haven’t downloaded yet - I am trying to figure out the difference between this plugin and the cafelamarck one. this one seems to allow for invisiblity, which is key.

    thanks!

  48. Posted March 6, 2007 at 8:12 pm | Permalink

    You can stylize text using CSS (a.k.a. Style Sheets). Any tags within a “pullquote” span appear in the large pull-quote, so A) any styling within the source quote appears in the pull-quote, and B) you could play with the Style Sheet to create certain effects. For example, you could do this:

    <span class="pullquote">Why <span>hello</span> there!</span>

    and then style the “hello” by putting something like this in the style sheet:

    blockquote.pullquote span {font-weight: bold;}

    I do not (yet) have functionality that creates the semi-random formatting that the cafelamarck plugin does, but as you point out, mine do disappear cleanly if the plugin is disabled. As for other differences, I believe this one has more display options, and a full Options page in the Admin screen. Mine also allows for text that differs from the <span>ed text, and a few other tricks. Enjoy! :)

  49. Posted March 7, 2007 at 10:38 am | Permalink

    Thanks.. aside from semi-random formatting - if I wanted a word or two to be bold in the pull-quote but not in the text, I would have to use the alternate text option, is that right? I’m just learning css/html as I go.. it’s all kinda new to me.

  50. Posted March 7, 2007 at 4:25 pm | Permalink

    Actually I tried putting <em> tags and such in an “alternate text” comment, and got outwitted by WordPress’s encoding functions in the editor. I have that listed as a bug to be fixed — and since this plugin doesn’t have many known bugs, it’s pretty high on the list. ;)

    Until then you can format the pull-quote using spans as I did in my comment just above. That is, put a span (for example) within the text to be quoted, and then apply CSS to that tag within div.blockquote. See my comment just above.

  51. Jürgen
    Posted March 17, 2007 at 5:06 pm | Permalink

    Great Post. Very helpfull information. Thanks, guys. Jürgen from Germany :-)

  52. Posted March 20, 2007 at 12:04 am | Permalink

    New update, version 1.5

    This is a big’un, folks. I’ve implemented Styles, similar to WordPress themes. Just go into the options screen and pick a style.

    Also like WordPress themes, this is wide open to custom styles, so submit a Style today and I’ll put them up for everyone to see! :)

    IMPORTANT UPGRADE NOTE: If you are upgrading from a previous version of the plugin, go into your Options panel and change the setting called “CSS class selector for alt-side pull-quote”. The previous default read:

    pullquote pqAlt

    Change it to:

    pullquote pqRight

  53. Posted March 23, 2007 at 3:26 pm | Permalink

    Hey Stephen, a great plugin for Wordpress, and after three months, I need a little help. Running 1.3, the plugin worked perfectly. Today I upgraded to 1.5 and now, not so good. When I insert a pullquote, The pullquote shows up at the top of the page and is as wide at the container. I made the change to the CSS class selector as indicated above, but that didn’t change anything.

    First, do you have any idea what might cause this, and second, if not, can you email me version 1.3 so I can delete and go back. Foolishly, I didn’t make a backup of the original file before the upgrade. Oh, in case. WP 2.1.2, Firefox 2.0.0.3, Windows XP Service Pack 2. Thanks again for a great plugin and for any help you might give.

  54. Posted March 24, 2007 at 10:51 pm | Permalink

    Larry –

    I think I have v1.3 on my other computer… I’ll upload it for you later.

    In the meantime, can you give me a link? I’d like to try and figure out what’s going wrong. You might put a pull-quote in to an old post somewhere and give me a link to that (so few to no people will see the odd pull-quote in the old post….)

    Off the cuff the width problem sounds as though the plugin is not finding the CSS file correctly, which would suggest a bug in the new “pick a style” code. I’m not sure what would cause it to show up in a different location, though.

    Also… odd as it sounds, you might simply try hitting “reload” a few times on your browser, or better yet clearing your cache.

  55. Posted March 25, 2007 at 2:42 pm | Permalink

    Stephen,

    I added pullquotes to several old posts and it worked perfectly, just as always. I thought maybe the issue only showed up on non-published articles, so I tried that, and they showed up perfectly. I don’t have any idea why it didn’t work Friday right after the upgrade, but it seems to work properly now. Thanks for the magic fix. I appreciate it.

    I have discovered another problem though. I installed it on another site I have that is also running AdSense. I am running the Adsense-Deluxe plugin and with it activated, the pullquote button does not show up in the write area. I am not using the visual editor. I deactivate Adsense-Deluxe and it shows up, re-activate, and it disappears. This may be a flaw in the other plugin, but I wanted you to know about a possible issue.

    Thanks again for your response and help.

  56. Posted March 25, 2007 at 10:21 pm | Permalink

    “I don’t have any idea why it didn’t work Friday right after the upgrade, but it seems to work properly now.”

    As suggested at the end of my previous comment, your browser was probably caching a CSS file or something. Viewing it again later reloaded the file and you got the newer one.

    Regarding the Adsense plugin:

    It appears that this is a known problem with that plugin. I use a very popular bit of JavaScript called “Buttonsnap” to add the button to the editor, and Adsense conflicts with Buttonsnap. Thus that plugin apparently causes the same problem with a good number of other plugins that add buttons to the editor.

    Reportedly the WordPress folks are adding native button hooks into WordPress in version 2.2, so I expect to do some work on the buttons when that is released.

    Until then here are a couple potential fixes:

    http://blog.hwa2u.com/...

    http://www.maxpower.ca/...

  57. Posted March 29, 2007 at 5:06 pm | Permalink

    New version 1.5.1 is up!

    WordPress Theme designers can now embed a custom pull-quote style within a theme. I’ve also laid the groundwork for translations of the Options panel; plus there are some cosmetic changes and minor bug fixes.

  58. Posted April 7, 2007 at 10:45 am | Permalink

    New update: 1.5.2

    I’ve added a preview button so you can see what different styles look like without having to activate them first. This should make it easier to develop new styles, as well as encourage people to experiment a bit in using them.

    Enjoy! :)

  59. Anwalt Strafrecht München
    Posted May 6, 2007 at 6:18 pm | Permalink

    …..aside from semi-random formatting - Thnaks a lot.

    Very nice that you sendet me a reply.

    Peter from Germany

  60. Posted May 10, 2007 at 11:12 pm | Permalink

    New update: v1.5.3

    A few fixes and optimizations in this one. The biggest change is that styles can be contained in folders now, which allows for styles that include other files, such as images.

  61. Posted May 13, 2007 at 10:13 pm | Permalink

    I really love this but I wonder how to include formatting like a break “ or html or anything like that.

  62. Posted May 14, 2007 at 11:13 am | Permalink

    Jane –

    I haven’t worked that one out yet. I thought you might be able to do an “alternate text” quote with tags and such, but it seems the WordPress post editor “helpfully” mucks around with it. I’ll have to experiment with HTML encoding and try to find a combination that doesn’t break.

    This is on my “bug” list. It goes hand-in-hand with fixing extended characters such as “é” in alt-text quotes. Now that

    The short version is I need to figure out how to tell the post editor to leave comment contents alone.

  63. Posted June 16, 2007 at 12:48 pm | Permalink

    Version 1.5.4 is out. The biggest change here is that it’s all ready for translation. If you’re bilingual and would like to help with translations, please fill out the .pot file that is included with the download, and send it back to me.

    Get my email address here.

    There was also a bit of reorganization and some minor code cleanup, but no major functional differences.

    Enjoy!

  64. Posted June 21, 2007 at 7:35 am | Permalink

    Yo Stephen, an excellent bit of work, great Plugin… just installed yesterday, had it up and running in a matter of minutes…
    A great addition to standard block quotes in WP and your “admin” page makes things so much easier for novices like me whjo know nothing of “coding”. Thx…
    PS: Working well on Wp 2.2, thus far…

  65. Posted September 11, 2007 at 4:34 pm | Permalink

    The link to this plugin is broken.

  66. Posted September 11, 2007 at 10:28 pm | Permalink

    So it is, Zachary. It’s fixed now.

    This site is undergoing significant behind-the-scens changes, and there have been a hiccough or two — including broken links. Sorry about that!

  67. Posted September 12, 2007 at 9:07 am | Permalink

    Thanks!

  68. Posted November 6, 2007 at 6:13 pm | Permalink

    First of all, great plugin. A try a couple before, but I found this is the best :)
    Now, can I make a suggestion? It will be nice to be able to choose not to use any css. I think some people (like me) will prefer to use just one css in their site, so they will copy and paste de css code of the pullquote in their main css file, to not have to use another css file.
    That’s what I will do, but I will have to hack to plugin to do it. Let me know what you think…
    Thanks!

  69. Posted November 7, 2007 at 12:04 pm | Permalink

    Tanguillo –

    That’s a good idea. Shouldn’t be too hard to to add as an advanced option. It had occurred to me in the past, but I just never got around to it.

    I’ll see about adding it in the next version! :)

  70. Posted November 9, 2007 at 8:49 am | Permalink

    Thanks! Just make sure to let know users that have to copy the code of two css files. It take me a while discover it :P
    See you in next version!

  71. Posted November 26, 2007 at 6:08 pm | Permalink

    1.6.6 is up. Primary difference is that, by user request, you can now turn off the CSS in options. This is useful if you want to reduce HTTP requests by putting the CSS directly into your theme’s stylesheet.

  72. David
    Posted November 27, 2007 at 5:05 pm | Permalink

    I really do like having this plugin available, and what it does is a "handy" addition to my editing/presentation tools on my website/blog. I was wanting to know if you will be continuing to support/maintain it? and whether it is still compatible with Wp v2.3 –>> ongoing?
    It seems to me that it is one of the very few of its kind, that does what it is designed to do, and does it well.
    Thx for the plugin.

  73. Posted November 27, 2007 at 5:47 pm | Permalink

    David –

    Considering I just updated it yesterday, I would have to say yes, it’s still supported. :)

  74. Posted December 14, 2007 at 8:30 pm | Permalink

    Wow, nice! I will try the new version!
    Thanks!

  75. zack
    Posted January 15, 2008 at 2:16 am | Permalink

    Great plugin!

    Wondering if you know of the best way to assign a header class to the pullquote text itself. I’m trying to add sifr to the pullquote… any ideas?

    Many thanks!!!

    [edited to add link -- ed.]

  76. Posted January 15, 2008 at 10:28 am | Permalink

    Zack –

    Go to the Pull-Quotes options page — it’s in the admin section under the Presentation tab. At the bottom there are settings for “CSS class selector”. You can give the pull quotes any class you wish.

    Note that if you change the defaults, you will have to change the CSS files as well — both the once you select, and the “core” CSS file.

  77. zack
    Posted February 28, 2008 at 1:17 am | Permalink

    Been a while since that last comment, but thanks very much, Strider. It gets a little more complicated than that, but I finally figured it out. For anyone interested in using sIFR, you basically need to call the sIFR function at the end of the jspullquotes.js load function. So, that bit of code would end up looking something like this (relative to your own sIFR):


    function pullQuoteOpts(arrOptions) {
    pullquote.addEvent(window, 'load', function(){
    pullquote.init(arrOptions);
    sIFR.replace(century_gothic, {
    selector: 'div.pullquote p'
    ,css: { ** YOUR sIFR CSS HERE ** },
    }
    });
    });
    }

    Again, many thanks Strider. Great plugin. If interested, I’ll be happy to supply a live url when the site launches. Cheers –

  78. Posted February 28, 2008 at 2:30 pm | Permalink

    D'OH!Long story short — The “donate” links on this page were messed up, and short of a couple donations on Feb 27, 2008, I have never received, nor even known about, any of the money people may have donated to this site previous to that date.

    (PayPal says all donations were returned to the payors.)

    Long story long — You can read the details here.

  79. Zack
    Posted February 28, 2008 at 6:04 pm | Permalink

    Argh! Due dilligence: there’s a comma at the end of that code I just posted that will break this in IE. The correct code:

    function pullQuoteOpts(arrOptions) {
    pullquote.addEvent(window, 'load', function(){pullquote.init(arrOptions);
    sIFR.replace( ** your sIFR style here ** }
    }
    });
    });
    }

    Ah, 4am javascripting! Anyway, again, cheers –

  80. Posted March 10, 2008 at 10:48 pm | Permalink

    yes, this plugin i was also looking for. I installed and find it works. But, all users can’t login after installation. When disabled, all go fine. Any comments?

  81. Posted March 11, 2008 at 8:20 am | Permalink

    Zahidayat — This plugin doesn’t do anything that I can imagine would block users from logging in. What other plugins are you running? What version of WordPress?

    Disable all plugins and see if you still have the problem. Then re-enable just JS Pull-Quotes and see if the problem comes back.

  82. Posted March 12, 2008 at 11:46 am | Permalink

    Hi.

    I have upgraded from 1.5.2 to the actual one, and I get this error message :

    “Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/autonoma/koztoujours/wp-content/plugins/jspullquotes/jspullquotes.php:1) in /home/autonoma/koztoujours/wp-content/themes/serene-10/index.php on line 1″

    Moreover it made strange things (addind bullet points) in comment.

    I deactivated the plugin and it came back to the normal situation… but without pullquotes. Do you have any idea ?

  83. Posted March 12, 2008 at 2:05 pm | Permalink

    Koz –

    The first thing I would check is that it’s not some conflict with another plugin you’re using. What plugins are you using? try turning them off and see if the problem is tstill there with this plugin.

    The second thing to check is that there’s no problem with your theme. Activate the plugin, and change to the default theme, and see if the problem is there with the default theme.

    If you need to downgrade, you can still download version 1.5.2. (But let’s get you running on the new version — esp. with the French translation! :) )

  84. Posted March 12, 2008 at 2:08 pm | Permalink

    Koz –

    Actually, before you try any of that, delete the pull-quotes plugin, re-download it from this page, and try it again. The files may have gotten corrupted.

  85. Posted March 13, 2008 at 3:54 am | Permalink

    Argh, you’re right : it seems that there is a conflict with my theme. Thank you for the 1.5.2 version. I think I will use this one, except if I find a workaround. And, maybe, with 2.5 coming up, change my theme.

  86. Posted March 27, 2008 at 9:15 am | Permalink

    Thanks for a nice plugin. However, I have made some small modifications to make it work with some of my Wp projects. The idea is great!

  87. Posted April 2, 2008 at 8:54 am | Permalink

    Just wanted to say your demo actually made me laugh out loud. Good work, those are the best pull-quotes i’ve ever read.

  88. Posted April 2, 2008 at 9:11 am | Permalink

    Jeremy — truly you must have a dry wit.

    Glad to be of service. ;)