Overriding views default templates I'm trying to override default views templates using _theme_process_registry() function.
It's ok, but i've got some trouble when administrator trying to redefine output via views_ui interface. When he creates a new template, he obviously starts from default views templates (views/theme folder), so my templates is lost.

I'm trying to do so:

$theme_path = drupal_get_path('module', 'mymodule') . '/theme/default_templates';


/**
 * List all plugins trying to find overriden in our work directory
 */
foreach($plugins as $group_name =&gt; $plugins_group) {
    foreach ($plugins_group as $plugin_name =&gt; $plugin) {
        if (isset($plugin['theme']) &amp;&amp; file_exists($theme_path . '/' .  strtr($plugin['theme'], '_', '-') . '.tpl.php')) {
            $plugins[$group_name][$plugin_name]['theme path'] = $theme_path;
        }
    }
}


but single field template doesn't work, coz its hardcoded in view_plugin_display.inc

// Field templates aren't registered the normal way...and they're always
// this one, anyhow.
$output .= '&lt;pre&gt;' . check_plain(file_get_contents(drupal_get_path('module', 'views') . '/theme/views-view-field.tpl.php')) . '&lt;/pre&gt;';


Is anybody know how to fully override views templates to my own module directory?

And the second. I need to create more semantic markup like on  dev.twitter.com.

How to redefine classes_array to get rid of extra classes and div elements?

I'm using drupal 7 and views 3.
Are the templates that are overriding your templates included in a Theme? Themes always take precedence over modules, so any template in a theme will always override the corresponding template from a module. You may want to consider re-phrasing your question to reference the original issue you are solving with your template files.

If you are referring specifically to Views output with your desire to create semantic markup, I would suggest the Semantic Views module.