[typo] Delicious sidebar oops

Scott Laird scott at sigkill.org
Mon Aug 7 11:58:34 EDT 2006


This is a known half-fixed bug in the trunk, post 4.0.0.  Before the
half-fix, it was impossible to disable checkboxes that defaulted to
true.  So we're making some progress, but we aren't there yet.

It's easy to fix, but finding a clean fix is proving difficult.  Plus,
everyone's been on vacation lately.  We'll get it fixed and release
4.0.1 later this week.


Scott

On 8/4/06, Alastair Rankine <arsptr at internode.on.net> wrote:
> Currently the "group by date" setting in the delicious sidebar does
> not seem to have any effect: it's always on.
>
> I think the reason is that the value in @sb_config['groupdate']
> evaluates to "0" or "1", both strings and hence both true according
> to Ruby (any Perl programmers out there want to own up to this one? :).
>
> I guess a proper fix would be to map this setting to a boolean, but I
> don't know much about how sidebars are configured, so I've got a bit
> of a brute force fix instead, comments appreciated.
>
>
> typo $ svn diff components/plugins/sidebars/delicious/content.rhtml
> Index: components/plugins/sidebars/delicious/content.rhtml
> ===================================================================
> --- components/plugins/sidebars/delicious/content.rhtml (revision 1193)
> +++ components/plugins/sidebars/delicious/content.rhtml (working copy)
> @@ -1,8 +1,8 @@
> <% if @delicious -%>
>     <div id="delicious">
>       <h3><a href="http://<%=h @delicious.title %>"><%=h
> @delicious.title %></a></h3>
> -    <% (@sb_config['groupdate'] ? @delicious.days : [{ :container =>
> @delicious.items }]).each do |group| -%>
> -    <% if @sb_config['groupdate'] -%>
> +    <% (@sb_config['groupdate'] != "0" ? @delicious.days :
> [{ :container => @delicious.items }]).each do |group| -%>
> +    <% if @sb_config['groupdate'] != "0" -%>
>       <span class="date"><%=h group[:date].to_s.to_date.strftime("%b %
> d") %></span>
>       <% end -%>
>       <ul>
>
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list
>


More information about the Typo-list mailing list