OK... This turned out to be a post, probably near reaching the database's max character possible
[spoil:39k8bknt]In most cases, for most of the .tpl files with _body in it, you've got a good chance that you can find the same-named file (without _body) in the root, being a .php file. (for basic phpBB core files at least)
A lot of the add-ons/mods in IntegraMOD, actually use their own little folder or even a dedicated folder structure. Anyhow...
The base .php file of a page, are the files that decide what data/information/variable/(etc) needs to be available for that particular page on the site to display, or if certain conditions are not met, do other stuff, like deny access and redirect to login page (for example).
Aside from a php-file's own definitions and variable it sets for conditions to follow, a .php file generally "requires" other files (.php) to call for other "global" data/functions in order to complete it's line of code by (sort of) "consulting" these files (each with their own, specific tasks and routines) to run queries and/or specific conditions, generating a result that will decide under what/which conditions the page should continue to load. These "consulting jobs" would be functions like verifying/retrieving user's session-key and the permissions that go along with this user etc, or values (called from database) to determine the language used to display on the page etc. Based on those functions' result the initial php file can determine how to proceed (for example; using the "retrieved & validated" session-key and the user's permissions, to determine if the user should be able to have moderator functions available when viewing a post, or what the user's choice of avatar is) and return this information for the .php to go through it's remaining set of functions, every time determining the next step based on previous result... applying the values applicable to the condition(s) the user is in at that point in time.
A lot (pretty much "most") of the output is either generated (within/by the result of such routines) using language-keys, rather then plain .php echos, or (of course) database values where required. These "values" are then simply called for in the appropriate area's of the page's layout/design templates assigned to the output, also here being aside by the php as a result of the conditions it has passed through. With the help of the .tpl files data is made visible graphically, or (where input is in order) the entered value will then be run against the previously processed routine and it's conditions to determine a change in the conditions, possibly resulting in the php-file taking an altered cause of action.
All the templates (no matter what theme) will have different html-code to alter layout, images and backgrounds used to display the requested page in all kinds of styles and shapes (made flexible through the use of JavaScript and CSS, but they all (or at least "should") call for or submit for the same values to/from the php-files.
Important Note on the side:
In a majority of cases with IntegraMOD, things work a little different from the above (if correct), as a great part of the functions/content/etc has been made truly dynamic, by having values/conditions/etc stored in the database to be run through a different set of rules with the values editable in the ACP, allowing expanding of the site's functionalities/features without needing to edit files for it.
One of those very obvious MODs is the PCP (Profile Control Panel), allowing for user-profile data, fields, looks, registration requirements and many other things, to be edited/expanded via the ACP, without requiring the Admin to use FTP access to modify files manually and create new database tables manually etc.[/spoil:39k8bknt]
And to finally comment on the how(s) and what(s) of the "viewtopic_body.tpl", like your
{postrow.MESSAGE} area, get to be what you see?!
When the page is loaded (which is "/viewtopic.php" in the root) like mentioned above, the php file starts to define what other files it requires and/or needs to load in addition to it's own task for the page to display the way it does! One of those files being "included" into the process, is for example "/includes/bbcode.php", which in this case will make sure that the appropriate JavaScripts are run to replace the written bbcode stored in the database along with the rest of the post, to generate the visually altered version of the content.
Before it does the visual conversion of the text though, the php-file (aside from other external files also required) must now still also run through all of it's own conditions and verifications to determine the final outcome. (also here again, it will call upon verification of access-level etc.
Due to the complexity and extensiveness of MODs integrated into IntegraMOD, you will find that there is hardly any "base-file" that doesn't call for ton's of additional mods' values, in order to display more / add functionality or prevent certain things from happening.
Should you know (in this situation) want to know more about what/how the bbcodes work, you will have to follow the route to the next file required for it (opening "/includes/bbcode.php")... in which you will find out more about the conditions under which it will apply bbcode and how it handles the actual post-text when running it through the java-.script... just to be returned as another variable.
I do NOT recommend changing the bbcode.php file or the JavaScript though if you only want to prevent certain bbcodes from being used. An easier way would be removing (or better: commenting out) the functionality you don't need from "/templates/[your theme]/bbcode.tpl". This way the bbcode-mod stays in tact and no harm is done to the functionality of the code. It's just an example anyhow. But ok!
I've got no clue in how far I've explained things correctly and understandable, give the little knowledge I have... but no matter how much fun it was typing this Novel, spending 2 hours trying to put in words I'm not officially qualified to make statement about, I must now take a shower and get some work done!
I've got plans for a MAJOR MOD (and a couple of small ones)... That I haven't seen anywhere yet (not even in a different form of what I've got in mind) and so I need to figure out all the details (how it's functionality should be working and the features that must be available) and start planning how to get started... But much more importantly: "Try to find out what I need teach myself first, before I should even consider starting on the project!"
OMG... I've cut it down a bit! If you're interested in reading all the confusing/unprofessional terminology-abuse (which I suspect I did)... just "spoil" the message.
I'm off!