15 years on The Web
miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
How To miniBB Support Forums / How To /   

main_header.html to main_header.shtml

Page  Page 1 of 2:  1  2  Next »  
Author michael1234
#1 | Posted: 18 Aug 2006 03:47 
If I simply wanted to rename my main_header.html and main_footer.html file to main_header.shtml and main_footer.shtml to include a SSI include tag, where would I change this in the scripts?

I am not wishing to change anything over to PHP, so I couldn't find the answer to my question.

I saw several posting pertaining to PHP, but I didn't find anything suggesting this change.

I did try to change:


and it didn't work. Numerous error messages when doing that.


Author Paul
Lead Developer
#2 | Posted: 18 Aug 2006 07:28 


(it should contain full relative or absolute path to the files).

In general, I don't know why you need to use old-fashioned buggy SSI include, if include is already available in PHP. Better rename these files to .php.

One more thing: variables like {$title} etc. inside default templates will not work, when included directly. You need to rewrite all them in PHP styling code, like:

or <$php echo $GLOBALS['title']; ?>

and so on for all vars.

Author michael1234
#3 | Posted: 18 Aug 2006 12:44 
Thank you for your quick response Paul.


1. Any template that contains a {tag} needs to be renamed to <$php echo $GLOBALS['tag']; ?> if I go with the .php extension?
(By the way, thanks for the suggestion)

2. Do all of the files in the template folder need to be renamed to .php and any variables like {tag} need to be replaced, or simply rename those files to .php IF they contain a tag?

Author Paul
Lead Developer
#4 | Posted: 18 Aug 2006 12:46 
1. Not a template needs to be renamed, but every {$variable} should be replaced by , if you rename main_header.html to main_header.php and main_footer.html to main_footer.php and specify them as $includeHeader, $includeFooter.

2. Only variables in two mentioned templates should be replaced. Do not rename other files to .php or something else. They are system files, and miniBB won't work without them.

Author michael1234
#5 | Posted: 18 Aug 2006 12:57 
Thank you.

Author michael1234
#6 | Posted: 18 Aug 2006 13:03 | Edited by: michael1234 
This is what my page looks like after I:

modify the code in header.html
change the extension to .php, and then
change includeheader and includefooter

<$php echo $GLOBALS['l_sepr'];?><$php echo $GLOBALS['l_menu[0]'];?><$php echo $GLOBALS['l_menu[7]'];?><$php echo $GLOBALS['l_menu[3]'];?><$php echo $GLOBALS['l_menuReg'];?><$php echo $GLOBALS['l_menu[1]'];?><$php echo $GLOBALS['l_menu[5]'];?><$php echo $GLOBALS['l_menu[6]'];?><$php echo $GLOBALS['l_sepr'];?><$php echo $GLOBALS['pmView'];?>

<$php echo $GLOBALS['whosOnline'];?>

It writes exactly like it shows in the code, and the tables are not alligned.

When I use the <$php echo $GLOBALS , it shows all the code on the website.

When I use the
What else should I try? I have tried both ways.

This is a copy of the code I am using with main_header.php in the template section.

Only displays the separators.
Author michael1234
#7 | Posted: 18 Aug 2006 15:02 
Okay Paul,

I was able to fix everything else except for the code below.

 {$l_sepr}{$l_menu[0]}{$l_menu[7]}{$l_menu[3]}{$l_ menu[2]}{$l_menu[1]}{$l_menu[5]}{$l_menu[6]}{$l_sep r}  

Author Paul
Lead Developer
#8 | Posted: 18 Aug 2006 15:32 
You need to rename .html to .php first and set up these files as I've described. Don't forget to remove commenting slashes // before options... else they will not be enabled!

Author michael1234
#9 | Posted: 18 Aug 2006 15:46 
Exactly. I did everything as you described.
I am assuming the code I posted is correct.

That is why I am having a hard time understanding why this isn't working.

I am going to email you the URL.



Author michael1234
#10 | Posted: 18 Aug 2006 16:43 
Would the reason the other options do not display is because there are two brackets versus the one only with the separators?

<---- separators show on page... one bracket
<---- this does not show on the page... two brackets one right sfter globals and before and after 0

Author michael1234
#11 | Posted: 20 Aug 2006 21:19 
I have tried literrly everything, read manual twice, and still get the same results.

I hope someone can help.

Author Paul
Lead Developer
#12 | Posted: 22 Aug 2006 08:40 
My fault - haven't provided the code for global arrays :-)

Your syntax is wrong. You have:

[7]'];?> etc.

You should have:

[7];?> etc.

Author michael1234
#13 | Posted: 22 Aug 2006 13:11 
That still did not work.

Here's what it shows on the webpage after changing the code.

Nope, Still not resolved.

After changing the code, it produces this on the main page:

<$php echo $GLOBALS['l_sepr'];?> <$php echo $GLOBALS{'l_menu'][0]'};?> <$php
echo $GLOBALS['l_menu'][7];?> <$php echo $GLOBALS['l_menu'][3];?> <$php echo
$GLOBALS['l_menu'][2];?> <$php echo $GLOBALS['l_menu'][1];?> <$php echo
$GLOBALS['l_menu'][5];?> <$php echo $GLOBALS['l_menu'][6];?> <$php echo

Author michael1234
#14 | Posted: 22 Aug 2006 13:30 
Finally worked with this code.

phpecho code did not work.

Author Paul
Lead Developer
#15 | Posted: 22 Aug 2006 13:57 | Edited by: Paul 
I recommend you to learn some things from PHP manual.

instead of

because PHP5 configuration by default doesn't allow it. Anyway, if it works, that the problem is solved.

Page  Page 1 of 2:  1  2  Next » 
How To miniBB Support Forums / How To / main_header.html to main_header.shtml Top

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

 Short link for this topic:

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB