pragmaMx Support Forum

Archive => veraltete bzw. unsupportete Systeme und Module => Alt Archive => KalenderMx => Thema gestartet von: m0t0rhead99 in 01 September 2006, 22:01:47

Titel: KalenderMX 1.4 help with month view!
Beitrag von: m0t0rhead99 in 01 September 2006, 22:01:47
Hi everyone.

I apologize that I cannot post this in german.

I just want to say that I absolutely love the KalenderMX module and have been using it with php-nuke 7.9 with no problems at all.

The one thing I would like to change or add is with the month view.

When you post a multi-day event, and specify that it is an all-day event, it creates a wonderful colored bar that spans from the start date to the end date. However, I would like it to also show the "SUBJECT" of that event over top of the bar image. Right now, all you see is the bar... you would have to mouse over it to see what the event is. It would be nice to be able to glance at the bar and know what the subject is without having to mouse over it.

Is this possible and what would i have to change or add to the code for this to work ??

I would really appreciate it if any of you smart coders out there could help me with this. Thank you much in advance.

Tom.
Titel: Re: KalenderMX 1.4 help with month view!
Beitrag von: m0t0rhead99 in 02 September 2006, 20:15:09
bump    :D
Titel: Re: KalenderMX 1.4 help with month view!
Beitrag von: Musicman75 in 02 September 2006, 21:05:14
where do you want to display the text? for a correct display it has to be displayed on each day the event goes.

