Commit Graph

41 Commits

Author SHA1 Message Date
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Bharat Mediratta
f8db2a9f8c Update the install version to 2 to match module.info. 2010-01-31 20:47:25 -08:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Tim Almdal
c97a88599e Change gallery installer to do a direct update to the database, preppending gallery_graphics:: to each of the defined rules operations 2009-09-27 17:55:48 -07:00
Tim Almdal
467b74c310 This path requires the upgrader to be run and applies the following changes:
* moves the composite method back into core
* requires that the operation be fully qualified i.e. gallery_graphics::resize
* caches the graphics rules on each request
2009-09-27 15:24:51 -07:00
Tim Almdal
e204e18b3c Refactor the graphic rules processing to accomplish 2 goals: First separate the grapics library from module supplied rules and secondly, allow for modules to provide new processing rules callbacks. graphics::generate will now look for <module_name>_graphics::<rule> methods. 2009-09-24 20:28:26 -07:00
Bharat Mediratta
4828db003f Remove 'ENGINE=InnoDB' specification from tables that we create. Use
the system's default table specification.  Fixes ticket #597.
2009-08-27 15:47:54 -07:00
Bharat Mediratta
1e90e40d3a Use events to generate menus, instead of having xxx_menu helpers.
This is the first step towards having a simple, lightweight and
unified API for module interaction.
2009-07-28 13:47:22 -07:00
Bharat Mediratta
bfca0c7903 Refactor the install/upgrade code to be more flexible.
Add xxx_installer::upgrade($version) method so that upgrade stanzas
are separate from install stanzas.  In the old code, to do an upgrade
meant that you had to re-evolve everything from the initial install
because we'd step through each version's changes.  But what we really
want is for the initial install to start off in the perfect initial
state, and the upgrades to do the work behind the scenes.  So now the
install() function gets things set up properly the first time, and the
upgrade() function does any work to catch you up to the latest code.
See gallery_installer.php for a good example.
2009-06-23 12:00:49 -07:00
Bharat Mediratta
7aed923908 Restructure the module lifecycle.
Install: <module>_installer::install() is called, any necessary tables
are created.

Activate: <module>_installer::activate() is called.  Module
controllers are routable, helpers are accessible, etc.  The module is
in use.

Deactivate: <module>_installer::deactivate() is called.  Module code
is not accessible or routable.  Module is *not* in use, but its tables
are still around.

Uninstall: <module>_installer::uninstall() is called.  Module is
completely removed from the database.

Admin > Modules will install and activate modules, but will only
deactivate (will NOT uninstall modules).
2009-05-26 05:28:59 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
dd8c688542 Set the default transparency to 1 (no transparency at all) 2009-05-13 05:13:21 +00:00
Bharat Mediratta
847de44996 Fix the logical inversion of the transparency field. Now, 100% is max
transparency and 1% is min transparency (no transparency at all).

