 |
 |
 |
 |
#221045 - 07/13/02 03:51 PM
Re: Calendar v 3.0
[Re: Michael_Moore]
|
Enthusiast
Registered: 05/11/99
Posts: 412
Loc: NYC
|
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#221048 - 07/14/02 09:34 AM
Re: Calendar v 3.0
[Re: SurfMinister]
|
Addict
Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
|
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#221100 - 08/02/02 08:52 PM
Re: Calendar v 3.0
[Re: MRLefferts]
|
Enthusiast
Registered: 01/17/01
Posts: 449
|
> $h = strtolower(strftime ("%I", $tm)); <br /> <br />maybe: <br /> <br />$h = strtolower(strftime ("%H", $tm)); <br /> <br />But I am still working to catch all those time-things myself, for example in addevent.php, this format change needs to be done, i think: <br /> <br />$date_string = date("j. n. Y, G:i",mktime ($hour_convert,$min,0,$mon,$day,$year)); //HACK AMPM <br /> <br />
Edited by caymuc (08/02/02 09:08 PM)
_________________________
Carl Colour-Ize-Forums (test entry: user: 'test' pw: 'test2')
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#221133 - 09/26/02 07:44 AM
Re: Calendar v 3.0
[Re: Macthorn]
|
Power User
Registered: 04/10/02
Posts: 64
Loc: UK
|
when I run-<br /><br /> CREATE TABLE w3t_Events (<br /> E_ID int(9) DEFAULT '0' NOT NULL auto_increment,<br /> E_CalendarID int(9) unsigned DEFAULT '0' NOT NULL,<br /> E_Number int(9) DEFAULT '0' NOT NULL,<br /> E_Date int(11) unsigned DEFAULT '0' NOT NULL,<br /> E_Time int(11),<br /> E_Duration int(11) DEFAULT '0' NOT NULL,<br /> E_Recurring char(1) DEFAULT 'N' NOT NULL,<br /> E_Recurtype varchar(10),<br /> E_End int(11),<br /> E_Frequency int(11),<br /> E_Days varchar(7),<br /> E_Location text,<br /> PRIMARY KEY (E_ID),<br /> KEY E_CalendarID (E_CalendarID)<br />);<br /> <br /><br /><br />I get-<br /><br />Results from your SQL command <br /> <br />Here are the results of your command: "CREATE TABLE w3t_Events ( E_ID int(9) DEFAULT '0' NOT NULL auto_increment, E_CalendarID int(9) unsigned DEFAULT '0' NOT NULL, E_Number int(9) DEFAULT '0' NOT NULL, E_Date int(11) unsigned DEFAULT '0' NOT NULL, E_Time int(11), E_Duration int(11) DEFAULT '0' NOT NULL, E_Recurring char(1) DEFAULT 'N' NOT NULL, E_Recurtype varchar(10), E_End int(11), E_Frequency int(11), E_Days varchar(7), E_Location text, PRIMARY KEY (E_ID), KEY E_CalendarID (E_CalendarID) ); ".<br />SQL ERROR: Unable to do_query: CREATE TABLE w3t_Events ( E_ID int(9) DEFAULT '0' NOT NULL auto_increment, E_CalendarID int(9) unsigned DEFAULT '0' NOT NULL, E_Number int(9) DEFAULT '0' NOT NULL, E_Date int(11) unsigned DEFAULT '0' NOT NULL, E_Time int(11), E_Duration int(11) DEFAULT '0' NOT NULL, E_Recurring char(1) DEFAULT 'N' NOT NULL, E_Recurtype varchar(10), E_End int(11), E_Frequency int(11), E_Days varchar(7), E_Location text, PRIMARY KEY (E_ID), KEY E_CalendarID (E_CalendarID) ); <br />You have an error in your SQL syntax near '; ' at line 16 row(s) affected by your query. <br /> <br /> <br />
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#221146 - 11/07/02 11:34 AM
Proposed fix for timeoffset for Calendar 3.0
[Re: sari]
|
User
Registered: 06/18/02
Posts: 28
|
Here is a proposed change for the calendar to fix timeoffset issues.<br /><br />In postlist.php:<br />Look for<br />$h = strtolower(strftime ("%I", $tm));<br /><br />Add Above it:<br />$tm = strtotime($html -> convert_time($tm, $user['U_TimeOffset']));<br /><br />There should only be 2 entries.<br /><br />------------------------<br />In AddEvent.php<br /><br />Look For <br />$user = $userob -> authenticate("U_Username, U_Password,U_Signature,U_Picture,U_Groups,U_Display,U_Language,U_Totalposts,U_Title,U_Color,U_TempRead,U_TextCols,U_TextRows,U_EReplies,U_Preview,U_Number");<br /><br />Change it to<br />$user = $userob -> authenticate("U_Username, U_Password,U_Signature,U_Picture,U_Groups,U_Display,U_Language,U_Totalposts,U_Title,U_Color,U_TempRead,U_TextCols,U_TextRows,U_EReplies,U_Preview,U_Number, U_TimeOffset");<br /><br />Look for:<br />$ETime = mktime ($hour_convert, $min, 0, 0, 0, $year);<br /><br />Change it to:<br />$ETime = mktime ($hour_convert - $user['U_TimeOffset'], $min, 0, 0, 0, $year);<br /><br />And that's it. Then Timeoffset will work properly.
Edited by Lunatik (11/07/02 03:15 PM)
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#221153 - 12/07/02 10:06 AM
Re: Proposed fix for timeoffset for Calendar 3.0
[Re: sjsaunders]
|
Addict
Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
|
30-40 queries<br /><br />This is probably what you were seeing:<br /><br /><pre><font class="small">code:</font><hr>// loop through all the days of the month<br />while ( $d <= $lastday) {<br /> ...<br /> select E_ID,E_Date,E_Time,E_Location,B_Subject, B_Number, B_Replies<br /> FROM w3t_Events, w3t_Posts<br /> WHERE E_Date >= '$lowdate'<br /> AND E_Date < '$highdate'<br /> AND B_Number = E_Number<br /> AND B_Board = '$Board_q'<br /> ...<br />}</pre><hr><br /><br /><br />(This query originally was also selecting U_Username, but the username wasn't used anywhere, so I simply took it out, and there was no need to add a join to the users table.)<br /><br />Maybe that's what dimopoulos was talking about in his Fetching data in an array post.<br /><br />I suppose the query could be done before the loop, extracting the data for the whole month, and storing it in an associative array. Do you think it would make sense to do that?
Edited by Dave_L (12/07/02 10:13 AM)
_________________________
UBB.threads beta tester / threadsdev.com moderator Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#221162 - 12/08/02 05:00 PM
Re: Proposed fix for timeoffset for Calendar 3.0
[Re: sari]
|
Addict
Registered: 04/23/02
Posts: 1929
Loc: Virginia, USA
|
Re: fixing the time offset<br /><br />I assume this refers to making the date/times for events always display in the user's time zone, while being stored in the database in the server's time zone?<br /><br />If so, there are a number of changes required in addition to the above. <br /><br />But I'm wondering if it's desirable to make these time zone adjustments.<br /><br />Scenario 1:<br /><br />I'm using the calendar to announce a meeting in an IRC chatroom on Jan 15 at 6PM my time. In this case, the time zone adjustment is appropriate, since I want other users to see the date/time displayed in their time zone.<br /><br />Scenario 2:<br /><br />Same as above, except I'm going to be in another city in another time zone on Jan 15. Hmmm ... this gets trickier. I'll have to take into account the difference between the time zone I'm in now, and the one I'll be in on Jan 15.<br /><br />Scenario 3:<br /><br />I'm using the calendar to announce a rock-climbing event at Devil's Tower, Wyoming on July 7 at noon. Obviously, everyone attending the event will be in the same time zone, and the date/time should be displayed in the time zone for Devil's Tower, regardless of what time zone users are in now. So in this case, it's preferable that no time zone conversion be done.<br /><br />Any suggestions? Should this hack be left as it is now, with no time zone corrections?
_________________________
UBB.threads beta tester / threadsdev.com moderator Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|