Kalender 1.03
Re: Kalender 1.03
Okay, i got this all working. but it does one thing that I don't like.
I have it output the big calendar. above it, it says ">" when its on Augusts calendar. Any body could you give me a little more insite on this module, I tried to follow the english pdf. but I just have trouble, I am used to english code, nothing wrong with this code I just cant read it.
Oh, the working page. http://monsterden.com/home/page?=calendar
I have it output the big calendar. above it, it says ">" when its on Augusts calendar. Any body could you give me a little more insite on this module, I tried to follow the english pdf. but I just have trouble, I am used to english code, nothing wrong with this code I just cant read it.
Oh, the working page. http://monsterden.com/home/page?=calendar
Re: Kalender 1.03
The correct URL should be: http://monsterden.com/home/index.php?page=calendar
Re: Kalender 1.03
about 'Juli' showing up in august.
2 things,
1/ it did that on mine, and it doesn't appear to be using the default language settings correctly for some reason
2/ around line 1038 in Kalendar.module.php, this line appears
$month_name=$this->lang['m'.date('n', $first_of_month)];
now, i did a bit of debugging by echoing the output of some of the function calls before this.
$first_of_month is a UMC unix time stamp. Today, on aug 3rd on the US West coast, this was still spitting out a 7 for the date('n', $first_of_month) portion of this line.
Why, i don't know.
this is supposed to access the month array from the language file for the module, where months are represented by the letter 'm' and the month number, with no leading 0.
because the parameters that were used to build $first_of_month were correct, i simple commented out the $month_name line and add a line after it like this:
$month_name=$this->lang['m'.trim($month,'0')]; // use the trim function, because i have PHP > 4.1.0
this yields the correct month for display on your calendar, for now.
when Piratos comes back, he will hopefully offer a proper explanation and fix.
2 things,
1/ it did that on mine, and it doesn't appear to be using the default language settings correctly for some reason
2/ around line 1038 in Kalendar.module.php, this line appears
$month_name=$this->lang['m'.date('n', $first_of_month)];
now, i did a bit of debugging by echoing the output of some of the function calls before this.
$first_of_month is a UMC unix time stamp. Today, on aug 3rd on the US West coast, this was still spitting out a 7 for the date('n', $first_of_month) portion of this line.
Why, i don't know.
this is supposed to access the month array from the language file for the module, where months are represented by the letter 'm' and the month number, with no leading 0.
because the parameters that were used to build $first_of_month were correct, i simple commented out the $month_name line and add a line after it like this:
$month_name=$this->lang['m'.trim($month,'0')]; // use the trim function, because i have PHP > 4.1.0
this yields the correct month for display on your calendar, for now.
when Piratos comes back, he will hopefully offer a proper explanation and fix.
Re: Kalender 1.03
It fixed it in IE for the users view, added a bunch of errors on the admin side(ie + firefox), and messed up the layout like css didnt load in firefox.
I changed it back, but i need to get this fixed.
I changed it back, but i need to get this fixed.
Re: Kalender 1.03
That's odd. it didn't cause any of those problems on my install.
the admin works fine in both firefox and IE for me.
I am not sure how that change could possibly mess all that stuff up.
all it does is change where the number for the month comes from.
the old line returned a 7 where it should have been an 8
and the new line returns an 8 where it is supposed to.
double check that all parentheses are paired up correctly.
there may be some way that such a little change caused a big problem, i just don't know. I am not piratos
Hope he gets back soon to chime in on this.
Even though it works for me, i too would prefer a fix from the author, someone who really knows what is going on in the code.
the admin works fine in both firefox and IE for me.
I am not sure how that change could possibly mess all that stuff up.
all it does is change where the number for the month comes from.
the old line returned a 7 where it should have been an 8
and the new line returns an 8 where it is supposed to.
double check that all parentheses are paired up correctly.
there may be some way that such a little change caused a big problem, i just don't know. I am not piratos

