The taxonomy module uses the taxonomy_term_page function to build the page that list the nodes attached to a term. But the function that really do the query is the taxonomy_select_nodes that is called by this previous function.
Remember: Never hack core
So you can implement a custom module and use the hook_menu_alter to rewrite the page callback
for the taxonomy/term/%taxonomy_term
path using a new function based on the taxonomy_term_page
to call your custom taxonomy_select_nodes
function that perform the changes you need to order the nodes that way.
You'll need to do something like this:
function mymodule_menu_alter(&$items) {
// Rewrite the taxonmy term page callback
$items['taxonomy/term/%taxonomy_term']['page callback'] = 'mymodule_taxonomy_term_page';
}
After that you'll have to implement the mymodule_taxonomy_term_page function in order to be able to make the changes you need on the taxonomy_select_nodes()
call:
function mymodule_taxonomy_term_page($term) {
# code...
if ($nids = mymodule_taxonomy_select_nodes($term->tid)) {
# code...
}
# code...
}
Finally:
function mymodule_taxonomy_select_nodes() {
# code...
}
You'll must JOIN
the node table to build the query in the mymodule_taxonomy_select_nodes
function because the taxonomy_index table doesn't have the node title.
Notice that will change the behavior of all taxonomy term pages.
For more info about how to create a custom module see http://drupal.org/node/361112.