Commit Graph
109 Commits
Author SHA1 Message Date
Tim Almdal 820cbdf1c3 Refactor the creation and removal of the album covers into
make_album_cover and remove_album_cover methods in Item_Model.
Usage: $photo->make_album_cover()  $album->remove_album_cover()
2009-04-29 15:57:29 +00:00
Tim Almdal 0d49773559 Reset the parent thumbnail in Item_Model::delete instead of where the
delete was happening.  This will insure that it is consistently done
for all deletes and we don't have to remember to replicate the code.
2009-04-29 00:40:59 +00:00
Tim Almdal 9176dadfd6 Move the module::event("before_item_delete") into the
Item_Model::delete method.  This will insure that it will get called
for all events.  Currently it is not being called for children of an
album when the parent album is deleted.
2009-04-29 00:29:53 +00:00
Tim Almdal 1596c9f3da Change _adjust_thumb_size to adjust_thumb_size and make public so we
can access if from organize
2009-04-28 21:26:12 +00:00
Chad Kieffer 0f6d15b304 Fixed typo in comment, added docblock. 2009-04-24 04:55:48 +00:00
Tim Almdal 79712cb0b4 Remove the negative weighting for albums. The are now positioned
based on the insertion order.
2009-04-22 22:20:19 +00:00
Tim Almdal 53a08aa592 Missed a closing para ) 2009-04-09 19:31:02 +00:00
Tim Almdal 2523720561 Change the weight for albums from zero, which could give us
indeterminate ordering, so that ablums are initially shown first.
2009-04-09 18:17:53 +00:00
Tim Almdal 6e819603af Clean up delete code as per Bharat's note 2009-04-09 17:18:23 +00:00
Tim Almdal fe9b08e506 Merge the micro_thumb_tag method into thumb_tag and add a third
parameter to indicate that a micro thumb is being generated
2009-04-09 16:30:49 +00:00
Tim Almdal 523c467eed Fixes issues with Server Add:
1) Fixes Ticket #208
2) Fixes Ticket #190
3) Fixes an unticketed issue where two items could collide when
creating the thumbnail and/or resize. For example, loading a.flv and
a.jpg would have generated the same thumbnail image.  This change adds
a random value to the name to avoid conflicts.
4) Added item::__set() to clear the relative path if the name changes
2009-04-08 15:11:55 +00:00
Tim Almdal f1eec57221 Add a weight column to the items model. Change the album ordering to
use this as the default instead of id.  This prepares the way for
manual reordering in the organize functionality.
2009-04-05 16:57:51 +00:00
Tim Almdal 066854424a Add a method to create a micro_thumb that is centered vertically in
its container (initially used for organize album view)
2009-03-27 17:36:14 +00:00
Tim Almdal 9d35437167 Update comments to reflect that the results of item::children or
item::descendants uses the specified sort order
2009-03-26 17:42:17 +00:00
Bharat Mediratta 2067314186 untabify 2009-03-25 01:34:04 +00:00
Tim Almdal 3523bf5d90 Change the item model so it will actually delete all the file system
objects when an item is deleted.
2009-03-24 19:04:43 +00:00
Tim Almdal fd58fe0ae0 Fix for ticket #168: Set a default value for extra_attrs on the Item_Model::thumb_tag() 2009-03-23 14:51:09 +00:00
Bharat Mediratta e1c53921d3 Don't divide by zero in thumb_tag if there's no thumbnail 2009-03-20 20:33:20 +00:00
Chad Kieffer 0695be1ccf Restore $extra_attrs in img tags. Roll back to using .gThumbnail in quick pane. 2009-03-20 04:39:27 +00:00
Tim Almdal ccb02b001f Fix for ticket #155. Delete the item record before unlinking the
files.
2009-03-18 22:42:31 +00:00
Bharat Mediratta e92e6d4da4 Oops, I used the wrong resize variables in my last change. 2009-03-16 11:33:14 +00:00
Bharat Mediratta f25ff87ba9 Remove unnecessary __get() function 2009-03-16 07:17:15 +00:00
Bharat Mediratta c825ec4ffb Move references to "album" out of ORM_MPTT since it's supposed to be
implementation agnostic.
2009-03-15 01:17:25 +00:00
Bharat Mediratta f9122c7908 Don't use html::image because it forces absolute urls, which we don't want. 2009-03-14 21:24:32 +00:00
Bharat Mediratta e658b9895e Default thumb/resizes to relative urls. 2009-03-14 18:31:56 +00:00
Tim Almdal b9ee37f30e Override the ORM_MTTP::children and ORM_MTPP::descendants methods in
the item model and always pass the orderby fields.  This insures that
all children or descendant calls will respect the album sort order.
2009-03-09 14:38:25 +00:00
Tim Almdal ac82e0a9df Change Item_Model::get_position to respect the sort order. This also
forced the next/prev buttons in album navication to respect the sort
order as well.
2009-03-09 13:43:13 +00:00
Bharat Mediratta e37faa0008 More tasks cleanup.
Don't join through to the users table; that won't work in embedded
mode.  Instead, add Tasks_Model::owner() that calls user::lookup() and
refer to the object directly in the view.

