Skip to forum content

LuxCal Web Calendar

The place for news, questions and suggestions

You are not logged in. Please login or register.


Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Images Smilies

All fields with bold label must be completed before the form is submitted.

Required information for guests


Required information

Topic review (newest first)

10

SOLVED IT!! (Mostly)

Again thanks to Roel for the essential sorting code, and to Stack Overflow for the Flex magic.
(stackoverflow
com
/a/61969131/13102734)


Here's what the finished result looks like:
greiginsydney
com
/random
/luxCalBottomJustify-works.jpg

I've tested this against Year, Month and Week views on Edge & Firefox. I *doesn't* look like it's working under Safari on iDevices, although it might just be not picking up the new style sheet yet, and that's not something you can force. (Alas, it's not working on Chrome under iOS26 either).

*As well as* my subverted sort code in the post above, you need to edit css.php & toolbox.php:

css.php:

.cell {min-height:100px;display:flex;flex-direction:column;}

toolbox.php, in fn colorStyle:

  $eStyle = ($evt['cco'] ? 'color:'.$evt['cco'].';' : '').($evt['cbg'] ? 'background-color:'.$evt['cbg'].';' : $defBgd);
    if ($evt['cid'] == 18) {
      $eStyle .= 'margin-top:auto;';
    }

}

Roel might be able to make that test for Category 18 a one-liner, but that's above me.

Obviously this is still a TERRIBLE kludge because it's baking a category number into the .php, but did i mention it works??

9

Thanks Roel, that's great.

I've actually subverted your fix (now you've shown me where this can be done).

I've created a new category I've called 'float bottom', and I've changed the sort to sort on its category ID:

$evt['sort'] = $evt['cid'] == 18 ? '24:00' : ($evt['mde'] <= 1 ? $evt['sti'] : ($evt['mde'] == 2 ? '' : $evt['eti']));

Obviously hard-coding references to individual categories into the php could get me banished from this forum forever, but I'm hoping you'll forgive me. wink


- G.

8

Hi Greg,
Edit the file "common/retrieve.php" and change line 233 (end of the file) from

$evt['sort'] = $evt['mde'] <= 1 ? $evt['sti'] : ($evt['mde'] == 2 ? '' : $evt['eti']);

to

$evt['sort'] = $evt['tit'][0] == '*' ? '24:00' : ($evt['mde'] <= 1 ? $evt['sti'] : ($evt['mde'] == 2 ? '' : $evt['eti']));

Thereafter when you put an * (asterisk) at the start of the event title, the event will sink to the bottom of the event list in the day cells.

I've added this change to the next LuxCal calendar version.

Roel

7

I've had a bit of a play with it (with some help from Claude.ai) but I can't even get the text to move.

I was experimenting with the .event and .evtTitle just to see if I could get the text to move to the bottom, but I realise my request would presumably involve a new checkbox in the Categories setup so the .cell is filled as desired.

6

Hi Roel,


Sorry for the delay. We're on 534M.

I'd still love it if you could float bottom of the cell and not just the bottom of the list. I realise that too many of those will start to get messy, but done right, with only one entry 'categorised' as 'bottom' it will really stand out.

But I'll take what I get. If it's not going to cause you escaping pain, I think a chevron (&gt;) would be ideal for the trigger character.

- Greig.

5

Hi Mark,
The day cell is rather small and if I split it in three zones, then each zone needs a scroll bar in case there are many events for that day.
Furthermore Greig would still need to enter a bogus time stamp, as he calls it, to get his "special" event in the third zone.
Roel

4

Hi.
Or maybe "split" the day cell on three distinct zones, based on hour (ex. 0-12, 12-18, 18-23.59). Morning, afternoon, evening...
And events will display in those three zone, based on start hour.
regards,
Mark

3

Hi Greig,
Yes, I see what you are looking for. I had a look at "bottom justifying" an entry in a day cell of the calendar, but this is not easy. I can position something at the bottom, but if the user would earmark two or more events as "bottom-justify', they will be displayed on top of each other. Or if there are many normal events, which reach the bottom of the cell, they will also be on top of the "bottom-justified" item.
As a compromise, I can let an event with a title that starts with a special character (e.g. a ! or a +) float to the end of the list of events (Note: NOT to the bottom of the day cell). In this case you can set the time of the "hotel" event to "No Time". If in addition you create a dedicated category with an eye-catching color for these "hotel" events, it should be easy to find them.
Please let me know if you are interested in this change. If so, drop me an email with your LuxCal calendar version. I will then send you a patch to make this work, which I will also add to the next calendar version.
Roel

2

Ive put a mock-up of my desired output here:

- but you'll need to glue the url together, sorry.

https://greiginsydney
.com
/random
/luxCalBottomJustify.jpg

1

Hi All,


We LIVE by LuxCal, have for many years, and that includes planning travel as well.

Something I've long wanted to do is "bottom-justify" an entry. When we're travelling this is the town or hotel we'll be sleeping in that night.

My current work-around is to set it for "23:59", which puts it at the last of any day events, but it's still top-justified - and annoyingly then has a bogus time-stamp.

Is there a way to achieve this, or has anyone come up with a workable edit or kludge?