Hope he gets back soon to chime in on this.
Even though it works for me, i too would prefer a fix from the author, someone who really knows what is going on in the code.
Re: Kalender 1.03
I tried it again, thinkin' maybe i screwed it up with a " or ', but I didn't think I did, now its workin... right, your fix works.. aiight thanks
Re: Kalender 1.03
glad it's working for you.
i hope piratos can look at it soon though, i feel awful 'kludgy' about the fix.
Not sure if there was a reason he was converting to gmtime and then trying to extract the month out of that.
And i still don't understand why that wasn't working.
I also don't know how many places in the code that type of fix might be necessary in.
that only fixes it for that layout as far as i know.
i hope piratos can look at it soon though, i feel awful 'kludgy' about the fix.
Not sure if there was a reason he was converting to gmtime and then trying to extract the month out of that.
And i still don't understand why that wasn't working.
I also don't know how many places in the code that type of fix might be necessary in.
that only fixes it for that layout as far as i know.
Re: Kalender 1.03
how can i display events of a specific category on a page? what's the according variable?
Re: Kalender 1.03
I think the reason the PHP line above "broke" the Kalendar is that it is trimming the 0 even in October. I changed my line to [glow=yellow,2,300]$month_name=$this->lang['m'.ltrim($month,'0')];[/glow] and it seems to work now.
If you comment out the line [glow=yellow,2,300]$month_name=$this->lang['m'.date('n', $first_of_month)];[/glow] in the two places it appears in the file and add the line above below it both large and small calendars work.
Thanks to dingonv for tracking down the original error and writing the fix.
If you comment out the line [glow=yellow,2,300]$month_name=$this->lang['m'.date('n', $first_of_month)];[/glow] in the two places it appears in the file and add the line above below it both large and small calendars work.
Thanks to dingonv for tracking down the original error and writing the fix.
Last edited by JoshuaBarnette on Tue Aug 09, 2005 8:59 pm, edited 1 time in total.
Re: Kalender 1.03 - Style Issue
I am integrating the Kalendar into a customer's site and whenever the calendar generates, no matter whether there is an event that day or not, the class for the is "kal_gr_tabelle_td_termin" I have tried several things to resolve the issue, but to no avail. Everything is working correctly on the small calendar, it is just the big one that is erroring.
Any help is greatly appreciated.
Thanks in advance,
Joshua
Any help is greatly appreciated.
Thanks in advance,
Joshua
Re: Kalender 1.03
Very good point joshua, that totall slipped my mind, but would have reared it's ugly head in a couple of months 
is anyone else having a problem of always seeing the german localization?
it's annoying me a bit.

is anyone else having a problem of always seeing the german localization?
it's annoying me a bit.
JoshuaBarnette wrote: I think the reason the PHP line above "broke" the Kalendar is that it is trimming the 0 even in October. I changed my line to [glow=yellow,2,300]$month_name=$this->lang['m'.ltrim($month,'0')];[/glow] and it seems to work now.
If you comment out the line [glow=yellow,2,300]$month_name=$this->lang['m'.date('n', $first_of_month)];[/glow] in the two places it appears in the file and add the line above below it both large and small calendars work.
Thanks to dingonv for tracking down the original error and writing the fix.
Re: Kalender 1.03
Ok... um.
Well this is the deal I changed that line quoted above
like so in both spots on the "Kalendar.module.php" file like so.
// $month_name=$this->lang['m'.date('n', $first_of_month)];
$month_name=$this->lang['m'.trim($month,'0')]; // use the trim function, because i have PHP > 4.1.0
//jace
and now.. it trims the 0's off it seems still so I have an event in Oct.. but shows like Janurary... and My Nov ones arent coming up..
Please get back to me on this I don't know why its doing this.
Well this is the deal I changed that line quoted above
like so in both spots on the "Kalendar.module.php" file like so.
// $month_name=$this->lang['m'.date('n', $first_of_month)];
$month_name=$this->lang['m'.trim($month,'0')]; // use the trim function, because i have PHP > 4.1.0
//jace
and now.. it trims the 0's off it seems still so I have an event in Oct.. but shows like Janurary... and My Nov ones arent coming up..
Please get back to me on this I don't know why its doing this.
Re: Kalender 1.03
As Piratos seems to have jumped ship I'd suggest no longer pursuing this module in its current form.
Looks like we need a new champion to take up the gauntlet and run with it. An events module is just SUCH a cool thing.
Looks like we need a new champion to take up the gauntlet and run with it. An events module is just SUCH a cool thing.
Re: Kalender 1.03
Hmm, Piratos quit?
Anyway, I fixed the bug (?) where the calender wasn't showed when there was no event for that month and thus no navigators. This would make some events unavailable when there are no events in a month before.
Open up Kalender.module.php with your favorite editor and go to line 906. You should see:
Comment out the this line and the month will always be showed, but without events. Don't worry about the { }, PHP will/should handle it normally.
PS.
No wonder he quit, the code is hardly maintainable!
Anyway, I fixed the bug (?) where the calender wasn't showed when there was no event for that month and thus no navigators. This would make some events unavailable when there are no events in a month before.
Open up Kalender.module.php with your favorite editor and go to line 906. You should see:
Code: Select all
if($rs->RowCount() > 0)
{
if ($display=='list' OR $disp....
Code: Select all
if($rs->RowCount() > 0)
PS.
No wonder he quit, the code is hardly maintainable!
