1

Topic: OverallHeader.tpl

When i was using phpbb i remember editing overallheader.tpl and overallfooter.tpl to pop the forum into my template.  I was wondering if there is any type of similar file or method for editing the theme of this board.

If somebody could point me in the direction of information on this that would also rock.

Thanks big_smile

Re: OverallHeader.tpl

Have a look in include/template/

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: OverallHeader.tpl

lol. smile i seem to have totally missed that.  its just what Im looking for.  Is there any type of bigger readme to the board or should i just wing it?

also i remember back in the my phpbb boards i had one heck of a time trying to get php code into the template.  is there a topic started on this yet?

Re: OverallHeader.tpl

Whoops, I seem to have missed this one. Actually, PunBB does not support putting PHP code in the templates. If you want that you'll have to look at the source code for that specific "place" and put your PHP code there. What is it you want to do? Perhaps I can give you some tips.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: OverallHeader.tpl

Darth AND Kennel -

The PunBB equivelant of  phpBB's overall_header.tpl and overall_footer would be header.php and footer.php

Darth,

phpBB uses a system to call these files from .tpl which stands for template. All though punBB makes it much more simple and puts html in php files.

simply by putting stuff like this

<?php

print <html>
print <head>

and so on for your webpage

?>

If you do need help editing the php file for editing things, the please let us know. smile

- kriptonic

Re: OverallHeader.tpl

Kriptonic wrote:

Darth AND Kennel -

The PunBB equivelant of  phpBB's overall_header.tpl and overall_footer would be header.php and footer.php

Darth,

phpBB uses a system to call these files from .tpl which stands for template. All though punBB makes it much more simple and puts html in php files.

simply by putting stuff like this

<?php

print <html>
print <head>

and so on for your webpage

?>

If you do need help editing the php file for editing things, the please let us know. smile

Well, I think Kennel knows what he is doing/saying, he is after all the guy who created and wrote PunBB wink

//Jocke

Re: OverallHeader.tpl

Nidhogg,

I am sure that Kennel will tell you I'm write too... If you want to edit the  header ( the same thing as overall_header) you will edit the header.php all HTML is kepy in there within the php code, written with either an echo or print. wink

I just stated this claim, because it is possible that Kennel has never used phpBB. wink

- kriptonic

Re: OverallHeader.tpl

Well, actually not. The closest thing to overall_header.tpl and overall_footer.tpl would be main.tpl. The following is what happens when a page is displayed in PunBB:

1. header.php is executed. In this script the main.tpl template is loaded into memory. The replacement variables pun_content_direction, pun_char_encoding, pun_head, pun_body, pun_title, pun_desc, pun_navlinks and pun_status are replaced with real content.

2. Next, the script that we are actually calling is executed (i.e. viewtopic.php). This script replaces pun_main in the main template with real content.

3. Finally, footer.php is executed. This script replaces pun_footer with real content. At the end of footer.php the contents of the main template (that we have been "filling out" with content in all three scripts) is outputted.

Thus, if you wanted to add a logo to your forum pages, you would just edit main.tpl and put the HTML code for the image somewhere. If you, however, wanted to run some of your own PHP code, you would have to hack header.php, footer.php or any other script that the code would be suited for.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: OverallHeader.tpl

.. well you got me there. lol.. I am glad I know this now. I was adding the php code print to make banners work, and well it did work it's just not the proper way lol

- kriptonic

Re: OverallHeader.tpl

A good way to add stuff like banner code is to add your own replacement variable (like pun_title, pun_navlinks etc.) to the template files and then just add code to header.php (or whatever scripts suits you best) to replace that string with the banner stuff. Just take a look at header.php to see how it's done. That way you can easily move the banners and stuff around without messing with the source code.

"Programming is like sex: one mistake and you have to support it for the rest of your life."