By: mgb
Date: 2007-11-23
Time: 11:49
|
Image gallery (serial) question
I want to make a page like this:
+-+-+-+-+-+-+
| | | | | | |
+-+-+-+-+-+-+
| | | | | | |
+-+-+-+-+-+-+
| | | |
+-| +-+
| | | |
+-+-+-+-+-+-+
| | | | | | |
+-+-+-+-+-+-+
| | | | | | |
+-+-+-+-+-+-+
|
The little squares are thumbs and the big square is an enlarged version which is loaded by a onClick event.
but I don't really know how to make tbs write this cells out.
I could use serial for the first to rows and the last two, but what about the two middle ones?
There is only on thumb on each side of the big version.
the number of thumbs might differ so sometimes its only the first 13 or 14 fields that has a thumb.
I could of course make a [image;...;noerr] for each field but I would like to know if there is a more elegant way around this?
|
By: mgb
Date: 2007-11-23
Time: 11:50
|
Re: Image gallery (serial) question
Any help is appreciated
Thanks in advance
|
By: Skrol29
Date: 2007-11-24
Time: 02:16
|
Re: Image gallery (serial) question
Hi,
You can do it with only one TBS section: "block=tr+tr+tr+tr+tr+tr"
The two TR in the middle will have collapsed cells, but TBS doesn't care.
Of couse you have to use parameter serial for this block. And it will have 29 subsections (cells).
|
By: mgb
Date: 2007-11-25
Time: 03:02
|
Re: Image gallery (serial) question
Hi Skrol29,
Thanks for your super quick help. I really appreciate the amount of work
you put into tbs.
I hope I understood you correct. I made a smaller version (21 cells)
Could you please comment on this.
<table>
<tr>
[img.src;block=tr+tr+tr+tr+tr+tr;serial]
<td><img src="[img_1.src;block=td]" /></td>
<td><img src="[img_2.src;block=td]" /></td>
<td><img src="[img_3.src;block=td]" /></td>
<td><img src="[img_4.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_5.src;block=td]" /></td>
<td><img src="[img_6.src;block=td]" /></td>
<td><img src="[img_7.src;block=td]" /></td>
<td><img src="[img_8.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_9.src;block=td]" /></td>
<td colspan="2" rowspan="2"><img src="[img.src_10;block=td]" /></td>
<td><img src="[img_11.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_12.src;block=td]" /></td>
<td><img src="[img_13.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_14.src;block=td]" /></td>
<td><img src="[img_15.src;block=td]" /></td>
<td><img src="[img_16.src;block=td]" /></td>
<td><img src="[img_17.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_18.src;block=td]" /></td>
<td><img src="[img_19.src;block=td]" /></td>
<td><img src="[img_20.src;block=td]" /></td>
<td><img src="[img_21.src;block=td]" /></td>
</tr>
</table>
|
the <td>'s will all be the same except the <td colspan="2" rowspan="2">.
They will be much more complex than in this example.
I was wondering if there would be a shorter way to write this, maybe
with some sort of a sub-block?
Again, Skrol29, thank you so much.
Also thanks to all others contributing to this forum. It has really
helped me reading through it.
|
By: Skrol29
Date: 2007-11-26
Time: 01:21
|
Re: Image gallery (serial) question
Hi Mgb,
That's exaclty what I had in mind.
I've not tested it, but it should work.
Lot of <td> are the same, but their locations are no the same.
It should be quite fast for TBS to process this block because a block it put in cache before to merge it.
You can try with subblock but it can be more complex.
|
By: mgb
Date: 2007-11-30
Time: 12:43
|
Re: Image gallery (serial) question
Hi All,
I finally got around to test this. Its a NOGO.
tbs stops at _9 and then start from the top.
Also it doesn't remove the ;serial block.
Any help to solve this riddle is much appreciated
heres the result:
<table>
<tr>
[img.src;block=tr+tr+tr+tr+tr+tr;serial]
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
</tr>
<tr>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
</tr>
<tr>
<td><img src="img.jpg" /></td>
<td colspan="2" rowspan="2"><img src="[img.src_10;block=td]" /></td>
<td><img src="[img_11.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_12.src;block=td]" /></td>
<td><img src="[img_13.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_14.src;block=td]" /></td>
<td><img src="[img_15.src;block=td]" /></td>
<td><img src="[img_16.src;block=td]" /></td>
<td><img src="[img_17.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_18.src;block=td]" /></td>
<td><img src="[img_19.src;block=td]" /></td>
<td><img src="[img_20.src;block=td]" /></td>
<td><img src="[img_21.src;block=td]" /></td>
</tr><tr>
[img.src;block=tr+tr+tr+tr+tr+tr;serial]
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
</tr>
<tr>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
</tr>
<tr>
<td><img src="img.jpg" /></td>
<td colspan="2" rowspan="2"><img src="[img.src_10;block=td]" /></td>
<td><img src="[img_11.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_12.src;block=td]" /></td>
<td><img src="[img_13.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_14.src;block=td]" /></td>
<td><img src="[img_15.src;block=td]" /></td>
<td><img src="[img_16.src;block=td]" /></td>
<td><img src="[img_17.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_18.src;block=td]" /></td>
<td><img src="[img_19.src;block=td]" /></td>
<td><img src="[img_20.src;block=td]" /></td>
<td><img src="[img_21.src;block=td]" /></td>
</tr><tr>
[img.src;block=tr+tr+tr+tr+tr+tr;serial]
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="img.jpg" /></td>
<td><img src="" /></td>
</tr>
<tr>
<td><img src="" /></td>
<td><img src="" /></td>
<td><img src="" /></td>
<td><img src="" /></td>
</tr>
<tr>
<td><img src="" /></td>
<td colspan="2" rowspan="2"><img src="[img.src_10;block=td]" /></td>
<td><img src="[img_11.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_12.src;block=td]" /></td>
<td><img src="[img_13.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_14.src;block=td]" /></td>
<td><img src="[img_15.src;block=td]" /></td>
<td><img src="[img_16.src;block=td]" /></td>
<td><img src="[img_17.src;block=td]" /></td>
</tr>
<tr>
<td><img src="[img_18.src;block=td]" /></td>
<td><img src="[img_19.src;block=td]" /></td>
<td><img src="[img_20.src;block=td]" /></td>
<td><img src="[img_21.src;block=td]" /></td>
</tr>
</table>
|
I merge with the following php
$imgs[] = array('src' => 'img');
//... 20 more times
$__tbs->MergeBlock('img',$imgs);
|
|
By: mgb
Date: 2007-11-30
Time: 12:49
|
Re: Image gallery (serial) question
AAAAAARRRRGGHHH code blindness strikes again
this:
<td colspan="2" rowspan="2"><img src="[img.src_10;block=td]" /></td>
should be this:
<td colspan="2" rowspan="2"><img src="[img_10.src;block=td]" /></td>
I get the stupidity price today
|
By: Skrol29
Date: 2007-11-30
Time: 14:53
|
Re: Image gallery (serial) question
:)
|
|
Posting in progress.
Please wait...
|