SMF Support > SMF 2.0.x Support

SSI and Content Section

(1/2) > >>

Colin:
I am using SSI to write a script and using the template_header() and template_footer(), but the content section background does not seem to expend with the text even when enclosed in
--- Code: ---<div id="content_section"><div class="frame">
<div id="main_content_section">
--- End code ---

Is there a certain class/id parameter I am just missing?

Colin:
Bump -- yes I know a few hours short of 24, but would like to finish the project relatively soon. Any help is appreciated.

Oldiesmann:
Can you post the code that you're using and/or link to a sample page?

Colin:
I took a screenshot for you to give you an idea of what it looks like.

I can post a tad bit of the code that would be relevant to this.


--- Code: ---require_once('/fakepath/SSI.php');
template_header();
//Are we an admin?
if (!$context['user']['is_admin']) {
//Yikes doesn't look like it.
die ("You must be logged in as an administrator");
}
echo '<div id="main_content_section">
<div class="main_section">';


//Content inside here.


echo "</div></div>";

template_footer();


--- End code ---

JBlaze:
Try this instead. Makes life a little easier.


--- Code: ---<?php
require('/path/to/SSI.php');

// Your page title
$context['page_title'] = 'Page Title';

// Your linktree. Add more instances for more links.
$context['linktree'][] = array(
    'url' => $scripturl . '?action=something',
    'name' => 'Board Index'
);

// Flush to buffer
obExit(true);

// Main template function
function template_main() {
    // Your template code and HTML will go here...
}

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version