This project is read-only.

Future entries do not appear in the calendar

Oct 20, 2007 at 2:01 PM

I don't know if this is a known issue, but if I add an entry to the blog and set the date to anything ahead of the current date, the calendar shows a blank area instead of the day it was set for. Anybody else come accross this yet? Anyone have a fix for me as my plan was to use the calendar as a form of planner so I need to add future times/date posts.
Oct 20, 2007 at 3:31 PM
I am very new to BlogEngine but looking in the Post.cs code I would say you need to modify this function to remove the date check.

public bool IsVisible
if (IsPublished && DateCreated <= DateTime.Now.AddHours(BlogSettings.Instance.Timezone))
return true;

return false;
Oct 20, 2007 at 7:28 PM
Well your wanted behavior is not normal behavior for a blog. If you make a future post it SHOULDN'T show. If you are wanting it to show, then you should edit the code yourself so it fits your very individualized need.

But if I make a blog post and set the date to the future I expect it to be completely hidden until then... and I think the vast majority will agree with this expectation.
Oct 21, 2007 at 12:04 AM
Thanks, echmyr but I cannot find that code in post.aspx.cs. Do I need to add it? If so, anywhere in particular?

Also, I don't appreciate the attitude ckinciny... It's a very valid question and whether or not people agree with you I believe it should be made aware of. It wouldn't hurt to add such a feature either. I don't know much about coding in C# therefor I am unable to edit the code myself hence I am relying on the communities support.
Oct 21, 2007 at 3:11 AM
Attitude? That wasn't an attitude but stating an opinion. I don't want to see this feature in BE, because it would make it non-standard for blogging. Now had you just come and asked for help making a version that does that I wouldn't have said anything because echmyr's code fix is your answer... and realize that he said post.cs, not post.aspx.cs. He is referencing some code in the blogengine.dll
Oct 21, 2007 at 1:38 PM
Where can I find the blogengine.dll? Will I need to download the latest source version, add that code and compile it? I apologise but to me your post comes accross as attitude to me. I personally see no problem with adding a feature which allows future entries to the blog display on the calendar.
Oct 23, 2007 at 12:49 AM

Can someone please explain where and how the above mentioned code needs to be added.
Oct 23, 2007 at 6:47 AM
It's inthe BlogeEngine.Core project, not in the web project itself.

After reading the rest of the comments, I will say this change I proposed my have the side affect of displaying all your posts without regards to the publising date (the post for next week may show up as the most currrent post). You may have to put some work into that also.
Oct 23, 2007 at 10:44 AM
Do you mind going into detail how I would go about modifying the file? I've opened it up in visual web developer express but I cant seem to change anything or even find the exact location that code belongs too.
Oct 23, 2007 at 1:46 PM
I'm actually looking for the exact same feature. Even though it might not be "normal behavior" in blogs, but it is possible to change the date on the entry, which in itself cannot be seen as "normal behavior" in a blog, where the very essence is that a timestamp is to be specified in the instance the blog entry is made. Correct me if I'm wrong.

The point that the side effect would be that future posts would come up as the latest post is a good one. Thanks for the heads-up!

- jonah
Oct 23, 2007 at 1:51 PM
Edited Oct 23, 2007 at 1:58 PM
Oh, btw...
Removing the if-statements if (post.IsVisible ) and the if (list0.IsVisible)
in the Controls\PostCalendar.cs will show posts in the future.

I've just looked in to this really, really quick. So I don't know what other effects this will have.

- jonah
Oct 24, 2007 at 3:25 AM
Edited Oct 24, 2007 at 4:00 AM
Thanks so much Jonah! You're a real champion. That's done the job just right.