Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Newcalendar 3.9 (Read 1945 times)
ironwing
God Member
*****
Offline


I love YaBB 1 Gold!

Posts: 2330
Location: Sonoran Desert
Joined: Nov 20th, 2001
Newcalendar 3.9
Dec 25th, 2004 at 12:28am
Print Post  
Newcalendar 3.9 is now in the mod database.  This version works with SP 1 through SP 1.4 forums.

Changes from 3.8:
New mod file for SP 1.3.2 and 1.4 forums.
Added ability to change Event Name field length in Admin Center.
Fixed birthday bug in SP 1.1 mod file.

See Newcalendar Help File for complete list of features.

Dan
  

Please include your forum address in all requests for assistance.  It greatly speeds things along.
Back to top
WWW  
IP Logged
 
Pages from Sages
New Member
*
Offline


30 mods and adding more...

Posts: 40
Location: Alkmaar
Joined: Aug 18th, 2004
Gender: Male
Re: Newcalendar 3.9
Reply #1 - Dec 27th, 2004 at 8:33pm
Print Post  
Hello Dan,

With the end of the year coming, year-bug are known to be detected. In version 3.8 I found one... When selecting an event for the new year (2005 that is), Newvalendar jumps to that date in the current year (not showing the requested event next year). I took the liberty to change NewcalIndex.pl from

Code
Select All
### end group stuff for SSI
							if ($itemcount == 0) {
								$data2 = $data2 . qq~<LI>$daydata[1]:&nbsp;<A HREF="$scripturl?action=newcalendar&selmonth=$thismonth&selday=$thisdaymonth&selyear=$thisyear&acttype=viewdata">$daydata[0]</A>~;
								$itemcount++;
							} else {
								$data2 = $data2 . qq~,&nbsp;<A HREF="$scripturl?action=newcalendar&selmonth=$thismonth&selday=$thisdaymonth&selyear=$thisyear&acttype=viewdata">$daydata[0]</A>~;
								$itemcount++;
							}
 



into

Code
Select All
### end group stuff for SSI

if ($thismonth < $today[4]) { $thisevyear=$thisyear+1; } else { $thisevyear=$thisyear; }

							if ($itemcount == 0) {
								$data2 = $data2 . qq~<LI>$daydata[1]:&nbsp;<A HREF="$scripturl?action=newcalendar&selmonth=$thismonth&selday=$thisdaymonth&selyear=$thisevyear&acttype=viewdata">$daydata[0]</A>~;
								$itemcount++;
							} else {
								$data2 = $data2 . qq~,&nbsp;<A HREF="$scripturl?action=newcalendar&selmonth=$thismonth&selday=$thisdaymonth&selyear=$thisevyear&acttype=viewdata">$daydata[0]</A>~;
								$itemcount++;
							}
 



With this code-change the NewCalendar keeps track of the current year by comparing the month (11 - december) with the event. If the month of the event is lower than the current month, the event must take place in the coming year.

Kind regards,
Alex
  

Fantasy is not a hobby, but a lifestyle!

Back to top
WWWICQ  
IP Logged
 
ironwing
God Member
*****
Offline


I love YaBB 1 Gold!

Posts: 2330
Location: Sonoran Desert
Joined: Nov 20th, 2001
Re: Newcalendar 3.9
Reply #2 - Dec 27th, 2004 at 8:52pm
Print Post  
Thanks, I'll add that to 3.91 which I'm already working on.  Version 3.91 will be a bug fix and also an attempt to make the mod output standards-compliant HTML.

Dan
  

Please include your forum address in all requests for assistance.  It greatly speeds things along.
Back to top
WWW  
IP Logged
 
fruitshoot
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 8
Joined: Jan 22nd, 2005
Re: Newcalendar 3.9
Reply #3 - Jan 23rd, 2005 at 9:04pm
Print Post  
I cant get this to work in my 1.3.2 forum  Sad
  
