SimplePortal
Support => English Support => Topic started by: FireDitto on April 13, 2014, 07:16:04 AM
-
Okay, please see here (http://katila.second-pass.net/index.php?page=spines) because I'm not sure how to explain it.
It is a PHP page, made up with the BIB code.
It worked fine as a BBC page, but I ran out of room for all the characters so had to split it into blocks... which caused it to explode in all directions.
Help would be appreciated.
Thank you!
-
Somewhere, you have set width for these blocks to 11292px
This is what is causing the problem. I took a quick peek at the page using Chrome's F12 tools, but have not found where you set the width for those blocks.
Do you know how this happened? What is BIB?
-
BIB = block in block.
I'm using the block-in-block code on a PHP page to draw in the blocks that hold the various pieces of information to display.
The only width set is in the BIB code, which is to call it to be '100%'
$rows = 4;
$block_ids = array(139,140,141,142);
$block_data = array();
foreach ($block_ids as $block)
{
$block_data[$block] = current(getBlockInfo(false, $block, false, false));
$block_data[$block]['style'] = sportal_parse_style('explode', $block_data[$block]['style'], true);
}
echo '
<table style="width: 100%;">
<tr>';
$counter = 0;
foreach ($block_data as $data)
{
if ($counter != 0 && $counter % $columns == 0)
{
echo '
</tr>
<tr>';
}
echo '
<td style="width: 100%; vertical-align: top;">
', template_block($data), '
</td>';
$counter++;
}
echo '
</tr>
</table>';
-
I cannot figure it out at all. Sorry.
Have you tested each of these blocks, individually, added to one of the pages on your site (rather than the one giving you problems at the moment)?
The trouble APPEARS to begin with the table .. width=100%.
Before that, there appears to be a block # 84 that closes OK.
But there are a TON of HTML validation errors on that page -- 229. Many of them seem to be related to simple HTML vs XHTML errors. I would imagine they are related to some kind of mod? Or did you make manual changes to your template files? For example <meta name="twitter:app:id:ipad" content="307880732"> should end in />. Eventually, the validator gets really confused and cannot seem to recognize when it is supposed to be in the middle of a script tag pair.
If I were creating a text-heavy page and hit the #-of-characters limit on the field where the page text is stored, instead of using blocks-in-blocks, I would probably try:global $boarddir;
$FileName=$boarddir . '/explanation.txt';
if ( $filearray=file($FileName) )
{
// foreach ($filearray as $value ) echo doUBBC ($value);
$fulltext = implode($filearray,'');
echo parse_bbc($fulltext);
}
else echo "Could not open file <b>$FileName</b>. <br /> \n";
Either that, or I would find out how to increase the maximum size of the field that stores custom page text values.
-
In your block code:
<table style="width: 100%;">
<table style="width: 100%; table-layout: fixed;">
-
Beautiful, thank you very much!
:D
-
You're welcome. ;)
-
Thanks, [SiNaN]. I never would have thought of that.
I thought the table width should have been limited by its container.
I'll know to look for that in the future.