Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Plugin support
  3. » smd_slimbox

#541 2008-07-07 03:56:15

Sheru
Member
From: Kathmandu, Nepal
Registered: 2007-05-09
Posts: 96

Re: smd_slimbox

Warm Greetings, Stef! I am again back to this thread. I am using smd_slimbox and I wish to display 4 thumbnail per row. I looked through some tutorials but could not figure it out. Could help me on this?

Thank you for your kind help.
Sheru

Last edited by Sheru (2008-07-07 04:09:24)

Offline

#542 2008-07-07 07:49:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_slimbox

Sheru wrote:

I wish to display 4 thumbnail per row.

You can do this with CSS. The general idea is to let the thumbnails “flow” across the page by floating the thumbs and then put the whole lot in a container with a fixed width.

Put a container div (with, e.g. class="thumb_container") around the entire call to smd_slimbox. Use something like wraptag="div" cellclass="thumb" in the plugin attributes to give each thumb its own container, then:

div .thumb {
  float:left;
  padding:5px;
}

.thumb_container {
  width:450px;
}

If all your images are 100px wide + 5 px each side for padding and you want 4 in a row, that gives:

4 × (100+ 5 + 5) = 440px

so a container with a width of 450px should house the correct number of thumbs.


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

#543 2008-07-07 12:49:15

Sheru
Member
From: Kathmandu, Nepal
Registered: 2007-05-09
Posts: 96

Re: smd_slimbox

Warm Greetings from Sheru!
Thank you for your great help and great explanation.

I have added following code.
bc.. <txp:smd_slimbox category=“annapurna” limit=“4” sort=“category, date asc” class=“thumb_container” wraptag=“div” cellclass=“thumb”/>

As I add above code, it displayed images but with the following error.
bc.. Tag error: <txp:smd_slimbox category=“annapurna” limit=“4” sort=“category, date asc” class=“thumb_container” wraptag=“div” cellclass=“thumb”/> -> Textpattern Notice: Unknown tag attribute: class on line 653

I added the CSS that you have suggested and error occurs as soon as it finds class=, wraptag= and cellclass= in above code.

Once again thank you for the kind help and prompt response. I have learnt many… with you.
Sheru

Last edited by Sheru (2008-07-07 12:53:01)

Offline

#544 2008-07-07 13:00:44

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: smd_slimbox

Sheru wrote:

As I add above code, it displayed images but with the following error…

Cause there is not class-attribute in the plugin as far I can see. Only XHTML-class attributes in smd_slimbox 0.31 are following:

thumbtextclass
prevclass
nextclass
navclass
cellclass
linkclass
imgclass

Last edited by Gocom (2008-07-07 13:01:10)

Offline

#545 2008-07-07 13:04:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_slimbox

Sheru

As Gocom said, there is no class attribute (stupid, huh?! My silly naming convention in practise…)

Instead of class="thumb_container" you need to wrap the smd_slimbox tag itself with your own div:

<div class="thumb_container">
<txp:smd_slimbox category="annapurna" limit="4" sort="category, date asc" wraptag="div" cellclass="thumb" /> 
</div>

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

#546 2008-07-08 07:25:41

Sheru
Member
From: Kathmandu, Nepal
Registered: 2007-05-09
Posts: 96

Re: smd_slimbox

Warm Greetings Stef! Thank you so much for your prompt response and for your kind help too. That worked perfectly except Prev link. Prev link went top right beside the image instead of on the bottom left.

Thank you a lot for your time. Hope to be in touch with you.
Sheru

Offline

#547 2008-07-08 07:39:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_slimbox

Sheru wrote:

Prev link went top right beside the image instead of on the bottom left.

Yes, it probably will because everything before it is floated. You’ll need to add a CSS rule to the div that contains your next/prev. Something like clear:both; should do the trick. With luck.


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

#548 2008-07-09 05:36:58

Sheru
Member
From: Kathmandu, Nepal
Registered: 2007-05-09
Posts: 96

Re: smd_slimbox

Warm Greetings Stef! Thank you so much for your generous help. This means great to me. What you have suggested worked perfectly. I would llike to say You rock. I have added clear:both; on

.smd_slimbox_prev {
	float:left;
        clear:both; // Added this as per your suggestion. This helped Prev link to be right location.
}

Once again thank you so much for kind help. I am learning many things with you.
Sheru

Offline

#549 2008-07-09 11:45:59

Sheru
Member
From: Kathmandu, Nepal
Registered: 2007-05-09
Posts: 96

Re: smd_slimbox

Warm Greetings Stef, You have created wonderful plugins for us(Texpattern communilty). All of them seems awesome so far I have used and I know. I have used so far smd_slimbox, smd_query, and smd_random_banner. They are all wonderful. Thanks for all those plugins.

Thank you once again
Sheru

Offline

#550 2008-07-11 06:34:44

Sheru
Member
From: Kathmandu, Nepal
Registered: 2007-05-09
Posts: 96

Re: smd_slimbox

Warm Greetings Stef! On IE 6(forgot to test before), just now came to notice that background shadow of picture cut off. When clicked on thumbnail displays the image correctly but black transparent showdow displays from left side and stops around middle of the screen. But displaying perfectly on Firefox, IE 7, Camino. I don’t know cause. Could you please look site on IE 6 Site.

Thank you for your kind help
Sheru

Last edited by Sheru (2008-07-11 06:39:51)

Offline

#551 2008-07-27 12:22:17

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

Re: smd_slimbox

Sheru wrote:

black transparent showdow displays from left side and stops around middle of the screen.

I don’t know the specific cause in this case but it’s more than likely a CSS issue. A few people have experienced this before (user joel is one, I think) so if you try searching this thread, you might find the answer. Sorry I can’t help more right now.


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

#552 2008-08-11 10:23:39

Sheru
Member
From: Kathmandu, Nepal
Registered: 2007-05-09
Posts: 96

Re: smd_slimbox

Warm Greetings Stef, After a couple of weeks illness, back to the forum. Thank you a lot for your response. I have not tried to find answer searching in thread but will try to do.

Thank you for your kind help.
Sheru

Offline

  1. Index
  2. » Plugin support
  3. » smd_slimbox

Board footer

Powered by FluxBB