Back to top
 
IP Logged
 
CdnPaperMoney
New Member
*
Offline



Posts: 32
Location: Brooklin
Joined: Jan 30th, 2002
Gender: Male
Re: Newcalendar 3.9
Reply #4 - Feb 12th, 2005 at 5:23pm
Print Post  
I'm sorry to say that I too have been unable to get this (3.8 or 3.9) to work on all three of my YaBB forums (1.3.2 and 1.4). I've been running versions of Newcalendar for years, but as of January 2005, it seemed to blow up.

Here's the result I get (similar on all three):
http://www.cdnpapermoney.com/cgi-bin/yabb/YaBB.pl?board=;action=newcalendar

Any ideas what I do so consistantly wrong?
  
Back to top
WWW  
IP Logged
 
ironwing
God Member
*****
Offline


I love YaBB 1 Gold!

Posts: 2330
Location: Sonoran Desert
Joined: Nov 20th, 2001
Re: Newcalendar 3.9
Reply #5 - Feb 13th, 2005 at 3:44am
Print Post  
Strange things happening here.

I played with your calendar quite a bit and there seems to be a problem with perl's date calculations on your server.  Do you have any odd settings for the default time zones or are you aware if your webhost transferred your domain from server to server?  What is happening is that the date being returned by the perl timegm function on your forum is off by a day.

I entered an event on Feb 24th:

Quote:


If you click the link above you will see the event, but note the date which is given as the 23rd.  Somehow the date is getting knocked back a day.  You'll note that all the calendar function work except anytime that the days of the month are being listed out.  This is because when the dates are knocked back a day, the first day of the month is now returning a time/date index prior to the beginning of the month and the script knows to stop counting days when it reaches a date outside the current month so it stops with the very first date (instead of the first date past the end of the month as normal).

If you check this link you will see what I mean.
Quote:


Month 0 is January
Day 1 is the 1st of the month so this link should go to Jan 01, 2005.  But since your perl is returning dates one day early the link goes to Dec 31, 2004.

Your best bet is to see if you can fix your server or perl install.  I have no idea why this error occurs.

If you can't find a way to fix that then try this:
Everywhere you find this line:
Code
Select All
		my($thisdaysecs) = timegm(0,0,0,1,$thismonth,$thisyear); 


change it to:
Code
Select All
		my($thisdaysecs) = timegm(0,0,0,2,$thismonth,$thisyear); 



This will bump up the date by one day.  You will need to modify the NewcalMonth.pl, NewcalYear.pl, NewcalIndex.pl, and NewcalPost.pl files.  I think this should fix it but I'm concerned events might now show up but be bumped to the wrong date.  Let me know and we'll keep hammering at it.

Dan
  

Please include your forum address in all requests for assistance.  It greatly speeds things along.
Back to top
WWW  
IP Logged
 
CdnPaperMoney
New Member
*
Offline



Posts: 32
Location: Brooklin
Joined: Jan 30th, 2002
Gender: Male
Re: Newcalendar 3.9
Reply #6 - Feb 13th, 2005 at 7:13pm
Print Post  
Yes, all the sites where moved recently to a new server. Good call, I'm sure that didn't come after a few minutes of work. I appreciate your considerable efforts.

I'll see what I can do and get back to you.

Updated: The time and date on the server is correct, but I don't know how to check the "timegm" function. I do have access to the shell, but I don't know perl. Is there a script I could run to help figure out the problem?

More: I did find reference to the perl version that the server has. It's running 5.8.6 and lists the command "gmtime". Is this the same as "timegm"?
  
Back to top
WWW  
IP Logged
 
ironwing
God Member
*****
Offline


I love YaBB 1 Gold!

