Topic: Questions regarding why choices were made in the development in PunBB.
Hi I have downloaded a copy of PunBB to study it so I understand one way to approach making a php forum.
I have been going through the source code and now have a partial understanding of how it works but I wondered if some things could be clarified by the developers?
I have been looking into how punBB handles page structure, mainly regarding tpl files and output buffering. I understand how this works but I do not have that much experience with it nor do I understand the benefits yet.
My understanding is that the site structure is stored in a .tpl file as a mix of regular and custom tags. The file is read into a variable (tpl_main) where it is searched, replaced and manipulated. For each tag substitution a output buffer is used so that the contents arent instantly displayed but can be later output.
Why did you decide to store the page in a tpl file and thus also why have you chosen to use tag substitution? I have noticed that phpBB also uses tpl files. Is this some kind of standard? On my first glance it seems to be overly complicated just to build a page (all the string substitutions, replacing and searching) just to see the page in another page as custom tags.
Also why at the end of the footer was a exit used to output tpl_main - rather than an echo or print? Is there a particular reason for this?
I hope my questions dont offend you I am really impressed to see a fully compliant xhtml forum, I am just really curious to know why you made certain decisions on the methods you have used.
Thanks again