CZUsers info V4 Time settings

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   CZUsers info V4 Time settings
kishkuman
CZ Newbie
kishkuman has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Sep 04, 2004
0.00 posts per day
Posts: 4
Points: 342
   
How do u set the time settings on the CZUsers info V4 it is always wrong, it will say
"Good Morning xxxx" when it is really night and vice versa.



Back to top Reply with quote
#2   re: CZUsers info V4 Time settings
64bitguy
CZ Super Newbie
64bitguy has been a member for over 20 year's 20 Year Member
usa.gif newhampshire.gif
Occupation: IT Guru, IT Portal Operator
Website:
Status: Offline
Joined: Sep 04, 2004
0.00 posts per day
Posts: 34
Points: 2,699
   
That particular block I believe uses your established server time for determining how the guest/user is greeted. The following formula is applied:

global $user, $userinfo, $cookie;
      cookiedecode($user);
      $urname = $cookie[1];
      $date = date ("H");
      if ($date < 11) {
      $gr = ""._CZ_GOODMORNINGUSER."$urname\n";
      } else if ($date < 17) {
      $gr = ""._CZ_GOODAFTERNOONUSER."$urname\n";
      } else if ($date < 23) {
      $gr = ""._CZ_GOODEVENINGUSER."$urname\n";
      } else {
      $gr = ""._CZ_GOODMORNINGUSER."$urname\n";


You should check your reported server time to ensure that it is properly reporting the time and date.

Some modules use a different method that allows you to set the time and date in the block, such as this example (taken from the "Protector" Site Info Block)

// calculate server date/time
if ($CONF['showServer'] || ($CONF['showServerAdmin'] && $CONF['is_admin'])) {
   $server_time = date("j F Y\nH:i:s T");
   $zone        = date("Z")/3600;
   if ($zone >= 0) {
      $zone = "+".$zone;
   }
    $block_foot =  '<hr noshade="noshade" /><div align="center">'
        . _PSSERVDT . ": <br />$server_time (GMT $zone)</div><br />";
} else {
    $block_foot = '';
}


This allows you to adjust your clock accordingly (in case your server is in a totally different place and time than you want it to be).

If you get really frustrated with it, you can always just change the messages (listed in the first part of this post) to "Welcome" which takes the whole time/date thing right out of the picture.

If you use that last section of code I listed in your existing block code, be sure to define the _PSSERVDT in your language file as "Server Date/Time:".

As so many users fail to adjust their time (to what the server time is) in their "Your_Account" properties, 99% of the time, they will see the wrong message, especially if they are in a substantially different timezone from the server. That's why mine just says, "Welcome".

Hope that helps!

Steph [ Register or login to view links on this board. ]
The IT Portal for IT People!
[ Register or login to view links on this board.]


Back to top Reply with quote
#3   re: CZUsers info V4 Time settings
kishkuman
CZ Newbie
kishkuman has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Sep 04, 2004
0.00 posts per day
Posts: 4
Points: 342
   
Hey I like the idea of just changing all of the enteries to Welcome
If I change the

$gr = ""._CZ_GOODMORNINGUSER."$urname\n";

to

$gr = ""._CZ_Welcome."$urname\n";

I get

WelcomeGeorge it doesnt have a space or new line which ever it needs.



Back to top Reply with quote
#4   Re: re: CZUsers info V4 Time settings
64bitguy
CZ Super Newbie
64bitguy has been a member for over 20 year's 20 Year Member
usa.gif newhampshire.gif
Occupation: IT Guru, IT Portal Operator
Website:
Status: Offline
Joined: Sep 04, 2004
0.00 posts per day
Posts: 34
Points: 2,699
   


Originally posted by kishkuman @ Tue Sep 07, 2004 6:53 am:

Hey I like the idea of just changing all of the enteries to Welcome
If I change the

$gr = ""._CZ_GOODMORNINGUSER."$urname\n";

to

$gr = ""._CZ_Welcome."$urname\n";

I get

WelcomeGeorge it doesnt have a space or new line which ever it needs.


You need to open your language file and creaete a new entry:
define("_CZ_Welcome","Welcome ");


Or you can simply find the others in your language file and change all of the second quote parts to "Welcome "

IE... define("_CZ_GOODMORNING","Welcome ");
etc.... Thus, you wouldn't have to change any of the code itself, just the language definitions.


Back to top Reply with quote
#5   re: CZUsers info V4 Time settings
kishkuman
CZ Newbie
kishkuman has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Sep 04, 2004
0.00 posts per day
Posts: 4
Points: 342
   
Ok,

I did It I didnt know about the language file

Thanks for your help it works fine now.



Back to top Reply with quote
#6   re: CZUsers info V4 Time settings
64bitguy
CZ Super Newbie
64bitguy has been a member for over 20 year's 20 Year Member
usa.gif newhampshire.gif
Occupation: IT Guru, IT Portal Operator
Website:
Status: Offline
Joined: Sep 04, 2004
0.00 posts per day
Posts: 34
Points: 2,699
   
Cool!

Glad I could help!

Steph [ Register or login to view links on this board. ]
The IT Portal for IT People!
[ Register or login to view links on this board.]



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum