From heath at outerspaceconsultants.com Wed Feb 18 19:10:00 2004 From: heath at outerspaceconsultants.com (Heath S. Hendrickson) Date: Wed Feb 18 19:09:50 2004 Subject: [ansel] questions about gallery object Message-ID: <40342908.7040500@outerspaceconsultants.com> How do I get the gallery name given a DataTreeObject_Gallery? I thought it would be: $gallery->get('name'); but this just returns the display name of the gallery, not the actual galleryId name. Here's an example dump from print_r($gallery): datatreeobject_gallery Object ( [data] => Array ( [thumbnail_width] => 150 [thumbnail_height] => 150 [image_width] => 800 [image_height] => 600 [default] => 427 [default-type] => auto [num-images] => 38 [perm] => Array ( [guest] => 6 [default] => 6 [users] => Array ( [heath] => 30 ) ) [type] => 1 [num_images] => 0 [desc] => Thanksgiving spent at the residence of John Kendrick in Mineral Wells, Texas [name] => Thanksgiving 2003 [owner] => heath ) [name] => Anna:AJH_Thanksgiving2003 [order] => running $gallery->get('name') returns "Thanksgiving 2003" and not "Anna:AJH_Thanksgiving2003". I had to resort to calling $ansel_shares->_datatree->getName($cid) to get the actual $galleryId value. Am I missing something here? heath From chuck at horde.org Wed Feb 18 19:14:01 2004 From: chuck at horde.org (Chuck Hagenbuch) Date: Wed Feb 18 19:16:46 2004 Subject: [ansel] questions about gallery object In-Reply-To: <40342908.7040500@outerspaceconsultants.com> References: <40342908.7040500@outerspaceconsultants.com> Message-ID: <20040218221401.qij3yocw4sw84gcw@marina.horde.org> Quoting "Heath S. Hendrickson" : > How do I get the gallery name given a DataTreeObject_Gallery? I thought > it would be: > > $gallery->get('name'); > > but this just returns the display name of the gallery, not the actual > galleryId name. $gallery->getName(). -chuck -- "Here, I brought some cole slaw. It's made from peeeooople! Just kidding." From heath at outerspaceconsultants.com Wed Feb 18 19:22:49 2004 From: heath at outerspaceconsultants.com (Heath S. Hendrickson) Date: Wed Feb 18 19:22:40 2004 Subject: [ansel] Tree view almost done Message-ID: <40342C09.406@outerspaceconsultants.com> I'm 99% done with the new tree view. I didn't use Horde_Tree simply because I couldn't get my hands wrapped around how to use it. I'm just having a problem with dynamically changing the link that the gallery_preview image goes to. I've tried using the document.$owner_link.href = $owner_view_url[]; approach, but all I get are javascript errors complaining that document.$owner_link doesn't have any properties. Here's the JS snippet: link = document.getElementById('_link'); link.href = _view_url[$id]; // $id is passed into the JS And here's the definition of the link: The resulting output in the browser looks like: The JS: link = document.getElementById('heath_link'); link.href = heath_view_url[$id]; The link: Gallery Preview Anyone have any suggestions on what I'm doing wrong here? heath From heath at outerspaceconsultants.com Wed Feb 18 19:29:42 2004 From: heath at outerspaceconsultants.com (Heath S. Hendrickson) Date: Wed Feb 18 19:29:30 2004 Subject: [ansel] questions about gallery object In-Reply-To: <20040218221401.qij3yocw4sw84gcw@marina.horde.org> References: <40342908.7040500@outerspaceconsultants.com> <20040218221401.qij3yocw4sw84gcw@marina.horde.org> Message-ID: <40342DA6.8000507@outerspaceconsultants.com> Gotcha. I looked at Gallery.php and didn't see that fuction, so I searched up the class parents and found the one in DataTree, hence my kludge... Thanks, heath Chuck Hagenbuch wrote: > Quoting "Heath S. Hendrickson" : > >> How do I get the gallery name given a DataTreeObject_Gallery? I thought >> it would be: >> >> $gallery->get('name'); >> >> but this just returns the display name of the gallery, not the actual >> galleryId name. > > > $gallery->getName(). > > -chuck > > -- > "Here, I brought some cole slaw. It's made from peeeooople! Just > kidding." From heath at outerspaceconsultants.com Wed Feb 18 19:37:45 2004 From: heath at outerspaceconsultants.com (Heath S. Hendrickson) Date: Wed Feb 18 19:37:38 2004 Subject: [ansel] Tree view almost done In-Reply-To: <40342C09.406@outerspaceconsultants.com> References: <40342C09.406@outerspaceconsultants.com> Message-ID: <40342F89.9060205@outerspaceconsultants.com> Wouldn't you know it... I've spent a lot of time researching this online and couldn't find an answer (I found all sorts of references to changing a Frame location href...)... And then not 5 mintues after I type up this message and send it out do I find the answer. I needed to make it instead of . Doing that fixed it all up. All I have left to do is create the template for the tree view that isn't groupByOwner and then I can submit the patches... heath Heath S. Hendrickson wrote: > I'm 99% done with the new tree view. I didn't use Horde_Tree simply > because I couldn't get my hands wrapped around how to use it. I'm > just having a problem with dynamically changing the link that the > gallery_preview image goes to. I've tried using the > document.$owner_link.href = $owner_view_url[]; approach, but all I get > are javascript errors complaining that document.$owner_link doesn't > have any properties. > > Here's the JS snippet: > > link = document.getElementById('_link'); > link.href = _view_url[$id]; // $id is passed > into the JS > > > And here's the definition of the link: > > '_link"') . Horde::img('', _("Gallery Preview"), 'vpace="5" > class="solidbox" name="' . $owner . "_preview"') ?> > > > The resulting output in the browser looks like: > > The JS: > > link = document.getElementById('heath_link'); > link.href = heath_view_url[$id]; > > > The link: > > src="/horde/ansel/graphics/" alt="Gallery Preview" title="Gallery > Preview" vspace="5" class="solidbox" name="heath_preview" /> > > > Anyone have any suggestions on what I'm doing wrong here? > > heath From heath at outerspaceconsultants.com Wed Feb 18 22:14:08 2004 From: heath at outerspaceconsultants.com (Heath S. Hendrickson) Date: Wed Feb 18 22:14:10 2004 Subject: [ansel] Tree view mods Message-ID: <40345430.1040900@outerspaceconsultants.com> Attached is a single unified diff (via 'cvs diff -u' on the ansel root directory) and two new files(that both go into templates/list/). ansel_tree_view.patches tree_gallery.inc tree_owner.inc It's based on the tile listing with some heavy modifications to provide the full