2005/11/9 20:39
Ace_Armstrong
Quite a regular
Posts: 226
Since: 2003/1/9 3
2005/11/10 20:29
2005/11/14 19:43
mactoeknee
Just popping in
Posts: 75
Since: 2005/2/26
2005/11/15 3:33
peterr
Just can't stay away
Posts: 518
Since: 2004/8/5 9
2005/11/15 6:12
Ace_Armstrong wrote:Is there a way to remove the GMT time display from the events detail page and just display the local time?
if( $event->allday ) { // $tzoffset = 0 ; $event->end -= 300 ; $start_time_str = "("._PICAL_MB_ALLDAY_EVENT.")" ; $end_time_str = "" ; } else { // $tzoffset = intval( ( $this->user_TZ - $this->server_TZ ) * 3600 ) ; $disp_user_tz = $this->get_tz_for_display( $this->user_TZ ) ; $start_time_str = $this->get_middle_hi( $event->start + $tzoffset ) . " $disp_user_tz" ; $end_time_str = $this->get_middle_hi( $event->end + $tzoffset ) . " $disp_user_tz" ; if( $this->user_TZ != $event->event_tz ) { $tzoffset_s2e = intval( ( $event->event_tz - $this->server_TZ ) * 3600 ) ; $disp_event_tz = $this->get_tz_for_display( $event->event_tz ) ; $start_time_str .= " " . $this->get_middle_dhi( $event->start + $tzoffset_s2e ) . " $disp_event_tz" ; $end_time_str .= " " . $this->get_middle_dhi( $event->end + $tzoffset_s2e ) . " $disp_event_tz" ; } }
$disp_user_tz = $this->get_tz_for_display( $this->user_TZ ) ;
$disp_user_tz = '';
2005/11/15 6:33
Ace_Armstrong wrote:I also need to change the dates to American format if possible ("May 21" instead of "21 May") throughout the blocks and content.
function get_middle_dhi( $time , $is_over24 = false ) { $hour_offset = $is_over24 ? 24 : 0 ; $hour4disp = $this->use24 ? $this->hour_names_24[ date( 'G' , $time ) + $hour_offset ] : $this->hour_names_12[ date( 'G' , $time ) + $hour_offset ] ; return sprintf( _PICAL_FMT_DHI , $this->date_short_names[ date( 'j' , $time ) ] , // D $hour4disp , // H date( _PICAL_DTFMT_MINUTE , $time ) // I ) ; } // unixtimestamp function get_middle_hi( $time , $is_over24 = false ) { $hour_offset = $is_over24 ? 24 : 0 ; $hour4disp = $this->use24 ? $this->hour_names_24[ date( 'G' , $time ) + $hour_offset ] : $this->hour_names_12[ date( 'G' , $time ) + $hour_offset ] ; return sprintf( _PICAL_FMT_HI , $hour4disp , // H date( _PICAL_DTFMT_MINUTE , $time ) // I ) ; }
$today = date("M j"); // May 21
2005/11/16 16:40
I can't find any reference to "640" or "630" anywhere in the code. I have gone through literally every file in the module and every file in the "common" directory. NOTHING.If someone could give me a clue on this, that would be great. *grumble grumble* Ace ArmstrongThe Man. The Myth. The Mammal.-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=Intelligent, informed debate good. Innuendo bad. See for yourself!http://www.GLOAMING.us 8 Re: PiCal 0.7 -- Remove GMT from detailed event view? 2005/11/16 17:10 Ace_Armstrong Quite a regular Posts: 226 Since: 2003/1/9 3 Quote:peterr wrote:Quote:Ace_Armstrong wrote:I also need to change the dates to American format if possible ("May 21" instead of "21 May") throughout the blocks and content. The same file (/modules/piCal/class/piCal.php ) has functions called 'get_middle_dhi' and 'get_middle_dh', lines 2646 to 2674 as follows: function get_middle_dhi( $time , $is_over24 = false ) { $hour_offset = $is_over24 ? 24 : 0 ; $hour4disp = $this->use24 ? $this->hour_names_24[ date( 'G' , $time ) + $hour_offset ] : $this->hour_names_12[ date( 'G' , $time ) + $hour_offset ] ; return sprintf( _PICAL_FMT_DHI , $this->date_short_names[ date( 'j' , $time ) ] , // D $hour4disp , // H date( _PICAL_DTFMT_MINUTE , $time ) // I ) ; } // unixtimestamp function get_middle_hi( $time , $is_over24 = false ) { $hour_offset = $is_over24 ? 24 : 0 ; $hour4disp = $this->use24 ? $this->hour_names_24[ date( 'G' , $time ) + $hour_offset ] : $this->hour_names_12[ date( 'G' , $time ) + $hour_offset ] ; return sprintf( _PICAL_FMT_HI , $hour4disp , // H date( _PICAL_DTFMT_MINUTE , $time ) // I ) ; } and the method in which the date is represented, is by the 'date' function. If you checkout:http://php.planetmirror.com/manual/en/function.date.phpthere are plenty of examples. To get the format you want it is $today = date("M j"); // May 21 Okay....I understand how to get the right format from PHP. What I don't get is where in the piCal code to make the change to that format. Ace ArmstrongThe Man. The Myth. The Mammal.-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=Intelligent, informed debate good. Innuendo bad. See for yourself!http://www.GLOAMING.us 9 Re: PiCal 0.7 -- Remove GMT from detailed event view? 2005/11/17 0:30 peterr Just can't stay away Posts: 518 Since: 2004/8/5 9 Quote:Ace_Armstrong wrote:I can't find any reference to "640" or "630" anywhere in the code. I have gone through literally every file in the module and every file in the "common" directory. NOTHING.[/quote]If I understand the problem, as you had '/spacer.gif' highlighted, that is your concern.Because the td/cell code for that is within a row which is within a table defined as 640 px wide, that is why it appears as 640 wide. In fact, _that_ table is within another table of 640 px wide.I didn't install the common directory, because with XOOPS 2.2.x, all that code is already defined in a standard XOOPS path, ....... found that out after stumbling upon some piCal code.HTH NO to the Microsoft Office format as an ISO standard. Sign the petition 10 Re: PiCal 0.7 -- Remove GMT from detailed event view? 2005/11/17 0:34 peterr Just can't stay away Posts: 518 Since: 2004/8/5 9 Quote:Ace_Armstrong wrote:I can't find any reference to "640" or "630" anywhere in the code. I have gone through literally every file in the module and every file in the "common" directory. NOTHING.If I understand the problem, as you had '/spacer.gif' highlighted, that is your concern.Because the td/cell code for that is within a row which is within a table defined as 640 px wide, that is why it appears as 640 wide. In fact, _that_ table is within another table of 640 px wide.I didn't install the common directory, because with XOOPS 2.2.x, all that code is already defined in a standard XOOPS path, ....... found that out after stumbling upon some piCal code.HTH NO to the Microsoft Office format as an ISO standard. Sign the petition Login Username Password Remember me Reset Search Advanced Search Recent Posts xSwatch5 v2.0 — Bootstrap 5.3 Arrives, With a Twist You Can Actually See Today 16:24 Mamba Re: Xtaggen Module Yesterday 13:54 Mamba Xtaggen Module Yesterday 8:41 heyula Re: XOOPS 4.0 – Vision, Direction, and Roadmap (Discussion) 4/1 14:57 Mamba Re: XOOPS 4.0 – Vision, Direction, and Roadmap (Discussion) 4/1 13:18 Mamba Re: XOOPS 4.0 – Vision, Direction, and Roadmap (Discussion) 4/1 11:52 kevinpetit Re: XOOPS Smarty Extensions 3/31 20:07 Mamba Re: XOOPS 4.0 – Vision, Direction, and Roadmap (Discussion) 3/31 14:30 Mamba XOOPS Smarty Extensions 3/31 14:27 Mamba Re: XOOPS, the future 3/31 13:29 alain01 Who's Online 205 user(s) are online (125 user(s) are browsing Support Forums) Members: 0 Guests: 205 more... Donat-O-Meter Stats Goal: $15.00 Due Date: Apr 30 Gross Amount: $0.00 Net Balance: $0.00 Left to go: $15.00 Latest GitHub Commits {{ record.sha.slice(0, 7) }} - {{ record.commit.message | truncate }} {{ record.commit.author.name }} {{ record.commit.author.date | formatDate }}
2005/11/16 17:10
peterr wrote:Quote:Ace_Armstrong wrote:I also need to change the dates to American format if possible ("May 21" instead of "21 May") throughout the blocks and content. The same file (/modules/piCal/class/piCal.php ) has functions called 'get_middle_dhi' and 'get_middle_dh', lines 2646 to 2674 as follows: function get_middle_dhi( $time , $is_over24 = false ) { $hour_offset = $is_over24 ? 24 : 0 ; $hour4disp = $this->use24 ? $this->hour_names_24[ date( 'G' , $time ) + $hour_offset ] : $this->hour_names_12[ date( 'G' , $time ) + $hour_offset ] ; return sprintf( _PICAL_FMT_DHI , $this->date_short_names[ date( 'j' , $time ) ] , // D $hour4disp , // H date( _PICAL_DTFMT_MINUTE , $time ) // I ) ; } // unixtimestamp function get_middle_hi( $time , $is_over24 = false ) { $hour_offset = $is_over24 ? 24 : 0 ; $hour4disp = $this->use24 ? $this->hour_names_24[ date( 'G' , $time ) + $hour_offset ] : $this->hour_names_12[ date( 'G' , $time ) + $hour_offset ] ; return sprintf( _PICAL_FMT_HI , $hour4disp , // H date( _PICAL_DTFMT_MINUTE , $time ) // I ) ; } and the method in which the date is represented, is by the 'date' function. If you checkout:http://php.planetmirror.com/manual/en/function.date.phpthere are plenty of examples. To get the format you want it is $today = date("M j"); // May 21
2005/11/17 0:30
Ace_Armstrong wrote:
2005/11/17 0:34
Ace_Armstrong wrote:I can't find any reference to "640" or "630" anywhere in the code. I have gone through literally every file in the module and every file in the "common" directory. NOTHING.
Advanced Search
205 user(s) are online (125 user(s) are browsing Support Forums)
Members: 0
Guests: 205