Fixes ticket #204.
2009-05-13 00:09:43 +00:00
Tim Almdal
c04ff8e02f Change the pattern to identify tables that need prefix substitution to
mirror the drupal pattern of using braces {}.
2009-02-28 06:37:28 +00:00
Tim Almdal
1328755b11 This implement table prefix for the watermark notification modules (Ticket #68) 2009-02-27 21:15:13 +00:00
Tim Almdal
a8233ed979 Undo the adding underscores to the id on forge generated forms 2009-01-25 06:28:04 +00:00
Tim Almdal
cbff78daa8 Supply a form id on all forms. This id can be used by modules other
than the originating module to provide additional functionality to the form.
2009-01-24 17:26:47 +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
ae73ef3d57 Updated for new Form_Submit API.
OLD:
  $form->submit("Foo")  -->  <input type="submit" value="Foo">

New:
  $form->submit("foo_button")->("Foo") --> <input type="submit" name="foo_button" value="Foo">

Mostly we don't care what the button is so we leave the name blank.
2009-01-12 07:50:04 +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
fa1ccbd86d Fix up all the various little forms to have submit buttons, fieldset legends, etc etc. 2009-01-06 09:22:29 +00:00
Bharat Mediratta
f29aad03a6 Make some columns smaller so that multi-column keys don't exceed 1024
bytes on some systems.
2008-12-30 01:37:09 +00:00
Bharat Mediratta
776123496b Add transparency support 2008-12-29 22:30:19 +00:00
Bharat Mediratta
7fdde469d3 Move Watermarks under Content in the Site Admin menu. 2008-12-26 18:59:41 +00:00
Bharat Mediratta
dee20ed6a2 Added the concept of "permanent" messages that we show to admins. Use
this to show a "your thumbs/resizes are out of date" message whenever
we change the graphics rules.  Tweak watermark module to add graphics
rules whenever we make a change, which triggers the graphics module to
add the permanent message.
2008-12-26 05:43:06 +00:00
Bharat Mediratta
0630dc9a8e Fix get_add_form() to use self::positions() so that we get the right key/value pairs. 2008-12-26 05:14:00 +00:00
Bharat Mediratta
e31ca19a06 Added graphics::mark_all_dirty(). The watermark code now marks images
as dirty if the admin changes the watermark at all.
2008-12-26 04:52:18 +00:00
Bharat Mediratta
837a5430b8 More watermark changes:
Change admin/watermarks/upload -> admin/watermarks/add for consistency.

Internationalize position text, store it as text in the database,
display it to the admin.

Make i18n strings consistent to reduce l10n load.
2008-12-26 04:34:20 +00:00
Bharat Mediratta
0fc14c1bfc Simplify the watermark module. We can now upload, edit and delete one
watermark.  The UI is rough and we don't yet apply the watermark to
images.. that's next.
2008-12-26 01:32:12 +00:00
Bharat Mediratta
94e3ae2e0f Add edit/delete links (they're just stubs now, but they open a dialog).
Add active/position to Watermark_Model
2008-12-25 22:31:20 +00:00
Bharat Mediratta
2502240ce4 Add very simple graphics toolkits.
Track a set of rules in Graphics_Rule_Model which specify how we turn
original images into thumbnails and resizes.  There's one set of rules
that applies to every image in the Gallery.

Track the state of thumbs and resizes with a "dirty" bit.  The new
graphics helper manages the rules and can rebuild the thumbs and
resizes for any images that are considered "dirty".

Introduce the concept of an "album cover" which is an item that an
album points to.  We'll use that item as the source for the album's
thumbnail/resize.

Conflated with this change (sorry!) I also changed the Var table to
use module_name instead of module_id.  This may be marginally less
efficient, but it's much easier to follow in the database.
2008-12-23 04:14:07 +00:00
Bharat Mediratta
ddcf10dfce Allow the site admin to upload watermark images. Can't do much with them yet. 2008-12-23 01:29:17 +00:00
Bharat Mediratta
d330e4203a Step 1 of converting watermarks over to be an admin page. 2008-12-23 00:13:22 +00:00
Bharat Mediratta
c67234974d Refactor site admin menu into a theme function and build the menus in
the various modules.  In the process, rename xxx_menu::site_navigation() to just
xxx_menu::site().  And add xxx_menu::admin().

The menus are the same as before, but I changed the HTML to be
consistent with the way that we do it in the regular site, and this
broke the superfish styles.  I don't know how to fix this.. help me
Chad!
2008-12-18 07:32:34 +00:00
Tim Almdal
f8a0c91ce6 Drag & Drop the watermark now works and so does the dropdown box. The target image is divided into a 3x3 quadrant referenced as: northwest, north, northeast, west, center, east, southeast, south, southwest. Similiar to the imagemagik garvities. Currently the watermark is placed in the left top of the particular quadrant. 2008-12-17 01:26:40 +00:00
Tim Almdal
04441e11cc 1) Remove the load watermark from the scaffolding... use the menu option
2) The set watermark dialog is now sizing properly.  @todo is recenter in the window
2008-12-16 17:30:18 +00:00
Tim Almdal
92e6ed8a8a Start of the dialog to specify the watermark placement. For convience, using the imagemagik nomicalture regarding watermark locations (east, west, center, etc.)
You can drag the watermark around but it doesn't stay in place.
Need to figure out how to resize the dialog box

and all of the supporting javascript
2008-12-15 23:08:18 +00:00
Tim Almdal
1cb0268589 Change the label on the watermark form upload element, so the error message is at least somewhat meaningful 2008-12-15 04:40:09 +00:00
Tim Almdal
b2107c3734 1) Move the deletion of the vars into module::delete helper
2) remove the watermark_add_form.html.php
2008-12-15 03:49:48 +00:00
Tim Almdal
db7e60da32 Change the watermark module to use forge.
Also the watermark file is now stored in varpath.
and the location is stored in the module vars table
2008-12-14 23:53:30 +00:00
Tim Almdal
4b4e9e8e45 The start of the watermark module. It doesn't save the watermark at this point. This is more of trying out the approach where Forge is not used for forms. Basic html and the Validation library. 2008-12-14 19:43:04 +00:00