[dev] Re: Moon block patch

Joe Jenkins joe at nerdnet.com
Thu Jan 22 14:36:27 PST 2004


Oops.

The first html line should be:

     $html  = '<table width="100%" height="100%" border="0" cellpadding="0"
cellspacing="0"><tr>';

Otherwise it looks wrong.

"Joe Jenkins" <joe at nerdnet.com> wrote in message
news:bupj2r$1e1$1 at sea.gmane.org...
> Just a cosmetic patch for the Moon Block.
>
> I fixed some spelling errors in the Moon phases block and added an
indicator
> of "Northern or Southern" Hemisphere so that the block looks more like
other
> blocks in Horde.
>
> Joe Jenkins
>
> Patch is attached, here is the code:
>
> --- moon.php    Thu Jan 22 15:26:20 2004
> +++ moon.php.patch      Thu Jan 22 15:19:41 2004
> @@ -51,8 +51,11 @@
>              $dates  = array_slice(array_keys($phases), $lastNew, 4);
>          }
>
> -        $html  = '<table width="100%" height="100%"><tr>';
> +       if (isset($this->_params['hemisphere']) &&
> $this->_params['hemisphere'] == 'northern') {
> +               $location = "Northern Hemisphere"; } else { $location =
> "Southern Hemisphere"; }
>
> +        $html  = '<table width="100%" height="100%"><tr>';
> +        $html .= '<td colspan="4" class="control"><b>' . $location .
> '</b></td></tr><tr>';
>          $html .= '<td width="25%" align="center">';
>          $html .= Horde::img('block/moon/newmoon.gif', _("New Moon"));
>          $html .= '<br/>' . strftime('%d %b', $dates[0]);
> @@ -60,9 +63,9 @@
>
>          $html .= '<td width="25%" align="center">';
>          if (isset($this->_params['hemisphere']) &&
> $this->_params['hemisphere'] == 'northern') {
> -            $html .= Horde::img('block/moon/lastquarter.gif', _("First
> Quater"));
> +            $html .= Horde::img('block/moon/lastquarter.gif', _("First
> Quarter"));
>          } else {
> -            $html .= Horde::img('block/moon/firstquarter.gif', _("First
> Quater"));
> +            $html .= Horde::img('block/moon/firstquarter.gif', _("First
> Quarter"));
>          }
>          $html .= '<br/>' . strftime('%d %b', $dates[1]);
>          $html .= '</td>';
> @@ -74,9 +77,9 @@
>
>          $html .= '<td width="25%" align="center">';
>          if (isset($this->_params['hemisphere']) &&
> $this->_params['hemisphere'] == 'northern') {
> -            $html .= Horde::img('block/moon/firstquarter.gif', _("Last
> Quater"));
> +            $html .= Horde::img('block/moon/firstquarter.gif', _("Last
> Quarter"));
>          } else {
> -            $html .= Horde::img('block/moon/lastquarter.gif', _("Last
> Quater"));
> +            $html .= Horde::img('block/moon/lastquarter.gif', _("Last
> Quarter"));
>          }
>          $html .= '<br/>' . strftime('%d %b', $dates[3]);
>          $html .= '</td>';
>
>
>


----------------------------------------------------------------------------
----


>
>
>
> -- 
> Horde developers mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>


begin 666 moon_php.diff
M+2TM(&UO;VXN<&AP(" @(%1H=2!*86X@,C(@,34Z,C8Z,C @,C P- T**RLK
M(&UO;VXN<&AP+G!A=&-H(" @(" @5&AU($IA;B R,B Q-3HQ.3HT,2 R,# T
M#0I 0" M-3$L." K-3$L,3$@0$ -"B @(" @(" @(" @(" D9&%T97,@(#T@
M87)R87E?<VQI8V4H87)R87E?:V5Y<R at D<&AA<V5S*2P@)&QA<W1.97<L(#0I
M.PT*(" @(" @(" @?0T*( T*+2 @(" @(" @)&AT;6P@(#T@)SQT86)L92!W
M:61T:#TB,3 P)2(@:&5I9VAT/2(Q,# E(CX\='(^)SL-"BL@(" @(" @:68@
M*&ES<V5T*"1T:&ES+3Y?<&%R86US6R=H96UI<W!H97)E)UTI("8F("1T:&ES
M+3Y?<&%R86US6R=H96UI<W!H97)E)UT@/3T@)VYO<G1H97)N)RD@>R -"BL@
M(" @(" @(" @(" @(" D;&]C871I;VX@/2 B3F]R=&AE<FX at 2&5M:7-P:&5R
M92([('T at 96QS92![("1L;V-A=&EO;B ](")3;W5T:&5R;B!(96UI<W!H97)E
M(CL@?0T*( T**R @(" @(" @)&AT;6P@(#T@)SQT86)L92!W:61T:#TB,3 P
M)2(@:&5I9VAT/2(Q,# E(B!B;W)D97(](C B(&-E;&QP861D:6YG/2(P(B!C
M96QL<W!A8VEN9STB,"(^/'1R/B<[#0HK(" @(" @(" D:'1M;" N/2 G/'1D
M(&-O;'-P86X](C0B(&-L87-S/2)C;VYT<F]L(CX\8CXG("X@)&QO8V%T:6]N
M("X@)SPO8CX\+W1D/CPO='(^/'1R/B<[#0H@(" @(" @(" D:'1M;" N/2 G
M/'1D('=I9'1H/2(R-24B(&%L:6=N/2)C96YT97(B/B<[#0H@(" @(" @(" D
M:'1M;" N/2!(;W)D93HZ:6UG*"=B;&]C:R]M;V]N+VYE=VUO;VXN9VEF)RP@
M7R at B3F5W($UO;VXB*2D[#0H@(" @(" @(" D:'1M;" N/2 G/&)R+SXG("X@
M<W1R9G1I;64H)R5D("5B)RP@)&1A=&5S6S!=*3L-"D! ("TV,"PY("LV,RPY
M($! #0H@#0H@(" @(" @(" D:'1M;" N/2 G/'1D('=I9'1H/2(R-24B(&%L
M:6=N/2)C96YT97(B/B<[#0H@(" @(" @("!I9B H:7-S970H)'1H:7,M/E]P
M87)A;7-;)VAE;6ES<&AE<F4G72D@)B8@)'1H:7,M/E]P87)A;7-;)VAE;6ES
M<&AE<F4G72 ]/2 G;F]R=&AE<FXG*2![#0HM(" @(" @(" @(" @)&AT;6P@
M+CT at 2&]R9&4Z.FEM9R at G8FQO8VLO;6]O;B]L87-T<75A<G1E<BYG:68G+"!?
M*")&:7)S="!1=6%T97(B*2D[#0HK(" @(" @(" @(" @)&AT;6P at +CT@2&]R
M9&4Z.FEM9R at G8FQO8VLO;6]O;B]L87-T<75A<G1E<BYG:68G+"!?*")&:7)S
M="!1=6%R=&5R(BDI.PT*(" @(" @(" @?2!E;'-E('L-"BT@(" @(" @(" @
M(" D:'1M;" N/2!(;W)D93HZ:6UG*"=B;&]C:R]M;V]N+V9I<G-T<75A<G1E
M<BYG:68G+"!?*")&:7)S="!1=6%T97(B*2D[#0HK(" @(" @(" @(" @)&AT
M;6P at +CT@2&]R9&4Z.FEM9R at G8FQO8VLO;6]O;B]F:7)S='%U87)T97(N9VEF
M)RP at 7R@B1FER<W0 at 475A<G1E<B(I*3L-"B @(" @(" @('T-"B @(" @(" @
M("1H=&UL("X]("<\8G(O/B<@+B!S=')F=&EM92 at G)60@)6(G+" D9&%T97-;
M,5TI.PT*(" @(" @(" @)&AT;6P at +CT@)SPO=&0^)SL-"D! ("TW-"PY("LW
M-RPY($! #0H@#0H@(" @(" @(" D:'1M;" N/2 G/'1D('=I9'1H/2(R-24B
M(&%L:6=N/2)C96YT97(B/B<[#0H@(" @(" @("!I9B H:7-S970H)'1H:7,M
M/E]P87)A;7-;)VAE;6ES<&AE<F4G72D@)B8@)'1H:7,M/E]P87)A;7-;)VAE
M;6ES<&AE<F4G72 ]/2 G;F]R=&AE<FXG*2![#0HM(" @(" @(" @(" @)&AT
M;6P at +CT@2&]R9&4Z.FEM9R at G8FQO8VLO;6]O;B]F:7)S='%U87)T97(N9VEF
M)RP at 7R@B3&%S="!1=6%T97(B*2D[#0HK(" @(" @(" @(" @)&AT;6P at +CT@
M2&]R9&4Z.FEM9R at G8FQO8VLO;6]O;B]F:7)S='%U87)T97(N9VEF)RP at 7R@B
M3&%S="!1=6%R=&5R(BDI.PT*(" @(" @(" @?2!E;'-E('L-"BT@(" @(" @
M(" @(" D:'1M;" N/2!(;W)D93HZ:6UG*"=B;&]C:R]M;V]N+VQA<W1Q=6%R
M=&5R+F=I9B<L(%\H(DQA<W0 at 475A=&5R(BDI.PT**R @(" @(" @(" @("1H
M=&UL("X]($AO<F1E.CII;6<H)V)L;V-K+VUO;VXO;&%S='%U87)T97(N9VEF
M)RP at 7R@B3&%S="!1=6%R=&5R(BDI.PT*(" @(" @(" @?0T*(" @(" @(" @
M)&AT;6P at +CT@)SQB<B\^)R N('-T<F9T:6UE*"<E9" E8B<L("1D871E<ULS
A72D[#0H@(" @(" @(" D:'1M;" N/2 G/"]T9#XG.PT*
`
end




More information about the dev mailing list