Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2010-05-17 02:15:47

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 465
Website

Re: smd_style: present alternate stylesheets with a style switcher

Stef,

Love this plugin, but can’t seem to make it work…

I have this in the head:

<txp:smd_style sheets="hide,display" />
<txp:smd_styleswitch wraptag="" />

And this in the body:
<ul class="smd_switcher"></ul>

There is also a link to jquery (v1.3.2) in the head

But <ul class="smd_switcher"></ul> gives nothing. No list…

I am using PHP5 and Textpattern · 4.2.0.

Any ideas?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#17 2010-05-17 08:16:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,476
Website GitHub

Re: smd_style: present alternate stylesheets with a style switcher

Kjeld wrote:

Love this plugin, but can’t seem to make it work…

Ah, yeah. There’s a small issue with the plugin under jQuery 1.3+. Essentially I was a bit of a tool when I wrote it and used the deprecated ‘@’ syntax in my selectors.

Bottom line: you should be able to fix the plugin by searching for ‘@’ symbols in the code on lines that start with jQuery and removing them. There are only 2 lines you need to change (lines 182 and 222); there are only 4 symbols you need to remove in total.

That should get you going. Failing that, I do have a new version written that I could let you have which is a bit tidier and adds some neat features for class-level (CSS) switching. Last time I checked there was one tiny bug that has thus far prevented me from releasing it publicly but if you’re not using class switching it’ll work fine. Drop me an e-mail if you’d like the new version (btw, my e-mail address has changed, so please use the forum e-mail link or my site’s contact form).

Hope that helps.

Last edited by Bloke (2010-05-17 08:16:41)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#18 2010-05-18 08:26:06

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 465
Website

Re: smd_style: present alternate stylesheets with a style switcher

Thanks, Stef. Removing the ‘@’ symbols didn’t fix the problem, I am afraid. I will send you a message.

Last edited by Kjeld (2010-05-18 08:28:08)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#19 2010-10-19 15:10:53

lazyadmin
Member
From: Germany
Registered: 2009-08-08
Posts: 25
Website

Re: smd_style: present alternate stylesheets with a style switcher

Any news when the new version will be released?

Offline

Board footer

Powered by FluxBB