The Meaning of "updated" in lists?
Using Jamroom
A module called xxAudioOrder with just an inlcude.php file with this contents:
<?php
defined('APP_DIR') or exit();
function xxAudioOrder_meta(){
$_tmp = array(
'name' => 'AudioOrder',
'url' => 'audioorder',
'version' => '1.0.0',
'developer' => 'noone, ©' . strftime('%Y'),
'description' => 'Update audio files _updated key when comments are added',
'license' => 'mpl',
'category' => 'custom'
);
return $_tmp;
}
function xxAudioOrder_init(){
jrCore_register_event_listener('jrCore', 'db_increment_key', 'xxAudioOrder_db_increment_key_listener');
return true;
}
function xxAudioOrder_db_increment_key_listener($_data, $_user, $_conf, $_args, $event)
{
if (isset($_data['key']) && $_data['key'] == 'audio_comment_count' && isset($_data['update']) && $_data['update'] == false) {
$_rep = array('audio_incremented' => time());
jrCore_db_update_item('jrAudio', $_data['id'][0], $_rep);
}
return $_data;
}
would have the results you're looking for: when a comment is added the audio file's _updated timestamp would be incremented.