Re: [Koha-devel] Item Type Images have various sizes
I'll agree with you. Thinking about it again 6 seconds is pretty bad. I don't know how the authorized_values or icon sets are laid out in the database. I'm sure it wouldn't be hard to add the dimensions to the authorized_values. As I recall those are structure something like MARC, so just give some subfield to the dimensions. Having it stored with the iconset would be good too, but I don't know if or where that is in the database. My idea in the beginning was something to this effect. I don't really feel like trying to figure out authorized values right now, but I will look to see if iconsets are kept in the database somewhere other than that. On Thu, 2009-02-12 at 11:10 -0500, Galen Charlton wrote:
Hi,
On Thu, Feb 12, 2009 at 10:57 AM, Michael Hafen <mdhafen@tech.washk12.org> wrote:
Given 20 search results on a page, and (currently) at most 3 items per results, that's about an extra 6 seconds per page load, worst case. That doesn't seem terrible to me.
That actually sounds rather expensive to me - six seconds is an *eternity*. ;) I suggest storing the dimensions in the database when an icon is added or assigned to an itemtype or authorized_values, rather than recalculating it every time. Alternatively, the maximum height and width could be stored as an attribute of the iconset.
Regards,
Galen -- Michael Hafen Systems Analyst and Programmer Washington County School District Utah, USA
for Koha checkout http://koha-dev.washk12.org or git://koha-dev.washk12.org/koha
Hi, On Thu, Feb 12, 2009 at 11:25 AM, Michael Hafen <mdhafen@tech.washk12.org> wrote:
My idea in the beginning was something to this effect. I don't really feel like trying to figure out authorized values right now, but I will look to see if iconsets are kept in the database somewhere other than that.
Iconsets are not stored in the database - they're just directories in koha-tmpl/opac-tmpl/prog/itemtypeimg or ./koha-tmpl/intranet-tmpl/prog/img/itemtypeimg, so there currently isn't a place to stick the maximum dimensions of a iconset. However, both the authorised_values and itemtypes have an imageurl column pointing to the icon associated with item type or authval, so one possibility is adding imageheight and imagewidth columns to those tables. Regards, Galen -- Galen Charlton VP, Research & Development, LibLime galen.charlton@liblime.com p: 1-888-564-2457 x709 skype: gmcharlt
Here's a draft of the patch. Ignore the lack of updatedatabase stuff. Is there anything else that should be changed here? Thanks. On Thu, 2009-02-12 at 11:37 -0500, Galen Charlton wrote:
Hi,
On Thu, Feb 12, 2009 at 11:25 AM, Michael Hafen <mdhafen@tech.washk12.org> wrote:
My idea in the beginning was something to this effect. I don't really feel like trying to figure out authorized values right now, but I will look to see if iconsets are kept in the database somewhere other than that.
Iconsets are not stored in the database - they're just directories in koha-tmpl/opac-tmpl/prog/itemtypeimg or ./koha-tmpl/intranet-tmpl/prog/img/itemtypeimg, so there currently isn't a place to stick the maximum dimensions of a iconset. However, both the authorised_values and itemtypes have an imageurl column pointing to the icon associated with item type or authval, so one possibility is adding imageheight and imagewidth columns to those tables.
Regards,
Galen -- Michael Hafen Systems Analyst and Programmer Washington County School District Utah, USA
for Koha checkout http://koha-dev.washk12.org or git://koha-dev.washk12.org/koha
Owen mentioned that he sent a patch for this issue a while back and I just wanted to pass this along. http://lists.koha.org/pipermail/koha-patches/2008-November/002150.html It is a different method then has been discussed, but should still do the trick. -- Danny Bouman Web Programmer Howard County Central Library 10375 Little Patuxent Parkway Columbia, MD 21044 410.313.7924 ----- Original Message ----- From: Michael Hafen <mdhafen@tech.washk12.org> To:<koha-devel@lists.koha.org> Cc: Date: Thursday, February 12 2009 03:47 PM Subject: Re: [Koha-devel] Item Type Images have various sizes Here's a draft of the patch. Ignore the lack of updatedatabase stuff. Is there anything else that should be changed here? Thanks. On Thu, 2009-02-12 at 11:37 -0500, Galen Charlton wrote:
Hi,
On Thu, Feb 12, 2009 at 11:25 AM, Michael Hafen <mdhafen@tech.washk12.org> wrote:
My idea in the beginning was something to this effect. I don't really feel like trying to figure out authorized values right now, but I will look to see if iconsets are kept in the database somewhere other than that.
Iconsets are not stored in the database - they're just directories in koha-tmpl/opac-tmpl/prog/itemtypeimg or ./koha-tmpl/intranet-tmpl/prog/img/itemtypeimg, so there currently isn't a place to stick the maximum dimensions of a iconset. However, both the authorised_values and itemtypes have an imageurl column pointing to the icon associated with item type or authval, so one possibility is adding imageheight and imagewidth columns to those tables.
Regards,
Galen -- Michael Hafen Systems Analyst and Programmer Washington County School District Utah, USA
for Koha checkout http://koha-dev.washk12.org or git://koha-dev.washk12.org/koha _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel
I like this better actually. So here is another patch using this method. What say y'all? On Thu, 2009-02-12 at 17:02 -0500, Danny Bouman wrote:
Owen mentioned that he sent a patch for this issue a while back and I just wanted to pass this along.
http://lists.koha.org/pipermail/koha-patches/2008-November/002150.html
It is a different method then has been discussed, but should still do the trick.
-- Danny Bouman Web Programmer Howard County Central Library 10375 Little Patuxent Parkway Columbia, MD 21044 410.313.7924
----- Original Message ----- From: Michael Hafen <mdhafen@tech.washk12.org> To: <koha-devel@lists.koha.org> Cc: Date: Thursday, February 12 2009 03:47 PM Subject: Re: [Koha-devel] Item Type Images have various sizes Here's a draft of the patch. Ignore the lack of updatedatabase stuff. Is there anything else that should be changed here?
Thanks.
On Thu, 2009-02-12 at 11:37 -0500, Galen Charlton wrote: > Hi, > > On Thu, Feb 12, 2009 at 11:25 AM, Michael Hafen > <mdhafen@tech.washk12.org> wrote: > > My idea in the beginning was something to this effect. I don't really > > feel like trying to figure out authorized values right now, but I will > > look to see if iconsets are kept in the database somewhere other than > > that. > > Iconsets are not stored in the database - they're just directories in > koha-tmpl/opac-tmpl/prog/itemtypeimg or > ./koha-tmpl/intranet-tmpl/prog/img/itemtypeimg, so there currently > isn't a place to stick the maximum dimensions of a iconset. However, > both the authorised_values and itemtypes have an imageurl column > pointing to the icon associated with item type or authval, so one > possibility is adding imageheight and imagewidth columns to those > tables. > > Regards, > > Galen -- Michael Hafen Systems Analyst and Programmer Washington County School District Utah, USA
for Koha checkout http://koha-dev.washk12.org or git://koha-dev.washk12.org/koha _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha.org http://lists.koha.org/mailman/listinfo/koha-devel -- Michael Hafen Systems Analyst and Programmer Washington County School District Utah, USA
for Koha checkout http://koha-dev.washk12.org or git://koha-dev.washk12.org/koha
Oops, had an un-committed change there. Need to add clear : left; to the section #searchresults ul li { My bad. On Fri, 2009-02-13 at 16:21 -0700, Michael Hafen wrote:
I like this better actually. So here is another patch using this method.
What say y'all?
-- Michael Hafen Systems Analyst and Programmer Washington County School District Utah, USA for Koha checkout http://koha-dev.washk12.org or git://koha-dev.washk12.org/koha
participants (3)
-
Danny Bouman -
Galen Charlton -
Michael Hafen