Commit Graph

55 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
Tim Almdal
7ea13b3869 Normalize capitalization ticket #596 2009-10-28 12:15:52 -07: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
4ec2654a69 Correct version numbers for image_block and info modules, they inadvertently got set to 2, they should be 1 2009-09-30 18:04:30 -07:00
Tim Almdal
612bc3f091 Merge branch 'talmdal_dev' of git@github.com:gallery/gallery3 into talmdal_dev
Conflicts:
	modules/gallery/helpers/block_manager.php
	modules/gallery/libraries/Theme_View.php
	modules/image_block/helpers/image_block_block.php
	modules/image_block/helpers/image_block_theme.php
	modules/info/helpers/info_block.php
	modules/info/helpers/info_installer.php
2009-09-30 07:48:19 -07:00
Tim Almdal
60d35b8992 Use the block_manager to manage site sidebar panels. Fixes ticket #110.
* Extend block_manager to handle sidebar blocks. get_available has become get_available_admin_blocks, get_list becomes get_admin_list.
* Create new functions get_available_site_blocks which will look for gallery_block get_available_site_blocks.
* Refactor sidebar_blocks into a separate function and then call block_manager::get_html(site.sidebar). Convert image_block to use block management instead of theme::sidebar_blocks
* Change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach
* Convert the user module to use the new sidebar block structure. remove the installers for info and image_block modules.
* Convert tag and rss modules to the new sidebar framework. reset the version number to 1 for info and image_block modules.
* Change the get_html method to ignore empty blocks and change the individual handlers to return an empty string if no block is generated
* Add a warning message if no sidebar blocks are active and provide a link to the admin page that configures the sidebar.
2009-09-30 07:31:12 -07:00
Tim Almdal
19cb27c9a4 change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach 2009-09-29 15:07:53 -07:00
Bharat Mediratta
961bc3b185 Use user::display_name() in another case where it was missing. 2009-09-12 10:06:24 -07:00
Bharat Mediratta
0bb489b694 Properly internationalize the text for the By: line. This gets rid of
the escaping problem.
2009-09-12 10:02:27 -07:00
Bharat Mediratta
9fbdcf3efd Change the module installer so that you don't need to provide your own
install() function if all you're going to do is to set the version of
the module from module.info into the database.  This means that for some
simple modules, you don't need an install.php file at all.
2009-09-05 13:39:30 -07:00
Andy Staudacher
b9bd1681a3 Update all code to use helper method html::clean(), html::purify(), ... instead of SafeString directly. 2009-08-29 22:54:20 -07:00
Andy Staudacher
a5dfc81a8f Merge commit 'upstream/master'
Conflicts:

	modules/akismet/views/admin_akismet.html.php
	modules/comment/helpers/comment_rss.php
	modules/gallery/helpers/gallery_rss.php
	modules/gallery/libraries/I18n.php
	modules/gallery/views/permissions_browse.html.php
	modules/gallery/views/simple_uploader.html.php
	modules/info/views/info_block.html.php
	modules/organize/controllers/organize.php
	modules/organize/views/organize.html.php
	modules/organize/views/organize_album.html.php
	themes/default/views/album.html.php
	themes/default/views/movie.html.php
	themes/default/views/photo.html.php
2009-08-29 14:17:48 -07:00
Andy Staudacher
c01ac42c46 Refactor all calls of p::clean() to SafeString::of() and p::purify() to SafeString::purify().
Removing any p::clean() calls for arguments to t() and t2() since their args are wrapped in a SafeString anyway.
2009-08-29 12:48:40 -07:00
Bharat Mediratta
826e104fa9 Get rid of the extra "Folder name" row. It's noisy. Fixes ticket #593. 2009-08-27 17:15:20 -07:00
Chad Kieffer
ddddfc5e8e Make the info block display 'File name', instead of 'Folder name' when showing a photo. Fixes #631 2009-08-27 14:27:49 -06:00
Bharat Mediratta
51dca582cd More thorough fix for #421. Create User_Model::display_name() which
uses the full name if there is one, or falls back to the name if
that's all we have.
2009-07-19 16:50:35 -07:00
Bharat Mediratta
e2a9a1d284 Add quotes around all values that contain spaces in them, and add a
test to make sure that we continue to do so.

This makes sure that we don't have problems with 5.3 which treats the
literal "on" as a boolean.
2009-07-13 10:36:55 -07:00
Chad Kieffer
ff0b66a1a4 Put owner's url into user link. Seems better than displaying email until we have something like a user profile page. 2009-07-12 22:53:47 -06:00
Tim Almdal
d6648c0aff Fix for ticket #477. Use nl2br method when rendering comment::text and
item::description.  In addition add p::clean or p::purify to places that
xss cleaning had missed (i.e. rss feeds)
2009-07-04 08:17:12 -07:00
Tim Almdal
54ffea2419 Split the clean method into two clean and purify. clean is a light weight
approach using html::specialchars and purify uses HTMLPurifier to intelligently
cleanse the output fields. Use purifier for text and title fields where it is
likely that a user would enter html to format their data.
2009-07-03 21:44:10 -07:00
Chad Kieffer
0d105bcf9d Display owner's full name rather than username, ticket #421. 2009-06-30 23:29:53 -06:00
Bharat Mediratta
24f0c4bd19 Undo my last change; it's not the right fix for the problem. 2009-06-28 18:10:42 -07:00
Bharat Mediratta
b235fd6e5f Pass the item into the block. 2009-06-28 18:00:00 -07:00
Chad Kieffer
2b804ebdce Convert info module's block to use a list instead of a table. Addresses request in ticket #441. 2009-06-28 17:53:20 -06: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
26314d0ef8 Create gallery::date_time(), gallery::date() and gallery::time()
functions that format a unix timestamp into a date+time/date/time
string.

Partial fix for ticket #347.
2009-06-12 22:44:51 -07:00
Chad Kieffer
c5425f42a4 Remove album view icon link, added album link to info module. This and breadcrumb should suffice. 2009-06-06 00:35:30 -06:00
Bharat Mediratta
708f27f483 Run p::clean() on any variables that contain data entered by users. 2009-05-31 00:11:48 -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
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