[trean] adding to My Bookmarks **Patch II**

Mike Cochrane mike@graftonhall.co.nz
Sun, 6 Oct 2002 09:33:48 +1300


Thanks, committed the second half, the first half had allready been done in CVS.

- Mike :-)

> ----- Message from alb@chrisalbertson.com ---------
> 
> Yup. That bothered me as well. Another thing is that when you select add
> bookmark from within a category, it didn't select that category by default.
> So....
> Here is a patch to fix those two items.
> 1) Removed "My_Bookmarks" as a selection in the add bookmark page.
> 2) Changed the logic to make it select the category for you if you add from
> within a category.
> 
> ----------------------------------------------------------------
> Change Details::
> I didn't delete lines of code from this change. I commented the old lines and
> added mine. All my changes are within the catSelect function within
> Trean.php.
> Changed:
> $sel = ($cat === $selected) ? ' selected="selected"' : '';
> --to--
> $sel = "";
> if ($cat['name'] == $selected) {
>     $sel = "selected";
> }
> 
> and
> 
> Removed:
> $sel = ('-1' === $selected) ? ' selected="selected"' : '';
> $options = '<option value="-1">' . _("My Bookmarks") . "</option>\n"
> 
> ------------------------------------------------------------------------
> 
> 
> Attached is Trean.php. Is should replace the file in horde/trean/lib.
> 
> I hope you find this change useful.
> 
> --
> Chris Albertson
> alb@chrisalbertson.com
> 
> Never be afraid to try something new.
> Remember that amateurs built the ark. Professionals built the Titanic.
> 
> 4783147098
> 
> 
> Quoting Nate Mollring <nmollring@cennecs.org>:
> 
> > Quoting Chris Albertson <alb@chrisalbertson.com>:
> >
> > > Attached please find "browse.php." This replaces the browse.php that
> lives
> > in
> > >
> > > the root of trean.
> > > I changed the following line:
> > >  $show_new_bookmark = !$showBookmarks;
> > > --to--
> > >  $show_new_bookmark = $showBookmarks;
> > >
> > > The code for the ability to "not" show the add bookmark menu item was all
> > > there, it just had the wrong boolean set.
> > > I believe this change will also jive with future releases of trean where
> > I'd
> > >
> > > suspect that additional category/sub-category groupings could be added.
> > (ie.
> > >
> > > another "My_Bookmarks" level item with sub-categories)
> > >
> > > If you have any questions about this change, please feel free to let me
> > know.
> >
> >
> > That works when I'm in the browse screen, I like it.  But if you click add
> in
> > the top menu, My Bookmarks is an option still.
> > thanks for the modification.
> > Nate
> > --
> > Trean mailing list
> > Frequently Asked Questions: http://horde.org/faq/
> > To unsubscribe, mail: trean-unsubscribe@lists.horde.org
> 
> -------------------------------------------------
> This email was sent from www.chrisalbertson.com
> using IMP mailing program, part of the Horde suite
> of information management tools.
> http://horde.org/
> 
> ----- End message from alb@chrisalbertson.com -----