if this is correct for you, here's the code:
                    if (($cellDate == $tmpEndDate) && ($tmpEndDate == $tmpEventDate)) {
                        echo "<td height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"40\" border=\"0\"></a></td><td align=\"left\" width=\"100%\" background=\"" . calGetBarImage("mainbar", $categorie) . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td align=\"right\"><img src=\"" . calGetBarImage("rightbarcap", $categorie) . "\" height=\"" . $picheight . "\" width=\"5\" border=\"0\"></td>";
                    } elseif ($cellDate == $tmpEventDate) {
                        echo "<td height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"40\" border=\"0\"></a></td><td align=\"left\" width=\"100%\" background=\"" . calGetBarImage("mainbar", $categorie) . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                    } elseif ($cellDate == $tmpEndDate) {
                        echo "<td align=\"right\" width=\"100%\" background=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td><a href=\"$link\"><img src=\"" . calGetBarImage("rightbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"40\" border=\"0\"></a></td>";
                    } else {
                        if ($day == 1) {
                            echo "<td height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"40\" border=\"0\"></a></td><td align=\"left\" width=99% background=\"" . calGetBarImage("mainbar", $categorie) . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        } else {
                            echo "<td align=\"center\" background=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        }
                    }


it has to be pleced in the index.php line 634 (have a look at the following code)
if (($cellDate == $tmpEndDate) && ($tmpEndDate == $tmpEventDate)) {

thats the first line to be replaced
Titel: Re: KalenderMX 1.4 help with month view!
Beitrag von: m0t0rhead99 in 05 September 2006, 14:44:02
Zitat von: Musicman75 in 02 September 2006, 21:05:14
where do you want to display the text? for a correct display it has to be displayed on each day the event goes.

if this is correct for you, here's the code:
                    if (($cellDate == $tmpEndDate) && ($tmpEndDate == $tmpEventDate)) {
                        echo "<td height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"40\" border=\"0\"></a></td><td align=\"left\" width=\"100%\" background=\"" . calGetBarImage("mainbar", $categorie) . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td align=\"right\"><img src=\"" . calGetBarImage("rightbarcap", $categorie) . "\" height=\"" . $picheight . "\" width=\"5\" border=\"0\"></td>";
                    } elseif ($cellDate == $tmpEventDate) {
                        echo "<td height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"40\" border=\"0\"></a></td><td align=\"left\" width=\"100%\" background=\"" . calGetBarImage("mainbar", $categorie) . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                    } elseif ($cellDate == $tmpEndDate) {
                        echo "<td align=\"right\" width=\"100%\" background=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td><a href=\"$link\"><img src=\"" . calGetBarImage("rightbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"40\" border=\"0\"></a></td>";
                    } else {
                        if ($day == 1) {
                            echo "<td height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"40\" border=\"0\"></a></td><td align=\"left\" width=99% background=\"" . calGetBarImage("mainbar", $categorie) . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        } else {
                            echo "<td align=\"center\" background=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        }
                    }


it has to be pleced in the index.php line 634 (have a look at the following code)
if (($cellDate == $tmpEndDate) && ($tmpEndDate == $tmpEventDate)) {

thats the first line to be replaced

Wow. Thank you so much for taking the time to help me with this. I have successfully copied and replaced the code in the index.php file. Here is what I had and what was the result.

(https://forum.pragmamx.org/proxy.php?request=http%3A%2F%2Fwww.accentesi.com%2Fscreen2.bmp&hash=bb53e88577417e7a0c1c2e119183005770ff086b)
(https://forum.pragmamx.org/proxy.php?request=http%3A%2F%2Fwww.accentesi.com%2Fscreen.bmp&hash=72678f852a4a0071e4ebcaa373b59d0cae5f9d68)

The bars are now overlapping... is there any way to fix that? Im sorry my .php is not very advanced yet. Thanks in advance.
Titel: Re: KalenderMX 1.4 help with month view!
Beitrag von: Musicman75 in 05 September 2006, 15:12:30
Here's the code that works:
                    if (($cellDate == $tmpEndDate) && ($tmpEndDate == $tmpEventDate)) {
                        echo "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\"  width=\"40\" border=\"0\"></a></td><td align=\"left\" width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td align=\"right\"><img src=\"" . calGetBarImage("rightbarcap", $categorie) . "\" height=\"" . $picheight . "\" width=\"5\" border=\"0\"></td>";
                    } elseif ($cellDate == $tmpEventDate) {
                        echo "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" width=\"40\" border=\"0\"></a></td><td align=\"left\" width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                    } elseif ($cellDate == $tmpEndDate) {
                        echo "<td align=\"right\" width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("rightbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"40\" border=\"0\"></a></td>";
                    } else {
                        if ($day == 1) {
                            echo "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" width=\"40\" border=\"0\"></a></td><td align=\"left\" width=99%  valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        } else {
                            echo "<td align=\"center\"  valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        }
                    }


some place in the index.php to paste it to.
Titel: Re: KalenderMX 1.4 help with month view!
Beitrag von: Musicman75 in 05 September 2006, 15:25:12
if you want to make the spacing at the first and last day smaller, take his code:
                    if (($cellDate == $tmpEndDate) && ($tmpEndDate == $tmpEventDate)) {
                        echo "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\"  height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td><td  width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td align=\"right\"><img src=\"" . calGetBarImage("rightbarcap", $categorie) . "\" height=\"" . $picheight . "\" width=\"5\" border=\"0\"></td>";
                    } elseif ($cellDate == $tmpEventDate) {
                        echo "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td><td  width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                    } elseif ($cellDate == $tmpEndDate) {
                        echo "<td width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("rightbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td>";
                    } else {
                        if ($day == 1) {
                            echo "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td><td width=99%  valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        } else {
                            echo "<td align=\"center\"  valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        }
                    }
Titel: Re: KalenderMX 1.4 help with month view!
Beitrag von: m0t0rhead99 in 08 September 2006, 14:00:42
Zitat von: Musicman75 in 05 September 2006, 15:25:12
if you want to make the spacing at the first and last day smaller, take his code:
                    if (($cellDate == $tmpEndDate) && ($tmpEndDate == $tmpEventDate)) {
                        echo "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\"  height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td><td  width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td align=\"right\"><img src=\"" . calGetBarImage("rightbarcap", $categorie) . "\" height=\"" . $picheight . "\" width=\"5\" border=\"0\"></td>";
                    } elseif ($cellDate == $tmpEventDate) {
                        echo "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td><td  width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                    } elseif ($cellDate == $tmpEndDate) {
                        echo "<td width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("rightbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td>";
                    } else {
                        if ($day == 1) {
                            echo "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td><td width=99%  valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        } else {
                            echo "<td align=\"center\"  valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        }
                    }


Thank you so much for all of your help and time. This modification really helps. You are truly a professional.

Thanks again.