Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2007-09-06 22:51:52

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: aro_slideshow v2

Request

Could I beg you, kind sir aro, to put an attribute into the plugin that will allow us to specify an image ID to be a placeholder? Something like placeholder="25" that would put “/images/25.jpg” with all the appropriate attributes into the image tag in the slideshow div?

Don’t mean to be lazy. It’s just a lot of work and messy to use the other plugins.

Offline

#74 2007-09-06 23:49:39

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: aro_slideshow v2

mrdale wrote:

One image that displays first (in my case a slogan) that doesn’t appear in the loop.

What about if you just made sure your placeholder was the first image in the array of images returned – that might be hard if you are using some kind of random ordering – but then you could simply add myShow0.props.images.shift(); to the callback to get the effect you are after.


Travel Atlas * Org | Start Somewhere

Offline

#75 2007-09-07 21:37:19

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: aro_slideshow v2

>rloaderro

That’ll work, I can set the into image to always be the first, BUT

Could you give me a little detail about what myShow0.props.images.shift(); does?

And would this use the first image once and then continue cycling without it?

Thanks again….

Offline

#76 2007-09-07 21:43:26

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: aro_slideshow v2

mrdale wrote:

Could you give me a little detail about what myShow0.props.images.shift(); does? And would this use the first image once and then continue cycling without it?

Exactly. It just pops the first image off the images array. The first image is already set to the <img> tag in your HTML by the plugin – if Javascript were disabled that image would still appear, albeit static – however by popping it off the array it will never appear again when the slideshow loops.

Last edited by rloaderro (2007-09-07 21:44:24)


Travel Atlas * Org | Start Somewhere

Offline

#77 2007-09-07 21:47:37

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: aro_slideshow v2

Ahah! that’s much simpler. Thanks. so it would be…

<txp:aro_slideshow category="blah-blah" callback="myShow0.props.images.shift();" />

and you can combine callbacks as well right?

Offline

#78 2007-09-07 21:57:37

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: aro_slideshow v2

mrdale wrote:

and you can combine callbacks as well right?

Sure – it’s just Javascript. Just tack it onto the end of the previous one.


Travel Atlas * Org | Start Somewhere

Offline

#79 2007-09-11 22:16:41

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: aro_slideshow v2

Thanks Aeron

One more question. Could you help me hack your plugin to output <p class="image-name"> or <p class="%alt%"> for the caption? I spooped around and couldn’t see where that could be done.

Last edited by mrdale (2007-09-11 22:17:35)

Offline

#80 2007-09-11 22:32:34

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: aro_slideshow v2

mrdale wrote:

One more question. Could you help me hack your plugin to output <p class="image-name"> or <p class="%alt%"> for the caption? I spooped around and couldn’t see where that could be done.

I think that wouldn’t be so easy to do because the caption is inserted into the p element in the Javascript. What kind of functionality do you need exactly: do you need to be able to apply different classes depending on the image? or just one class per slideshow?


Travel Atlas * Org | Start Somewhere

Offline

#81 2007-09-11 22:36:50

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: aro_slideshow v2

different classes or id depending on the image.

How about replacing the p with a div, then I can put the p-tag in myself in the plugin call.

Last edited by mrdale (2007-09-11 22:37:28)

Offline

#82 2007-09-11 22:51:04

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: aro_slideshow v2

mrdale wrote:

How about replacing the p with a div, then I can put the p-tag in myself in the plugin call.

I think the probably with that would be conflicts with other DIVs already inside the slideshow element and the internal CSS of the javascript that would be hard to override (definitely planning to remove all styles from the JS for the next version). You might have better luck simply wrapping your captions with a span + class from within TXP: <span class='something'>My caption here!!</span> then you can define the styles however you like in your CSS. Do you think that would work?


Travel Atlas * Org | Start Somewhere

Offline

#83 2007-09-11 23:01:59

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: aro_slideshow v2

I was hoping to stay as semantic as possible, and still have two levels of styling hooks. But you’re right, I think I can manage it like this… inside the <p>

<span id='%alt%'><span><strong>%alt</strong> %caption%</span></span>

I suppose I could also call it manually. But that is a really complicated peice of code using three plugins…

Thanks for your help. It’s amazing what you can do with this script.

Last edited by mrdale (2007-09-11 23:04:45)

Offline

#84 2007-09-12 04:19:35

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: aro_slideshow v2

OK so it all works with this technique but there’s a time lag and you lose the nice transparency effects.

One last idea. how about a hack to replace the surrounding p with a span? then i could replace the internal classed span with a classed p.

Offline

Board footer

Powered by FluxBB