Thank you very much - that is the best info I have seen yet on what will be possible.
Some of my mods only change a few lines inside a large file, e.g. Smart Backgrounds adds a bit of code to tpl_main_page.php for setting a body classname (could be done with a notifier hook), but then uses a changed line for outputting the body div HTML with classname. If the original body div HTML then executed, it would obviously cause big problems. I will need to swap my new output line for the original one.
This code could be moved into an observer:
PHP Code:
<?php //Smart Backgrounds
$smart_image = '';
if ($current_page_base == 'index' or $current_page_base == 'product_info') { //add _ and cPath to bg filename only if individual cat bg image exists, else add _ and top cat id to bg filename only if top cat bg image exists
$smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $_GET[cPath] . '.gif')?'_' . $_GET[cPath]:(file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . (int)$_GET[cPath] . '.gif')?'_' . (int)$_GET[cPath]:'');
} elseif ($current_page_base == 'page') { //add _page and ez-page id to bg filename only if ez-page id bg image exists, else add _page to bg filename only if general ez-page bg image exists
$smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page' . $_GET[id] . '.gif')?'_page' . $_GET['id']:(file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_page.gif')?'_page':'');
} else { //add _ and page base to bg filename only if page bg image exists
$smart_image = file_exists(DIR_WS_TEMPLATE_IMAGES . 'smartbg_' . $current_page_base . '.gif')?'_' . $current_page_base:''; //default/home page class will be just .smartBG, and filename smartbg.gif
}// /Smart Backgrounds?>
but this line needs to substitute for the original in tpl_main_page.php:
PHP Code:
<body id="<?php echo $body_id . 'Body'; ?>" class="smartBG<?php echo $smart_image;?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
I would love to be able to do this without having to make an override copy of the whole tpl_main_page.php.
Coming back after a bit of core code executed and "redoing" it would sometimes work, but if you don't know the original values of variables the core was working on, it might not be possible to completely reverse the original action. If the core code performed output, that would be a bit difficult to "take back" :)