Add Admin_Maintenance:remove_finished_tasks() so that we can easily do
old task cleanup.

Hide Running / Finished sections if there aren't any running or
finished tasks.
2009-03-09 07:28:19 +00:00
Bharat Mediratta 1ad7ca639d Make the description a text column so that we can handle much larger
descriptions.
2009-03-09 03:29:22 +00:00
Tim Almdal f371c663c5 Fix for ticket #114 Permissions seem to be ignored 2009-03-05 17:16:38 +00:00
Bharat Mediratta 83e12961b1 Allow url() to return absolute urls 2009-03-04 06:25:25 +00:00
Tim Almdal dc4f784558 * Refactor task management methods from admin_maintenance.php to
task.php
* Added a owner_id field to the task database
* Modified the admin maintenace to show the owner of the task
<<**** Requires a reinstallation of core ****>>
2009-02-27 16:28:20 +00:00
Bharat Mediratta 515c081f79 Add support MP4 movies also. Flowplayer supports them and can stream
them using the h264streaming plugin.  Everything else is a fairly
minor change.
2009-02-25 05:27:29 +00:00
Tim Almdal 585ea81957 Fix for ticket #98.
The problem was that item::delete was deleting the parent album
2009-02-24 19:52:01 +00:00
Bharat Mediratta ffbab952c6 If the album_cover_item_id points to a missing item (unlikely but possible) just treat it like it was missing and continue 2009-02-22 23:54:48 +00:00
Bharat Mediratta baff63b70b Very basic movie support. You can upload a FLV file, we use ffmpeg to
extract a thumbnail out of it and if you click through we show it
using flowplayer.
2009-02-22 05:21:44 +00:00
Andy Staudacher dce6548431 Add local localization functionality. Local = no means to upload / download translations to a translation server yet.
- Added an outgoing_translations table to store translations from the local translation UI.
 - I18n class is checking incoming_ and outgoing_translations for translations, giving the latter priority.
 - Not handling plural strings in the translations UI yet.
2009-02-09 08:42:13 +00:00
Tim Almdal 1fc2307fab rollback r20001-r19998, r19995. This may require a reinstall 2009-02-08 02:21:28 +00:00
Tim Almdal a3704c8dd8 Assign the Album|Photo path field explicitly instead of hiding that in
the item::__set magic method.
2009-02-07 17:16:48 +00:00
Tim Almdal 4e107dac41 Implement fix for ticket #35. *** Requires reinstall of core ***
* Added new field in items table (path) which is sanitized version of
name.
* Added __set method on Items_module to set the path field whenever
the name field is changed.
* Made some changes to the scaffolding so missing the path column
would not kill the scaffolding.
* Changed MY_url::site so not having a 3rd parameter won't throw an error.
2009-02-06 16:39:18 +00:00
Tim Almdal 80d4df3a4a Convert all item->type == "album" to item->is_album()
Convert all item->type == "photo" to item->is_photo()
2009-02-06 03:47:36 +00:00
Bharat Mediratta b4f92c7de6 Add delete support as a quick-edit option 2009-01-29 09:26:39 +00:00
Bharat Mediratta 894a33d744 Add support for pretty urls. So now instead of urls like:
http://example.com/gallery3/index.php/albums/2
  http://example.com/gallery3/index.php/photos/9

You'll see urls like:
  http://example.com/gallery3/index.php/Family/Weddings
  http://example.com/gallery3/index.php/Family/Weddings/Bob.jpg
2009-01-29 03:22:02 +00:00
Bharat Mediratta eed57674f9 Add move support. Use the move icon in the quick pane. You can't
move an item into its own hierarchy, or into an album where you don't
have edit permission.
2009-01-24 05:14:44 +00:00
Bharat Mediratta 94e356fc31 Take advantage of the new support for parentheses added in r19879 and
fix a bug in viewable() that was AND'ing all view permissions together
(which meant that you had to have *all* permissions to view an item,
instead of just one).

Also, add a "max" param to the thumb_tag() so that we can specify a
max dimension for the thumbnail.  This will be used in the upcoming
"move item" feature.
2009-01-23 08:11:33 +00:00
Bharat Mediratta 2d7ab6f4da Create Item_Model::thumb_tag() and Item_Model::resize_tag() to provide
an abstraction for when we add movie support.
2009-01-14 07:21:35 +00:00
Bharat Mediratta ff6791f576 Models should be named in adjective_noun form to make pluralizatoin
more intuitive.

Renamed Translations_Incoming to Incoming_Translation to suit.
2009-01-13 01:05:11 +00:00
Bharat Mediratta 6c2aef1b4a Fix windows-style line endings. 2009-01-11 02:03:42 +00:00
Felix Rabinovich b647aa0f74 Theme Administration v. 2. Doesn't distinguish between regular and admin themes yet 2009-01-09 23:31:46 +00:00
Andy Staudacher 2917740ba6 First step of i18n refactoring:
- Using DB table translations_incomings as translations storage (file cache to be added)
- Removed overly complex i18n code which will be unnecessary with the future compiled cache files
- Added t() as a translation function (global refactoring from _() to t() to follow)
2009-01-08 06:52:18 +00:00