KalenderMX 1.4 help with month view!

Begonnen von m0t0rhead99, 01 September 2006, 22:01:47

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

m0t0rhead99

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.


Musicman75

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
Unaufgeforderte Support PMs & Emails werden ignoriert

Immer erst die Boardsuche verwenden und gegebenenfalls einen neuen Threat eröffnen, wenn das Problem noch nicht behandelt wurde!

m0t0rhead99

Zitat von: Musicman75 am 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.




The bars are now overlapping... is there any way to fix that? Im sorry my .php is not very advanced yet. Thanks in advance.

Musicman75

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.
Unaufgeforderte Support PMs & Emails werden ignoriert

Immer erst die Boardsuche verwenden und gegebenenfalls einen neuen Threat eröffnen, wenn das Problem noch nicht behandelt wurde!

Musicman75

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>";
                        }
                    }
Unaufgeforderte Support PMs & Emails werden ignoriert

Immer erst die Boardsuche verwenden und gegebenenfalls einen neuen Threat eröffnen, wenn das Problem noch nicht behandelt wurde!

m0t0rhead99

Zitat von: Musicman75 am 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.