Are tasks supported on the theme level?
|
Serge D
![]()
Joined: 2009-06-11
Posts: 2436 |
Posted: Wed, 2011-01-05 17:56
|
|
Are tasks supported on the theme level? |
|


Posts: 7985
Currently, no. The code to find tasks is in modules/gallery/helpers/task.php in get_definitions() -- it would also have to check for a task class on the theme. We'd have to add this code:
$class_name = theme::$site_theme_name . "_task"; if (method_exists($class_name, "available_tasks")) { // the theme has a task class }---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!
Posts: 2436
Could you please add it for 3.1?
Posts: 7985
I'll try to get this into 3.0.1:
https://sourceforge.net/apps/trac/gallery/ticket/1580
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!
Posts: 556
Out of curiosity: what task would a theme have?
Dog Photos | Gallery2 Themes Demo
Posts: 2436
I do not to write module just for that, but I can bundle some actions there, which are not really theme related per se
* mark and rebuild thumbs/resizes
* clear caches
* mark exif/iptc data for refresh
...
Posts: 27
These need to be on the maintenance page IMO, then they will be accessible regardless of which theme is installed.
regards,
http://retroguy.org
Posts: 7985
There's a complicating factor here -- tasks that are in the site theme are not going to be available in the admin theme. So if you create tasks in the admin theme you can run them in the admin theme, but you can't run them when you're not in the admin theme. And any tasks you create/run in the site theme won't be available when you go to Admin > Maintenance. That seems a little weird and needs some more thought. I'm going to move this ticket to 3.1 for now.
---
Problems? Check gallery3/var/logs
file a bug/feature ticket | upgrade to the latest code! | hacking G3? join us on IRC!