[Calendar] Add new line


BassMan

Well-Known Member
Hi Andy,

I'm wondering how to add another event on the same day but in new line.

PHP:
if ($m == 1 && $d == 1)    // jan 1
    return "New Year's Day \r\n Example event";

Doing it with \r\n doesn't work. So, how can I add a new line in PHP code?
 

Andy

Administrator
Staff member
The Calendar add-on has no provision for more than one Holiday per day. Which holiday also falls on Jan 1st?
 

BassMan

Well-Known Member
I know, it's just an example. I'd like to use this file for different purpose too, not only for holidays.

I'd like to use it for manual entries of events, because I don't need threads for those, just for information. It would be very useful for my forum.

That's why I'm wondering how to add a new line in that code.
 

BassMan

Well-Known Member
It's hard to provide a real example, because it's for my forum niche. But ok...

I need it to put in the information for teachers - school calendar for next school year. It's very important for our teachers and every teacher need it. This is what am I trying to do with your calendar. I really don't need it like threads, I'd just like to fill in the information for next year and that's it. Well, it works well, just wanted to add new line for days that have more then one information.
 

Andy

Administrator
Staff member
This Calendar system is designed to be very simple use and understand. I encourage you to add a new thread for any event worthy of a Calendar entry.
 

BassMan

Well-Known Member
Understand, but like said, I don't need nor do want to open a new thread for such information. Those threads really aren't useful for anyone.

I guess I need to rethink all over again on how to put that information to a calendar or any other similar system.
 

Andy

Administrator
Staff member
Understand, but like said, I don't need nor do want to open a new thread for such information. Those threads really aren't useful for anyone.

I think it's better to keep the calendar simple. I suggest you create the threads for each calendar event.
 

BassMan

Well-Known Member
Maybe, in a new subforum and that will not show in RSS feed. It's really not ideal and definitely not a simple solution for my forum. I can confuse members with those threads. Example:

May 28th - Exams for 9th grade

OR

June 29th - Summer exams for all pupils

Now, why should I have threads for it? Really not much to say about it. Also, that information would be in a thread title, but what should I put in the post content?

I think I'll go with editing the Holiday.php file. I'll just put something like ; or | instead of a new line.
 

Andy

Administrator
Staff member
Maybe, in a new subforum

This is the ideal solution. It allows you to provide additional information about the event. For example the "May 28th - Exams for 9th grade" you can put important information such as the location of the exam, the time, etc..
 

BassMan

Well-Known Member
Maybe, in consideration.

Another question, is there anyway to change the color for saturday and sunday column?
 

BassMan

Well-Known Member
For example the "May 28th - Exams for 9th grade" you can put important information such as the location of the exam, the time, etc..
Actually can't do it, because these are just guidelines from our Ministry of education, so location and time are different in every school.
 

Andy

Administrator
Staff member
is there anyway to change the color for saturday and sunday column?

Not an option at this time. It would require a lot more additional coding to achieve this. Looking at calnedars in Google images, having the weekend background color different is seldom done.
 

Andy

Administrator
Staff member
Actually can't do it, because these are just guidelines from our Ministry of education, so location and time are different in every school.

In almost all cases additional information can be provided in the thread, for example in this case links to school's class schedule.
 

BassMan

Well-Known Member
Ok. I think I'll go with threads in new forum node (not visible in forum list) and not showing new posts in new / unread posts page.

I think that will do it, I'll just think of adding a content to those threads. Currently not seeing any other option.
 

Andy

Administrator
Staff member
Ok. I think I'll go with threads in new forum node (not visible in forum list) and not showing new posts in new / unread posts page.

I suggest making as few changes as possible. Just make it a regular node and allow members to post replies should they have a question.You really never want to limit conversation on a forum.
 

BassMan

Well-Known Member
I suggest making as few changes as possible. Just make it a regular node and allow members to post replies should they have a question.You really never want to limit conversation on a forum.
Agree, yes. I'll just remove it from new / unread posts page, but make the node visible.
 
Top