[dev] Moon block patch
Joe Jenkins
joe at nerdnet.com
Thu Jan 22 14:32:57 PST 2004
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>';
begin 666 moon_php.diff
M+2TM(&UO;VXN<&AP(" @(%1H=2!*86X@,C(@,34Z,C8Z,C @,C P- HK*RL@
M;6]O;BYP:' N<&%T8V@@(" @("!4:'4 at 2F%N(#(R(#$U.C$Y.C0Q(#(P,#0*
M0$ @+34Q+#@@*S4Q+#$Q($! "B @(" @(" @(" @(" D9&%T97,@(#T at 87)R
M87E?<VQI8V4H87)R87E?:V5Y<R at D<&AA<V5S*2P@)&QA<W1.97<L(#0I.PH@
M(" @(" @("!]"B *+2 @(" @(" @)&AT;6P@(#T@)SQT86)L92!W:61T:#TB
M,3 P)2(@:&5I9VAT/2(Q,# E(CX\='(^)SL**R @(" @("!I9B H:7-S970H
M)'1H:7,M/E]P87)A;7-;)VAE;6ES<&AE<F4G72D@)B8@)'1H:7,M/E]P87)A
M;7-;)VAE;6ES<&AE<F4G72 ]/2 G;F]R=&AE<FXG*2![( HK(" @(" @(" @
M(" @(" @)&QO8V%T:6]N(#T@(DYO<G1H97)N($AE;6ES<&AE<F4B.R!](&5L
M<V4@>R D;&]C871I;VX@/2 B4V]U=&AE<FX at 2&5M:7-P:&5R92([('T*( HK
M(" @(" @(" D:'1M;" @/2 G/'1A8FQE('=I9'1H/2(Q,# E(B!H96EG:'0]
M(C$P,"4B/CQT<CXG.PHK(" @(" @(" D:'1M;" N/2 G/'1D(&-O;'-P86X]
M(C0B(&-L87-S/2)C;VYT<F]L(CX\8CXG("X@)&QO8V%T:6]N("X@)SPO8CX\
M+W1D/CPO='(^/'1R/B<["B @(" @(" @("1H=&UL("X]("<\=&0@=VED=&@]
M(C(U)2(@86QI9VX](F-E;G1E<B(^)SL*(" @(" @(" @)&AT;6P at +CT@2&]R
M9&4Z.FEM9R at G8FQO8VLO;6]O;B]N97=M;V]N+F=I9B<L(%\H(DYE=R!-;V]N
M(BDI.PH@(" @(" @(" D:'1M;" N/2 G/&)R+SXG("X@<W1R9G1I;64H)R5D
M("5B)RP@)&1A=&5S6S!=*3L*0$ @+38P+#D@*S8S+#D at 0$ *( H@(" @(" @
M(" D:'1M;" N/2 G/'1D('=I9'1H/2(R-24B(&%L:6=N/2)C96YT97(B/B<[
M"B @(" @(" @(&EF("AI<W-E="@D=&AI<RT^7W!A<F%M<ULG:&5M:7-P:&5R
M92==*2 F)B D=&AI<RT^7W!A<F%M<ULG:&5M:7-P:&5R92==(#T]("=N;W)T
M:&5R;B<I('L*+2 @(" @(" @(" @("1H=&UL("X]($AO<F1E.CII;6<H)V)L
M;V-K+VUO;VXO;&%S='%U87)T97(N9VEF)RP at 7R@B1FER<W0 at 475A=&5R(BDI
M.PHK(" @(" @(" @(" @)&AT;6P at +CT@2&]R9&4Z.FEM9R at G8FQO8VLO;6]O
M;B]L87-T<75A<G1E<BYG:68G+"!?*")&:7)S="!1=6%R=&5R(BDI.PH@(" @
M(" @("!](&5L<V4@>PHM(" @(" @(" @(" @)&AT;6P at +CT@2&]R9&4Z.FEM
M9R at G8FQO8VLO;6]O;B]F:7)S='%U87)T97(N9VEF)RP at 7R@B1FER<W0 at 475A
M=&5R(BDI.PHK(" @(" @(" @(" @)&AT;6P at +CT@2&]R9&4Z.FEM9R at G8FQO
M8VLO;6]O;B]F:7)S='%U87)T97(N9VEF)RP at 7R@B1FER<W0 at 475A<G1E<B(I
M*3L*(" @(" @(" @?0H@(" @(" @(" D:'1M;" N/2 G/&)R+SXG("X@<W1R
M9G1I;64H)R5D("5B)RP@)&1A=&5S6S%=*3L*(" @(" @(" @)&AT;6P at +CT@
M)SPO=&0^)SL*0$ @+3<T+#D@*S<W+#D at 0$ *( H@(" @(" @(" D:'1M;" N
M/2 G/'1D('=I9'1H/2(R-24B(&%L:6=N/2)C96YT97(B/B<["B @(" @(" @
M(&EF("AI<W-E="@D=&AI<RT^7W!A<F%M<ULG:&5M:7-P:&5R92==*2 F)B D
M=&AI<RT^7W!A<F%M<ULG:&5M:7-P:&5R92==(#T]("=N;W)T:&5R;B<I('L*
M+2 @(" @(" @(" @("1H=&UL("X]($AO<F1E.CII;6<H)V)L;V-K+VUO;VXO
M9FER<W1Q=6%R=&5R+F=I9B<L(%\H(DQA<W0 at 475A=&5R(BDI.PHK(" @(" @
M(" @(" @)&AT;6P at +CT@2&]R9&4Z.FEM9R at G8FQO8VLO;6]O;B]F:7)S='%U
M87)T97(N9VEF)RP at 7R@B3&%S="!1=6%R=&5R(BDI.PH@(" @(" @("!](&5L
M<V4@>PHM(" @(" @(" @(" @)&AT;6P at +CT@2&]R9&4Z.FEM9R at G8FQO8VLO
M;6]O;B]L87-T<75A<G1E<BYG:68G+"!?*"),87-T(%%U871E<B(I*3L**R @
M(" @(" @(" @("1H=&UL("X]($AO<F1E.CII;6<H)V)L;V-K+VUO;VXO;&%S
M='%U87)T97(N9VEF)RP at 7R@B3&%S="!1=6%R=&5R(BDI.PH@(" @(" @("!]
M"B @(" @(" @("1H=&UL("X]("<\8G(O/B<@+B!S=')F=&EM92 at G)60@)6(G
I+" D9&%T97-;,UTI.PH@(" @(" @(" D:'1M;" N/2 G/"]T9#XG.PH`
`
end
More information about the dev
mailing list