Commit Graph

25 Commits

Author SHA1 Message Date
Bharat Mediratta
fc6bdbbbc8 Grab photo capture date and captions from EXIF/IPTC data.
- Add a "captured" column to the items table.
- Pull the DateTime EXIF field and put it into the captured column
- Pull the Caption EXIF & IPTC fields and put them into the description
  field if there was not already a value there
2009-05-07 01:18:31 +00:00
Bharat Mediratta
caa0a6d47f Don't show the description field if there's no description 2009-03-09 07:54:37 +00:00
Chad Kieffer
aca2729eb6 Remove the "more" link until something's implemented that needs it. 2009-02-09 01:20:42 +00:00
Bharat Mediratta
d9b4d96c67 Use Album or Photo in the title instead of Item 2009-02-07 22:11:44 +00:00
Bharat Mediratta
3d1ea2904d Rename theme callback helpers from xxx_block to xxx_theme to make room
for us to rename the dashboard helper to be a block helper since
sidebar blocks are not just in the dashboard.
2009-01-18 05:01:00 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00
Bharat Mediratta
f3ba69c1d6 Make sure that helper functions are all static. Add new
File_Structure_Test to make sure we don't regress.

According to the PHP docs, the "public" keyword is implied on static
functions, so remove it.  Also, require private static functions to
start with an _.

http://php.net/manual/en/language.oop5.visibility.php
2009-01-14 04:12:02 +00:00
Bharat Mediratta
bc421a615a Implement deleting dashboard blocks.
* Refactor blocks so that they have a separate id vs css_id.  This way
  we can have a unique identifier for each visual block.

* Store blocks with a random id as their unique identifier

* Add Admin_Dashboard::remove_block() and modify
  themes/admin_default/views/block.html.php to call it when you click the
  remove box.
2009-01-12 08:26:38 +00:00
Andy Staudacher
a631fe29f3 i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
2009-01-08 17:13:06 +00:00
Bharat Mediratta
cd1d023754 Change the preamble for views in two ways:
1) drop unnecessary semicolon
2) start with <?php for extra security in the case that the server itself doesn't
   have short_tags enabled (the app won't work, but we need to make sure that we're
   still secure)
2009-01-01 00:23:29 +00:00
Bharat Mediratta
672eca5337 Lots of deltas rolled up into a bigger change. Sorry for the mess.
1) Deleted in-place-editing.  We'll be replacing this with a real edit
   system that groups settings together and is more coherent.

2) Tweaked the way that dialog boxes work to get the ajax stuff working
   again.  It's imperfect and does not work properly for uploading images.
   This is going to get redone also, but this is a good resting point.

3) Created edit forms for albums and photos.  Moved _update and _create out
   of Items_Controller and into the individual subclasses.

4) Created access::required which is a shorthand for:
    if (!access::can(...)) {
      access::forbidden();
    }

5) Added validation rules to Items_Model

6) Converted login to use the regular modal dialog approach in the theme.
2008-12-24 00:20:26 +00:00
Bharat Mediratta
fe27bd1eb3 Change the way that we track modules.
Each module now has a "module.info" file that has information about
the module, including the core.  We can display the installed version,
and the version in the code.

Also take a first shot at a modules admin page.
2008-12-22 03:41:33 +00:00
Bharat Mediratta
50b0613243 Add view counts and show them properly. 2008-12-20 20:04:57 +00:00
Bharat Mediratta
fc7b78492b Separate thumbnails out into var/thumbs. This clears up some ambiguity in Item_Model and simplifies
file_proxy.  It also means we can stop munging file names in the var/resizes hierarchy.

In the process, rename "thumbnail" to "thumb" everywhere in honor of
Chad (well, ok because it's shorter)..
2008-12-17 04:45:35 +00:00
Bharat Mediratta
c95c17b133 Centralize logging around installing/uninstalling modules. 2008-11-27 09:45:26 +00:00
Bharat Mediratta
974f9f7788 Add a new "tag" page type.
Create the concept of "page types" which let us specify the kind of
page that we're rendering in high level terms.  Currently there are
three page types: album, photo and tag.

The tag page type uses slightly different variables.  It has a $tag
but no $item.  Adjust all sidebar_block() functions to avoid printing
stuff that's dependent on the item if there is no item.

Simplify the tag code to stop trying to fake an item.

Update the theme slightly to use $item and $tag where appropriate
(notably, for making the <title> element).
2008-11-26 21:50:45 +00:00
Bharat Mediratta
1ad1846774 Oops, fix a typo causing us to treat an array like a string. 2008-11-25 01:58:19 +00:00
Bharat Mediratta
2c7893b48e Fix a bug in thumbnail_info where we were printing out the data instead of returning it 2008-11-25 01:35:42 +00:00
Bharat Mediratta
1b76def26f Create thumbnail insertion points (top/bottom/info) and move
the generic item info into the info module.
2008-11-22 21:59:41 +00:00
Bharat Mediratta
c6f0cc036d Move all block callbacks from View::block_type() to
$theme->block_type() so that the themer has a consistent interface.
Also added a bunch more callbacks and normalized the names so that the
module author has plenty of options for where stuff gets put on the
page.  Especially renamed album/photo/sidebar to be album_blocks()
photo_blocks() and sidebar_blocks() to make it clear that those are
going to be larger content sections and not just basic insertion
points.

Used __call() to collapse all functions in the theme, which
incidentally makes it trivially easy to add a new insertion point.
2008-11-22 21:46:34 +00:00
Tim Almdal
8eadddfa87 Convert gmaps, info, and tag modules to the new block module 2008-11-22 05:51:15 +00:00
Bharat Mediratta
a8713a7695 Allow in-place editing in the info block. 2008-11-08 19:11:12 +00:00
Bharat Mediratta
418c0aab69 Create permanent owner_id column in the item table, and use a soft
relationship to bind the two.  To do this, I overrode __get in
Item_Model so that $item->owner returns the appropriate User_Model.
2008-11-08 07:48:36 +00:00
Felix Rabinovich
28b739a210 Adding user (owner) to items; info module 2008-11-08 07:18:56 +00:00
Bharat Mediratta
8e880b4c41 Item Info block is now off into the info module. Yay! 2008-11-05 05:35:47 +00:00