Page 1 of 2

Combining "My Calendar" with "Calendar"

Posted: Tue Aug 23, 2005 7:54 pm
by thv
Somewhat confusing thread title I guess -- allow me to explain!

I am using Serendipity for a "What's On" website, with several newsfeeds too.


I have no need for a calendar that relates to general blog entries.
Instead, I need events from the "My Calendar" list to show up.
So... I need future events in the calendar, not past blog entries.


I ran a search and this issue has come up before, but I could not find a clear answer...


Actually, I was expecting this to work from within the admin interface. When I saw the option to "Enable Plugin API hook" (Configure Plugins > Calendar), I thought it would include future events from the My Calender plug-in, but this seems not to be the case. As a result I am somewhat unclear as to what I have just enabled. :lol:

Any ideas?

Re: Combining "My Calendar" with "Calendar&qu

Posted: Tue Aug 23, 2005 8:41 pm
by garvinhicking
This extra functionality has been added to the development version of Serendipity 0.9, as you correctly recognize.

But you must use the very latest mycalendar plugin to take advantage of that for highlighting those dates...

Regards,
Garvin

Posted: Tue Aug 23, 2005 9:28 pm
by thv
I am actually running today's snapshot of 0.9, and I installed the plug-in via the admin interface, using Spartacus.
Is the version of the plug-in linked there not the latest version? That's what I am using. (serendipity_event_mycalendar.php,v 1.6, and serendipity_plugin_mycalendar.php,v 1.7)

:?

Posted: Tue Aug 23, 2005 11:22 pm
by garvinhicking
Those are the right versions -- can you give us the URL to your blog? It really should work...

Remember that the events are only indicated in the calendar with CSS, and the dates are not linked to output pages (yet)...

Regards,
Garvin

Posted: Wed Aug 24, 2005 5:46 pm
by thv
I am running the script locally while I sort out the hosting for this particular project.

How unfortunate that events are not linked to pages yet. Oh well.
I tried using a normal category to solve my problem, but have not been successful at that so far.
I have created future entries, but they do not show in the calendar when browsing my "Listings" (future events) category. Only today's events are linked in the calendar. I have set "Show future entries" to Yes, but they do not show in the archive or category view.

Perhaps the problem lies with my local install? (OS X 10.4, PHP 4.3.11)

Everything else works just fine by the way - fantastic work!

Posted: Wed Aug 24, 2005 6:17 pm
by Guest
thv wrote: I tried using a normal category to solve my problem, but have not been successful at that so far.
I have created future entries, but they do not show in the calendar when browsing my "Listings" (future events) category. Only today's events are linked in the calendar. I have set "Show future entries" to Yes, but they do not show in the archive or category view.
Whoops! I take that back. I forgot to assign the future events to the correct category. Now I just need to mess with the templates a bit, and most importantly think of a way for past events to be deleted.

Posted: Thu Sep 01, 2005 8:40 pm
by Anthem
We already have a way to delete past events: The option is called Pruning and resides in the MyCalendar sidebarplugin configuration.

Nice to know someone else also has a use for the MyCalendar<->Calendar functionality :)

Posted: Thu Nov 03, 2005 11:11 pm
by kavuday
garvinhicking wrote: Remember that the events are only indicated in the calendar with CSS, and the dates are not linked to output pages (yet)...

Regards,
Garvin
Has this been worked on at all? I would love to see the events linked in the calendar.

As it stands right now, events for me are not even highlighted in the calendar :cry:. When I hover my mouse over the date, the title for an event pops up, so I know something is working right.

I know very little about css (learning as I go) and even less about php, but I'll keep trying to figure it out as I go.

Thanks

Posted: Fri Nov 04, 2005 11:21 am
by garvinhicking
Hi!
Has this been worked on at all? I would love to see the events linked in the calendar.
Nope, no further effort has yet been made on this issue. Since calendar events (aside from entries) do not have a specific page, we don'T have a link target to put in there right now.
As it stands right now, events for me are not even highlighted in the calendar :cry:. When I hover my mouse over the date, the title for an event pops up, so I know something is working right.
Can you give a URL to your blog where this happens?

Best regards,
Garvin

Posted: Fri Nov 04, 2005 6:59 pm
by kavuday
garvinhicking wrote: Nope, no further effort has yet been made on this issue. Since calendar events (aside from entries) do not have a specific page, we don'T have a link target to put in there right now.
Events associated with 'My Calendar' sometimes have links to a specific page. Sorry if I don't explain myself very clearly, I've been using s9y for all of about 4 days and the language is still pretty new to me.

Here's the link to my site. Thanks Garvin.

Posted: Fri Nov 04, 2005 7:28 pm
by garvinhicking
You can try to put this into your style.css:

Code: Select all

.s9y_mc_event {
  color: red;
  font-weight: bold;
}
This should make your events specially coloured :)

I can create a patch so that links will be put to the links you made for the event calendar. Edit your include/plugin_internal.inc.php file at line 284 and insert this:

Code: Select all

                        if (isset($externalevents[$currDay]['Link'])) {
                            $cellProps['Link'] = $externalevents[$currDay]['Link'];
                        }
Then patch your serendipity_event_mycalendar and add this after line 110:

Code: Select all

                    $eventData[$day]['Link'] = $event['eventurl'];
This should work? I also committed those changes right now.

Regards,
Garvin

Posted: Fri Nov 04, 2005 8:40 pm
by kavuday
CSS trick works great. Thanks!

Unfortunately, I can't seem to edit any plugins I have downloaded and installed via Spartacus. I can't edit or overwrite the php files, and when I try to change permissions, I am denied. Not sure why, but I'm getting off topic now, so I'll investigate further or wait for the new version of the plugin :)

Thanks for the help Garvin!

Posted: Fri Nov 04, 2005 8:47 pm
by garvinhicking
You can write yourself a PHP file to reget the permissions of those files:

Code: Select all

<?php
chmod('/path/to/the/file.php', 0777);
?>
:)

Best regards,
Garvin

Posted: Sat Nov 05, 2005 7:52 am
by kavuday
I had to get my host to go in and reset permissions, etc. As far as I could tell, the fetched plugins were assigned an owner of 'nobody', hence I couldn't go in and change permissions. Weird...

Anyway, I added the code exactly as you described, but couldn't get any working links in the calendar. :cry: No worries though, the links to events are right there in the My Calendar plugin, so it's just overkill I guess.

Thanks for the help Garvin!

Posted: Mon Nov 07, 2005 5:59 pm
by garvinhicking
I've just committed new versions of the plugin and the inlcude/plugin_internal.inc.php files, and now it works :)

Regards,
Garvin