By: Scythe
Date: 2006-12-06
Time: 15:49
|
Sub-block Bug
Hi there,
I have a bug within the current version of TBS. Basically I have a subblock being created like so:
for($r = 0; $r < $gift_count; $r++) {
$gift_block[$r] = array("GiftID" => $gift_data[$r][0], "GiftName" => $gift_data[$r][1], "GiftCost" => $gift_data[$r][2], "GiftPriority" => $gift_data[$r][3], "GiftDate" => $gift_data[$r][4], "GiftNotes" => $gift_data[$r][5], "GiftNotesLen" => strlen($gift_data[$r][5]) );
for($n = 0; $n < $wishlist_urls_count; $n++) {
if($wishlist_urls[$n][0] == $gift_data[$r][0]) {
$gift_block[$r]['urls'][] = array('name' => $wishlist_urls[$n][1], 'url' => $wishlist_urls[$n][2]);
}
}
}
|
Now, the HTML side where the subblock is used:
<div class="wishnotes">
Online Sites:
<span>
<a class="wishurl" href="[urls.url;block=span;p1=[gifts.$]]">[urls.name;block=span]</a>[onshow;if '[urls.$]' -+ '[urls.#]'; then ', '; else ' ']
</span>
[onshow;if '[urls.#]' = '0'; then ''; else ' '; magnet=div]
</div>
|
The problem is that when the subblock is merged and read, it's no problem. However I want to remove the surrounding div container if there's no data in that subblock. It works, but appends a random "<" to the front of the list for whatever reason. It's the oddest thing I've ever seen. Removing the [onshow;if...] tag at the end of the list of HTML removes that magical bracket. Any ideas?
|
By: Skrol29
Date: 2006-12-06
Time: 19:17
|
Re: Sub-block Bug
Hi,
Yes, in subblock mode, the value of [urls.#] outside the block is not sure.
It can be the previous subblock or the next.
I suggest that you use parameter bmagnet. It is done for your problem.
[urls.url;block=span;p1=[gifts.$];bmagnet=div]
|