Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-10-30 01:04:32
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 9,992
- Website
smd_pullquote: Magazine-style quotes from article text
For those who like magazine-style pullquotes, this could be right up your street. Features:
- No need to handle two separate bits of text for quotes: using HTML markup you tell the plugin which bits of your article body are to be displayed and styled separately
- Words from the full body text can be cut from the quotes to make them shorter; omitted words are replaced with characters of your choice
- Display one or more quotes randomly from a page, optionally removing the originals
- Position the quotes anywhere you like via CSS, or use rudimentary maths to keep the quote near to its source on the page
- MLP-aware
It uses jQuery to do its magic so you’re better off with v4.0.5 or later of textpattern. Even so, it might be an idea to get the latest version of jquery because it’s not been tested on anything below v1.2.1. Let me know if it works on earlier versions.
It also requires smd_lib.
Have a play with it and see how you get on. Send any enhancement requests, naughty bugs, features or general comments here and I’ll see if I can make it more useful as time goes on.
Revision history
————————
- 30 Oct 07 | 0.1 | Initial release
- 02 Nov 07 | 0.1a | Removed bogus leading slash on <script> tag. Thanks sgoodwin
Last edited by Bloke (2009-04-11 21:15:15)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#2 2007-10-30 09:55:18
- sthmtc
- Member
- From: CGN, GER
- Registered: 2005-01-17
- Posts: 586
- Website
Re: smd_pullquote: Magazine-style quotes from article text
sounds great! bookmarking it for future reference.
Offline
#3 2007-10-30 10:04:47
- colak
- Admin
- From: Cyprus
- Registered: 2004-11-20
- Posts: 8,463
- Website
Re: smd_pullquote: Magazine-style quotes from article text
Bloke wrote
it might be an idea to get the latest version of jquery…
… which unfortunately crashes safari 1.3.x for OSX.3.x
Last edited by colak (2007-10-30 10:05:10)
Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.
Offline
#4 2007-10-30 10:10:19
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 9,992
- Website
Re: smd_pullquote: Magazine-style quotes from article text
colak wrote:
the latest version of jquery… unfortunately crashes safari 1.3.x for OSX.3.x
Boooo :-( Well you might get away with an earlier version. I don’t think I’m using anything bleeding edge from the library. Try whichever version you have that’s stable on OSX and let me know how it fares. If the plugin breaks I could always see if I can find a way round it using an older syntax.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#5 2007-10-31 14:43:11
- mrdale
- Member
- From: Walla Walla
- Registered: 2004-11-19
- Posts: 2,212
- Website
Re: smd_pullquote: Magazine-style quotes from article text
great job, thanks again Stef.
Offline
#6 2007-11-02 14:57:29
- sgoodwin
- Member
- From: Boston, MA
- Registered: 2006-05-11
- Posts: 13
Re: smd_pullquote: Magazine-style quotes from article text
I had to edit line 40 of the plugin to get it to work for me… I removed an extra slash before “text” on the script type attribute:
BEFORE: $ret .= '<script type="/text/javascript" src="'.$jquery.'"></script>';
AFTER: $ret .= '<script type="text/javascript" src="'.$jquery.'"></script>';
and now it works just great!!! Thank you Stef!
Offline
#7 2007-11-02 15:08:57
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 9,992
- Website
Re: smd_pullquote: Magazine-style quotes from article text
sgoodwin wrote:
I removed an extra slash before “text” on the script type attribute
Ooops, well spotted. Code updated to v0.1a. Can’t have bugs in it now can we!
Thanks.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#8 2008-01-07 23:31:06
- the_ghost
- Plugin Author
- From: Minsk, The Republic of Belarus
- Registered: 2007-07-26
- Posts: 907
- Website
Re: smd_pullquote: Magazine-style quotes from article text
Can i see the demo work of this plugin? :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#9 2008-01-07 23:37:22
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 9,992
- Website
Re: smd_pullquote: Magazine-style quotes from article text
The pullquotes on the left are randomly generated from predefined bits of content within the “screen” (refresh the page to see more)
EDIT: look at the source code and search for class="pq"
to see the way the quotes are defined.
Last edited by Bloke (2008-01-07 23:39:42)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#10 2009-08-18 11:13:02
- candyman
- Member
- From: Italy
- Registered: 2006-08-08
- Posts: 684
Re: smd_pullquote: Magazine-style quotes from article text
Is there the possibility to use a custom field to tell the plugin which text should pulled out of the post into its own element so that I can style it as quotation?
I’ve read the docs but I haven’t understood how can I easily choose the text for quotations from the article body in the TXP write page.
Thanks for your help.
Last edited by candyman (2009-08-18 11:48:40)
Offline