Advanced search - search by "date added" and/or "date modified"

Hello.

Is it possible to customize the advanced search form (on admin side) by adding fields to search by “date added” and/or “date modified” (start date - end date)?

Thank You in advance.

Hi,
I would like to do the same thing, but I still don’t have the complete solution. About the part “start date - end date”, I did the work in the advanced search form on the public side. I modified the following core file by adding this code (omeka-2.4.1) :

omeka/application/models/Table/Item.php

122                 case 'greater than':
123                     $predicate = ' >= ' . $db->quote($value);
124                      break;
125                 case 'lower than':
126                     $predicate = ' <= ' . $db->quote($value);
127                      break;
128                 default:

After that, in the following file :
omeka/themes/[my_theme]/items/search-form.php

At the line 71, I replaced this code :

label_table_options(array(
                        
'contains' => __('contains'),
                        
'does not contain' => __('does not contain'),
                        
'is exactly' => __('is exactly'),
                        
'is empty' => __('is empty'),
                        
'is not empty' => __('is not empty'))
                    
)

By that code :

label_table_options(array(
                        
'contains' => __('contains'),
                        
'does not contain' => __('does not contain'),
                        
'is exactly' => __('is exactly'),
                        
'is empty' => __('is empty'),
                        
'is not empty' => __('is not empty'),

'greater than' => __('>='),
 
'lower than' => __('<='))
                    
)

Now I’m able to search by start date and end date.

But I still don’t know how to add “date added” and “date modified” in the list.
I hope that will help.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.