miniBB ® 


Support Forums
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  

can I change the .html template files to .shtml

Author stik
#1 | Posted: 12 Apr 2004 04:57 
I need some help bad! I've read the manual and read previous post on including your own php into the main_header.html, but for some reason things are working out for me. I have another php script that places a random banner (image) on the clients website. I want the banner displayed in the main_header.html of the forum.

In the index.php I placed the following function:

function dobanner(){



And in the setup_options.php I placed:

$topbanner = dobanner();

Then in main_header.html where I want the image to appear which is just rapped around a <td></td>


This does place the banner as specified, but it ignores the location of where it should be, in a table and in a <td></td> of the main_header.html where I called it. In fact I don't even need it in the html file. It places the banner at the very top of the page above all the html code no matter what.

I've also tried placing the function above in bb_functions.php and then the result is "undefined function: dobanner() in setup_options.php".

This could all be resolved if I had the ability to change the .html templates to .shtml files. Is this not possible? I tried editing the index.php file to: ('./templates/'.$tplName.'.shtml') but it still must have an .html extention.

This is different from previous post because my php script calls an image.

Help Please!

Author Team
#2 | Posted: 13 Apr 2004 10:33 
Check the banner.php file. It should produce some content placed in variable, not "echo".

Author stik
#3 | Posted: 13 Apr 2004 11:03 
Ah Yes, I do see the problem with the banner.php. I hate to ask this, but I'm somewhat new to php. Just for simplicity, say banner.php is this:

function writeinfo() {

echo "hello there";


$letseeit = writeinfo();

I was hoping the function writeinfo() would be assigned to $letseeit and not display the echo until I called the $letseeit. I want my function to be assigned to a variable??

This is unrelated to the forum so I would greatly appreciate a response but don't expect one!

Author Team
#4 | Posted: 13 Apr 2004 11:14 
Yes, you need to associate the output of this function with a template variable, not echo.

Specific miniBB Support Forums / Specific /
 can I change the .html template files to .shtml
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.

Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.


miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.