Generating a Calendar, revisited
This is an open discussion with 12 replies, filed under XSLT.
Search
The link to the event is dead... Plus have you got an example of this in action? Very intruiging, especially the php:function stuff...
Urgh... Me no likey php:function
.
After reading, don't these have to be exclusively enabled in PHP first?
@designermonkey, I updated the link. I'll have an example in a couple days hopefully. And the event enables PHP, you don't have to do anything else.
@phoque, I don't really like using PHP either, it's a little awkward, but I had so much trouble dealing with more complex logic in XSLT, it just makes more sense to use straight PHP. The only thing I'm worried about is how the performance would compare, I suspect straight PHP would be a little faster, but we'll see!
I'm sure that when we can see it all in action, we'll all be able to find a way of avoiding the PHP ;o)
Looking forward to it!
I've put an example up here for you guys to check out. It's a simple example, and you must forgive the poor styling! You can find the the source of it @ github.
Sooper cool!
@scottkf - it is possible to implement this calendar using ajax, because for every month or year ,the page is getting post back , any tips how to convert this ?
Within the context of my example something like the following should work:
$('.calendar th a').click(function (e) { e.preventDefault(); $.get($(this).attr('href'), function(data) { $('body').empty(); $('body').append(data); }); });
It reloads the entire page, but you could streamline it.
how to achieve these things
i want to highlight the date (if their is an event associated with that date it should be highlighted)
i want to display all the event associated on a particular date(as of now you used event-id to filter the events i want to display the events based on the date it is associated not with the event-id as filter field)
how to achieve the above mentioned functionalities - any guidance/ help will be more useful,
thanks
i want to display all the event associated on a particular date(as of now you used event-id to filter the events i want to display the events based on the date it is associated not with the event-id as filter field)
- any help or guidance ?
any help or guidance ?
Create an account or sign in to comment.
After having to revisit a calendar of events and kind of hacking my way through it originally, I've come up with another way to incorporate an event calendar more easily into an existing site. A very simple example is hosted here. The source is available at github. If you have any issues, please discuss them here.
Requirements:
<li>
. For example, if we had a field called description it would be produced as<li class="description">
, so.description { display: none; }
would get rid of it.Finally, in the page you wish to drop the calendar in, the php xmlns must be added to the
<stylesheet>
tag, and the function to generate the calendar must be used. An example page would look like is below. The second parameter next to the function is the name of the data source. The third is an optional path to link to the event by id so you provide the root path (if none is provided it will just be listed as text). The fourth is an optional class to provide the table with, the default is calendar.Bugs/features: