[MODDB] Advanced time management 2.0.1

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
I-S-S
Registered User
Posts: 11
Joined: Fri Jul 18, 2003 10:01 pm

error

Post by I-S-S »

Hi, I have installed the Daylight Saving Time management 1.1.1 but when I try to update my profile, I got this error.

Could not update users table

DEBUG MODE

SQL Error : 1054 Unknown column 'user_dst_mode' in 'field list'

UPDATE phpbb_users SET user_email = 'silee@thefrenz.com', user_icq = '6478879', user_website = 'http://www.thefrenz.com', user_occ = 'student', user_from = 'California', user_from_flag = 'usa.gif', user_interests = 'research', user_birthday='4912', user_next_birthday_greeting='2004', user_viewemail = 1, user_aim = 'icysmarty', user_yim = 'clairelee_83', user_msnm = 'clairelsi@msn.com', user_attachsig = 1, user_allowsmile = 1, user_allowhtml = 1, user_allowbbcode = 1, user_allow_viewonline = 1, user_notify = 0, user_notify_pm = 1, user_popup_pm = 1, user_timezone = -8, user_dst_mode = 0, user_dst_time_lag = 0, user_dateformat = 'D d M, Y g:i a', user_lang = 'english', user_style = 4, user_active = user_active, user_actkey = user_actkey, user_gender=2 WHERE user_id = 2

Line : 529
File : c:\websites\thefrenz\httpdocs\phpbb2\includes\usercp_register.php


LIne 529 is

message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);

please help!

User avatar
vze3k59w
Registered User
Posts: 485
Joined: Fri May 09, 2003 1:09 am

Post by vze3k59w »

did you run the install file?
Wanna join a very advanced OO based modular port of phpBB? PM me :)

mr.luc
Registered User
Posts: 213
Joined: Mon Feb 24, 2003 4:09 pm
Contact:

Post by mr.luc »

ok ok.. i'm lazy.. but..
i have 1.1.0 installed and would like to do an upgrade to 1.1.1

it seems that the upgrade description is only for 1.0.1 and lower...

well i will do a file compare tomorow...

I-S-S
Registered User
Posts: 11
Joined: Fri Jul 18, 2003 10:01 pm

Post by I-S-S »

vze3k59w wrote: did you run the install file?



Thank you dude. You reminded me of that file. Actually I ran the wrong install file. Instead of running the update file, I ran the upgrade file.

Alright, there is no error now but I discovered a very weird behavior. When I click my own profile and try to change the avatar, I click the drop down list to select a different category but guess what, when I click "go", I was brought to the profile page again with the message at the top asking me "You must fill in the required fields.
DST time lag value error. You must type a number of minutes between 0 and 120. " Before I choose the new category of avatar, the DST time lag value was 60 as I set before.

After this message appeared, the column in the DST time lag " D d M, Y g:i a"

What is wrong this time?

User avatar
-=ET=-
Registered User
Posts: 770
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- »

I-S-S wrote: After this message appeared, the column in the DST time lag " D d M, Y g:i a"

What is wrong this time?

Which MOD did you apply (not only the db update/upgrade file)?
The full one or just the upgrade one?

I think you missed some instructions.
Check carefully ALL the instructions in usercp_avatar.php & inludes/usercp_register.php :)
Last edited by -=ET=- on Fri Aug 22, 2003 11:54 am, edited 1 time in total.
Eternal newbie

User avatar
-=ET=-
Registered User
Posts: 770
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- »

Edited : error
Eternal newbie

User avatar
-=ET=-
Registered User
Posts: 770
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- »

mr.luc wrote: i have 1.1.0 installed and would like to do an upgrade to 1.1.1

Upgrade the code of functions.php, page_header.php and overall_header.tpl, and copy the new language messages file(s) :wink:
Eternal newbie

mr.luc
Registered User
Posts: 213
Joined: Mon Feb 24, 2003 4:09 pm
Contact:

Post by mr.luc »

works fine !!!
thanks!

of course you know what would be very elegant??? :wink:

to have a few more admin options:

1. override user settings:
if for example option 4 or 5 are selected by admin, you can set a button to override the usersettings.

2. if usersettings are overridden, the user panel for dst and for timezone are hidden to user..

why would someone want to do that?
because here.. its a programming community.. all users like to have as many functions as possible.

I'm just creating a dating community.. some users there don't even know what a timezone is.. they are happy if they manage to register.. so i want to keep options as easy as possible.

I'll post what i come up with.. but i'm just customizing a chat.. so it will take a couple of weeks..

but your solution is really the best!!!

Luc

I-S-S
Registered User
Posts: 11
Joined: Fri Jul 18, 2003 10:01 pm

Post by I-S-S »

Which MOD did you apply (not only the db update/upgrade file)?
The full one or just the upgrade one?

I think you missed some instructions.
Check carefully ALL the instructions in usercp_avatar.php & inludes/usercp_register.php :)


I am applying the full copy of the dst 1.1.1.

Yeah you are right, I try to check over again and again but I think it is hard to check than to re-modify.

I get two new copies of user_avatar.php and usercp_register.php and followed the instructions all over again, when I upload those two files, I saw the difference between the new user_avatar.php and the old user_avatar.php. For the usercp_register, everything is the same.

Now the problem solved.. thank you man.

User avatar
-=ET=-
Registered User
Posts: 770
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- »

mr.luc wrote: 1. override user settings:
if for example option 4 or 5 are selected by admin, you can set a button to override the usersettings.

2. if usersettings are overridden, the user panel for dst and for timezone are hidden to user..

OK for the 1st suggest but for the second one, if some users disable Javascript, the 4th & 5th modes will not work anymore so they need to be able to use another option :)
I-S-S wrote: when I upload those two files, I saw the difference between the new user_avatar.php and the old user_avatar.php.

Then in fact, you just forget to apply the instructions to usercp_avatar.php, right? :)
Eternal newbie

I-S-S
Registered User
Posts: 11
Joined: Fri Jul 18, 2003 10:01 pm

Post by I-S-S »

I did apply the setting for user_avatar.php, but what I suspect is something is missing. Maybe when I cut and paste, something was deleted as the difference between the new and old copies is only 2 kb

User avatar
Carpe Diem
Registered User
Posts: 580
Joined: Tue Dec 10, 2002 11:19 pm

Post by Carpe Diem »

Hello ET!

I would like to ask a question. You see I have another DST daylight saving time mod (a very easy one actually) installed by another author which seems to be working though pretty well.

The problem is that recently I wanted to have a script for a digital live clock on my board. The code is as it follows below. The problem is that this live clock mod is not affected by that DST daylight saving time mod I have aldready installed. So a "normal" time display as phpbb does is correct by that mod, but this live digital clock does not.

Now my question is, would you please look at this digital clock mod and let me know, that if I was to install your DST daylight saving time mod, can it somehow be implemented so that I also can get this script of the live clock thingy to work with your mod?

Here is the DST daylight saving time mod that I'm using:

Code: Select all

# 
#-------[ FIND ]----------------------------------------- 
# 
   return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz)); 
# 
#------[ REPLACE WITH ]---------------------------------- 
# 
// Fix for Daylight Savings Time 
    $dst = date('I', $gmepoch) * 3600; 

   return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz) + $dst), $translate) : @gmdate($format, $gmepoch + (3600 * $tz) + $dst); 
# 
#------{ SAVE/CLOSE ALL FILES ]-------------------------- 
# 
# EoM 
And here is the javascript digital clock mod:

Code: Select all

          <script> 

         var dayarray=new Array("Sun","Mon","Tues","Wed","Thur","Fri","Sat") 
         var montharray=new Array("January","February","March","April","May","June","July","August","September",
"October","November","December") 

         function getthedate() 
         { 
            var mydate=new Date() 
            var year=mydate.getYear() 
             
            if (year < 1000) 
               year+=1900 
    
            var day=mydate.getDay() 
            var month=mydate.getMonth() 
            var daym=mydate.getDate() 

            if (daym<10) 
               daym="0"+daym 
             
            var hours=mydate.getHours() 
            var minutes=mydate.getMinutes() 
            var seconds=mydate.getSeconds() 
            var dn="AM" 

            if (hours>=12) 
               dn="PM" 
             
            if (hours>12) 
               { 
                  hours=hours-12 
               } 

            if (hours==0) 
               hours=12 

            if (minutes<=9) 
               minutes="0"+minutes 

            if (seconds<=9) 
               seconds="0"+seconds 

            //change font size here 
            var cdate=(dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn) 
       
            if (document.all) 
               document.all.clock.innerHTML=cdate 
          
            else if (document.getElementById) 
               document.getElementById("clock").innerHTML=cdate 
          
            else 
               document.write(cdate) 
         } 

         if (!document.all&&!document.getElementById) 
            getthedate() 
          
         function goforit() 
         { 
            if (document.all||document.getElementById) 
               setInterval("getthedate()",1000) 
         } 

</script> 
<span id="clock"></span> 

and then in the overall_header.tpl, in the <body> tag, this should be added:

onLoad="goforit()"
Many thx in advance!

User avatar
-=ET=-
Registered User
Posts: 770
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- »

OK.

No my MOD will affect the time of this digital clock.
But this digital clock does NOT need to be affected.

This code is a JS script, so it takes its time on the user's PC.
Then, if the user's PC manage DST, this clock will be on time without anything to change.

If you want to verify, put that code in a file you call clock.html and run it :)

Code: Select all

<head>
<script> 

         var dayarray=new Array("Sun","Mon","Tues","Wed","Thur","Fri","Sat") 
         var montharray=new Array("January","February","March","April","May","June","July","August","September", 
"October","November","December") 

         function getthedate() 
         { 
            var mydate=new Date() 
            var year=mydate.getYear() 
              
            if (year < 1000) 
               year+=1900 
    
            var day=mydate.getDay() 
            var month=mydate.getMonth() 
            var daym=mydate.getDate() 

            if (daym<10) 
               daym="0"+daym 
              
            var hours=mydate.getHours() 
            var minutes=mydate.getMinutes() 
            var seconds=mydate.getSeconds() 
            var dn="AM" 

            if (hours>=12) 
               dn="PM" 
              
            if (hours>12) 
               { 
                  hours=hours-12 
               } 

            if (hours==0) 
               hours=12 

            if (minutes<=9) 
               minutes="0"+minutes 

            if (seconds<=9) 
               seconds="0"+seconds 

            //change font size here 
            var cdate=(dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn) 
        
            if (document.all) 
               document.all.clock.innerHTML=cdate 
          
            else if (document.getElementById) 
               document.getElementById("clock").innerHTML=cdate 
          
            else 
               document.write(cdate) 
         } 

         if (!document.all&&!document.getElementById) 
            getthedate() 
          
         function goforit() 
         { 
            if (document.all||document.getElementById) 
               setInterval("getthedate()",1000) 
         } 

</script> 
<span id="clock"></span>

</head>
<body onLoad="goforit()">
P.S.: be careful with the fix you've installed, it will work only in very precise cases. In many case it won't work.
http://phpbb.com/phpBB/viewtopic.php?p=654764#654764
Last edited by -=ET=- on Thu Sep 04, 2003 1:46 am, edited 1 time in total.
Eternal newbie

User avatar
Carpe Diem
Registered User
Posts: 580
Joined: Tue Dec 10, 2002 11:19 pm

Post by Carpe Diem »

-=ET=- wrote: OK.

No my MOD will affect the time of this digital clock.
But this digital clock does NOT need to be affected.

This code is a JS script, so it takes its time on the user's PC.
Then, if the user's PC manage DST, this clock will be on time without anything to change.


Aha! Well I knew it was a javascript of course but I didn't know it took its value from the user's PC.

But if so, then even if I would install your mod, and still have this javascript live clock installed too, then it wouldn't make any difference since this javascript takes its value from the user's PC.. right? I mean if the user's PC does not handle the DST time then it doesn't matter what DST correction mod I have installed, it would still be limited by the user's computer!

Or am I missing something?

User avatar
-=ET=-
Registered User
Posts: 770
Joined: Sun May 25, 2003 5:32 pm

Post by -=ET=- »

Every current OS can manage DST.
It's just set on, "on" or "off", nothing else.

Your clock is fully independant from phpBB and it will always be synchronized with the time of the user's computer.

But!
The time of your board will NOT be affected by this clock! It's time is taken from the server and your clock will not change anything.

So you will still need to install a MOD/FIX to manage DST for your board times.
Eternal newbie

Locked

Return to “[2.0.x] MODs in Development”