This code works for me:
function MYMODULE_theme_registry_alter(&$theme_registry) {
$mod_path = drupal_get_path('module', 'MYMODULE');
$theme_registry_copy = $theme_registry; // munge on a copy
_theme_process_registry($theme_registry_copy, 'phptemplate', 'theme_engine', 'pow', $mod_path);
$theme_registry += array_diff_key($theme_registry_copy, $theme_registry);
$hooks = array('node');
foreach ($hooks as $h) {
if (!isset($theme_registry[$h]['theme paths'])) {
$theme_registry[$h]['theme paths'] = array();
}
_MYMODULE_insert_after_first_element($theme_registry[$h]['theme paths'], $mod_path);
}
}
function _MYMODULE_insert_after_first_element(&$a, $element) {
if(is_array($a)) {
$first_element = array_shift($a);
if ($first_element) {
array_unshift($a, $first_element, $element);
}
else {
array_unshift($a, $element);
}
}
}
function MYMODULE_preprocess_node(&$vars) {
if ($vars['view_mode'] == 'attach') {
$vars['theme_hook_suggestions'][] = 'node__attach';
}
}
I know you've seen nearly that exact code before from looking at your other question, but there are a couple of changes from the code in the article. It should work after clearing the caches (just once!)
Using the above I added a file called node--attach.tpl.php
to my module folder, cleared the caches again, and the output from that template file was shown for the node.
Then I added node--attach.tpl.php
to my theme folder, cleared the caches again, and the output from the new template file was shown.