Posts: 2330
Location: Sonoran Desert
Joined: Nov 20th, 2001
Re: Newcalendar 3.9
Reply #7 - Feb 14th, 2005 at 2:29am
Print Post  
The timegm function is not the same as the gmtime function, in fact it is the inverse of the gmtime function.  gmtime takes a time index and returns a human readable date and time array.  The timegm function takes a human readable time date array and returns a time index (seconds since Jan 01, 1970 or seconds since Jan 01, 1900 depending on operating system and perl version).

The time gm function is part of the Time::Local perl module.  This is a standard perl module.

Dan
  

Please include your forum address in all requests for assistance.  It greatly speeds things along.
Back to top
WWW  
IP Logged
 
CdnPaperMoney
New Member
*
Offline



Posts: 32
Location: Brooklin
Joined: Jan 30th, 2002
Gender: Male
Re: Newcalendar 3.9
Reply #8 - Feb 14th, 2005 at 3:38pm
Print Post  
Thanks Dan, I figured as much, but wasn't sure.

I got this message back from the host support desk:
Quote:
We have rebuilt the perl module on the server,  please re-check your calendar now.  Thanks


Unfortunately, the calendars still are not working.
  
Back to top
WWW  
IP Logged
 
CdnPaperMoney
New Member
*
Offline



Posts: 32
Location: Brooklin
Joined: Jan 30th, 2002
Gender: Male
Re: Newcalendar 3.9
Reply #9 - Feb 20th, 2005 at 2:01am
Print Post  
Ok everyone, I moved all the sites to a new server and everything is working fine. Just as Dan said, there was something wrong with the perl install on the old server.

Now I just have to wait until a YaBB2 version comes out...
« Last Edit: Feb 21st, 2005 at 3:57pm by CdnPaperMoney »  
Back to top
WWW  
IP Logged
 
ironwing
God Member
*****
Offline


I love YaBB 1 Gold!

Posts: 2330
Location: Sonoran Desert
Joined: Nov 20th, 2001
Re: Newcalendar 3.9
Reply #10 - Feb 21st, 2005 at 3:24pm
Print Post  
Glad you got it working.   Smiley

Dan
  

Please include your forum address in all requests for assistance.  It greatly speeds things along.
Back to top
WWW  
IP Logged
 
dmjendor
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 36
Joined: Apr 20th, 2004
Re: Newcalendar 3.9
Reply #11 - Mar 11th, 2005 at 8:08pm
Print Post  
How can I set the mini-calender that appears on the front page to display the day/letter of the week at the top of the calendar.  Ie.  S | M | T | W | T | F | S
  
Back to top
 
IP Logged
 
Mark Brookes
Guest


Re: Newcalendar 3.9
Reply #12 - Mar 16th, 2005 at 10:39am
Print Post  
dmjendor wrote on Mar 11th, 2005 at 8:08pm:
How can I set the mini-calender that appears on the front page to display the day/letter of the week at the top of the calendar.  Ie.  S | M | T | W | T | F | S


I'd Like to know this too .... if anyone an tell us.
  
Back to top
 
IP Logged
 
villain1899
Guest


Re: Newcalendar 3.9
Reply #13 - Mar 24th, 2005 at 3:09am
Print Post  
Hey,

Newcalendar has been working great so far. Question about reoccuring "repeat for" dates though.

In the drop down it has "3rd Tuesday"...so I could set a calendar item to display the 3rd Tuesday of every month.

Is there a way to add things like this? For example, I'd like to add "1st Thursday" of every month and have an event repeat the 1st Thursday of every month.

Thanks!
  
Back to top
 
IP Logged
 
sioc
New Member
*
Offline


I love YaBB 1G - SP1.2!

Posts: 16
Location: Köln
Joined: Mar 28th, 2005
Gender: Male
Re: Newcalendar 3.9
Reply #14 - Apr 3rd, 2005 at 11:34pm
Print Post  
I need a german tranlation!!

if any one has please send it to me !!! :whip:


sioc@colognebay.de

Thanx a lot

da sioc
  
Back to top
WWWICQ  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint