Commit Graph

145 Commits

Author SHA1 Message Date
shadlaws
58c137c981 #2007 - Change search box text when only looking in the current album.
- search.html.php - updated to use new labels.
- search_link.html.php - updated to use new labels.  Moved code that determines
current album to top, then used it for both the new label and the hidden album
input.  Resulting form code looks more symmetric to search.html.php.
2013-02-18 18:55:03 +01:00
Bharat Mediratta
72a6a8abaf Follow-on to 9dbe2e15ad for #1999.
Fix an issue where siblings() by itself throws an error.  The problem is that
Theme_View::siblings() passes a null offset and limit to the callback which
gets passed down to search::search_within_album, which creates its query
in raw SQL and doesn't check for a null offset/limit.  We want a reasonable
limit on the size of the set here (and 1000 is probably wayyy too high so
lower that to 100) so amend get_siblings to stop using default parameters
and actually check the inputs.

Author: Bharat Mediratta <bharat@menalto.com>
Date:   Sat Feb 9 14:53:34 2013 -0500

    Extend siblings callbacks to take a $limit and an $offset for navigating
    large sibling sets.  Useful for the thumbnav module since we don't want to
    iterate a thousand siblings to find the one we care about.  Fixes #1999.
2013-02-14 14:43:03 -05:00
Bharat Mediratta
9dbe2e15ad Extend siblings callbacks to take a $limit and an $offset for navigating
large sibling sets.  Useful for the thumbnav module since we don't want to
iterate a thousand siblings to find the one we care about.  Fixes #1999.
2013-02-09 14:53:34 -05:00
Bharat Mediratta
27ec3b4c6c Follow-on to 1e4d75c120 for #1975.
Don't try to use an array index on a function return, that's not supported
in PHP 5.3
2013-02-07 15:08:55 -05:00
Bharat Mediratta
c4b2f79a67 Force a sort order no sibling checks. Fixes #1990. 2013-02-05 13:02:26 -05:00
Bharat Mediratta
9396342250 Drop the requirement to have the install() function set the module
version.  It's redundant.  Fixes #1985.
2013-01-31 19:55:53 -05:00
Bharat Mediratta
1e4d75c120 Improve the display context API to return a "siblings_callback" field
containing a callback that returns all the siblings.  Fixes #1975.
2013-01-30 12:10:18 -05:00
Bharat Mediratta
49f6ce2d94 gallery.menalto.com -> galleryproject.org
codex.gallery2.org -> codex.galleryproject.org

Fixes #1957.
2013-01-22 18:39:24 -05:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
7567f0395a Minor whitespace fix. 2012-12-17 08:13:39 -08:00
Chris Chilvers
f5420b4eab fix, use $current->score 2012-12-14 17:34:33 +00:00
Chris Chilvers
a529a55e0b search within the current album by default
When searching, limit search results to the current album.
In the search results screen, display which album was searched and provide
a link to search the whole gallery.
2012-12-14 17:34:26 +00:00
Bharat Mediratta
a74e3aea6f Eliminate the search context if we encounter an item that cannot be
found in the search results.  Fixes #1923.
2012-12-09 20:26:16 -08:00
Bharat Mediratta
44d5f22d8d Remove <h2> added in last commit, it's unclear why that's necessary. The last commit had
the wrong ticket #, this actually resolves 1878.
2012-06-05 13:57:45 -07:00
Tony Fung
3fd5f4cc87 CSS Style Update to match with other view 2012-06-05 11:20:31 +08:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
eab12774fb In get_position() don't try to truncate the score if it's empty. Follow-on to ce43f29e2c 2011-11-03 21:24:35 -07:00
Bharat Mediratta
80f24e8bcb Follow on to 7f62f09cf3 for #1663 to fix bad
query syntax, pointed out by Singularis in http://gallery.menalto.com/gallery_3.0.2_feedback#comment-383135
2011-10-26 12:49:45 -07:00
Bharat Mediratta
ce43f29e2c Refactor the display context code a bit:
1) Move the display context code into the controller themselves so that it's
   more logically a continuation callback from the original controller
   rendering code.
2) Simplify the display context set/get code and put it in the item helper,
   it's just a couple of lines of code now.
3) Add more descriptive breadcrumb strings
2011-08-27 11:18:07 -07:00
Tim Almdal
933a34986d Patch for tickets #1428 and #1760
Create the concept of a Photo_Display_Context.  If the user is browsing a dynamic album (i.e. tags) and chooses to
look at an image in that album.  The display of the image happens correctly, but the 'next' and 'previous' buttons
are no longer consistent.  When one of these is clicked, Gallery  will open the adjacent image in the actuall album,
not the dynamic album.
2011-08-11 22:04:21 -07:00
Bharat Mediratta
67719c6f61 Simplification of 59b04b897b for #1764:
- Breadcrumb::build_from_item becomes Breadcrumb::array_from_item_parents
- Eliminate Breadcrumb::$id -- it's no longer necessary
- Fold Breadcrumb::generate_show_query_strings into Breadcrumb::array_from_item_parents
- Create Breadcrumb::set_first() and Breadcrumb::set_last()
- Breadcrumb::build_from_list goes away, we just use arrays for this
- Change Search_Controller and Tag_Controller to just create an array
  of Breadcrumb instances with the first/last marked appropriately
- Breadcrumb_Test loses a bunch of complexity.
2011-08-11 22:04:03 -07:00
Tim Almdal
a246b6fe45 Initial commit of a patch for Ticket #1764. as discussed here: https://github.com/gallery/gallery3/pull/58/files#r72949.
Create a Breadcrumb library which has two static methods for_item (which takes a an item and builds the entire
breadcrumb for the item) or build (which takes a variable number of Breadcrumb elements and creates a breadcrumb
based on the specified elements).

Used tag->url() to build the tag album url. Escaped the query string for the search. Tightened up the breadcrumb code
 in page.html.php.

When adding the show query parameter, we can't blindly concatenate using the ? separator.  We have to check that we
use a & if a query parameter already exists.
2011-08-11 22:04:02 -07:00
Tim Almdal
de1b4082cd Patch for ticket #1763. Where offset could be converted to a null string. It's not really a problem in the current release, but will cause isses when we serialize the offset as part of the display context. 2011-07-24 17:11:04 -07:00
Bharat Mediratta
c07af35a19 Oops, fix broken codex urls. For #1698. 2011-04-23 14:53:39 -07:00
Bharat Mediratta
ba20d5a500 Oops, this is the rest of the modules and themes for #1696 and #1698. 2011-04-23 14:46:07 -07:00
Joe7
f10648fe0a Sanitize page value before setting offset based on it 2011-04-02 20:56:11 +02:00
Bharat Mediratta
7f62f09cf3 Improve search to use wildcard matching, thanks to some code from tempg.
Fixes #1663.
2011-03-27 13:16:41 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
38b7493287 whitespace fix. 2011-01-15 13:07:14 -08:00
Joe7
f364e8a96b Using array support introduced in 8295201adf948ea35f21f75801b7a8bf36c27569 2011-01-03 11:38:21 -08:00
Bharat Mediratta
dff1a53696 All modules should be named Xxx_Core for extensibility. Fixes #1458. 2010-10-25 21:05:31 -07:00
Bharat Mediratta
c9c4f96100 Tune timeouts to work better on large installs. 2010-09-11 21:36:38 -07:00
Chad Kieffer
3fc08dfd4c Added text and submit classes to search form input and submit buttons, respectively. Fixed the width of the search form in IE. Button height's off in IE 8 compatbility mode. 2010-08-21 14:05:29 -07:00
Tim Almdal
41c18929cd Remove the duplicate query when searching as pointed out by joe7 on ticket #844 2010-06-11 15:54:08 -07:00
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
c050acf30a Fix lots of warnings that pop up when we're in E_STRICT mode. They're
mostly issues around uninitialized variables, calling non-static
functions in a static context, calling Session functions directly
instead of on its singleton, passing non-variables by reference, and
subclasses not using the same interface as the parent class.
2010-01-31 16:07:41 -08:00
Tim Almdal
a11bf29507 Fix for ticket #972 and more. In Kohana 2.4, ORM::delete_all ignores any where
clauses and deletes all the entries in the table unless an array of id's are
passed as the parameter.  This fix used the Database_builder to specify any where
conditions. Thanks psvo for find the first one. :-)
2010-01-09 23:57:16 -08:00
Bharat Mediratta
8b9a02084a Updates for the latest version of Kohana 2.4:
1) Controller::$input is gone -- use Input::instance() now
2) Handle new 'database.<default>.connection.params' parameter
3) Handle new 'cache.<default>.prefix' parameter
2009-12-21 21:27:43 -08:00
Bharat Mediratta
338af4a722 Database::escape_str() is now Database::escape(). 2009-12-18 01:16:27 -08:00
Bharat Mediratta
94411b3658 Fix a bunch of places where we were using "= null" instead of "IS NULL". 2009-12-02 10:02:08 -08:00
Bharat Mediratta
d2cb217e20 Convert more database calls over to the new format
- admin/maintenance page loads, the rebuild thumbs/resizes task works
- Fixed up some conversion bugs in the Cache driver
2009-12-02 00:34:34 -08:00
Bharat Mediratta
dee3ee81e2 Database::orwhere() is now Database_Builder::or_where() 2009-11-26 20:25:32 -08:00
Bharat Mediratta
1fd0e14359 Convert all DB where() calls to take 3 arguments.
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-26 12:09:04 -08:00
Bharat Mediratta
2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Bharat Mediratta
17d89a9df1 Truncate the text of the title/description for results on the search page. Partial fix for ticket #580. 2009-11-21 10:58:26 -08:00
Bharat Mediratta
b341b6b45d The search results page is a "collection" page type. 2009-11-20 20:30:12 -08:00
Tim Almdal
57adefc5ba Revert "Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme."
This reverts commit 26114972c3.
2009-11-19 11:44:01 -08:00
Tim Almdal
26114972c3 Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme. 2009-11-18 15:36:13 -08:00
Bharat Mediratta
1067e68292 Redesign the way that we consider page types to create buckets of page
types, and a subtype for specifics.  Currently the top level bucket

   collection, item, other

Here are the core subtypes so far:

   collection: album, search, tag
   item: movie, photo
   other: login, reset, comment-fragment, comment

It's legal to create new page_subtypes whenever you want.  Use the
appropriate page_type to get the coarse grain behavior that you want.
2009-11-17 14:04:45 -08:00
Bharat Mediratta
d368894d37 Add in proper template variables to support pagination. 2009-11-14 16:32:32 -08:00