Page 2 of 2

Posted: Tue Nov 08, 2005 1:18 am
by kavuday
I reinstalled the plugin, but it still doesn't want to add links directly to the calendar for me. On a side note, the My Calendar countdown is all screwy now. It's only showing days-left for one event.

Im about ready to call it good, and leave well enough alone. :D

Posted: Tue Nov 08, 2005 11:32 am
by garvinhicking
The countdown thing was edited/changed by another developer, so I haven't looked into that.

Which version of the plugin are you using right now? And you definitely need the include/plugin_internal.inc.php file of the snapshot that will be created today,or fetch it via SVN directly...

I want to fix this, and not just ignore it :))

Regards,
Garvin

Posted: Tue Nov 15, 2005 8:22 pm
by kavuday
Okay, got the links to work in the calendar after appying the correct file. I wasn't appying the latest snapshot, only re-downloading the latest stable release and appying from there. *smacks self*

I'm still having problems with the events not showing how many days are left. One of the events displays the days left, but other events do not. The mycalendar event plugin is ver 0.6, and the sidebar plugin is 0.4.

Thanks

**edit**

Peeking at the code I noticed that maybe the plugin only shows the number of days left for an event if 1. It's in the future (makes sense) and 2. If it's not the next event.

Why doesn't it show days left for the nearest upcoming event?

Posted: Tue Nov 15, 2005 10:47 pm
by kavuday
Well, I got it to work by removing a portion of line 131 of serendipity_plugin_mycalendar.php.

from this...

Code: Select all

if ($days > 0 and $olddays > 0) {
to this...

Code: Select all

if ($days > 0) {
I don't understand the reason for not showing 'days left' for the first future entry. And I'm sure I fixed it exactly the wrong way, but it seems to work.

Posted: Thu Nov 17, 2005 4:06 pm
by garvinhicking
I've just committed a new plugin version that makes it configurable whether the first future item is skipped or not. It basically uses your code suggestion, so if you keep your patch you should be as happy as with the new version :)

Regards,
Garvin

Posted: Fri Nov 18, 2005 5:17 am
by gizmola
kavuday wrote: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...

Thanks for the help Garvin!
It's actually not weird at all, sounds like the apache server for your host runs as nobody. When spartacus is involved, it is creating the plugin directory and writing the plugin files, and depending on your plugin settings, and how the server is configured, it's not unusual to find that you now have locked yourself out of those files via any mechanism other than, as was suggested writing a script that accesses them for you, and perhaps chmods them so that you have access as "Other".

Posted: Fri Nov 18, 2005 7:56 pm
by caw
I upgraded to the new (0.6) version of the plugin and it appears lang_en.inc.php is missing. I'm getting all kinds of errors.

Code: Select all

Warning: main(/var/www/curtis/blog/plugins/serendipity_event_mycalendar/lang_en.inc.php) [function.main]: failed to open stream: No such file or directory in /var/www/curtis/blog/plugins/serendipity_event_mycalendar/serendipity_event_mycalendar.php on line 9

Warning: main() [function.include]: Failed opening '/var/www/curtis/blog/plugins/serendipity_event_mycalendar/lang_en.inc.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear:/usr/share/php/s9y/:/usr/share/php/s9y/bundled-libs/') in /var/www/curtis/blog/plugins/serendipity_event_mycalendar/serendipity_event_mycalendar.php on line 9

Warning: Cannot modify header information - headers already sent by (output started at /var/www/curtis/blog/plugins/serendipity_event_mycalendar/serendipity_event_mycalendar.php:9) in /usr/share/php/s9y/serendipity_admin.php on line 11
Thanks,
Curtis.

Posted: Sat Nov 19, 2005 12:12 am
by kavuday
gizmola wrote:
kavuday wrote: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...

Thanks for the help Garvin!
It's actually not weird at all, sounds like the apache server for your host runs as nobody. When spartacus is involved, it is creating the plugin directory and writing the plugin files, and depending on your plugin settings, and how the server is configured, it's not unusual to find that you now have locked yourself out of those files via any mechanism other than, as was suggested writing a script that accesses them for you, and perhaps chmods them so that you have access as "Other".
Yeah, this is a learning process for me...and I like to learn the hard way. In hindsight, I realized I didn't properly configure Spartacus to assign ownership for fetched files. Lesson learned...again. :D

Posted: Fri Dec 02, 2005 1:22 am
by Anthem
You might want to change Line 108 in serendipity_event_mycalendar.php

Code: Select all

                if (!isset($eventData[$day])) {
                    $eventData[$day] = array(
                        'Class'  => 's9y_mc_event',
                        'Title'  => $event['eventname'],
                        'Extended' => array(
                            'Link'   => $event['eventurl'],
-->                         'Active' => true)
                    );
to

Code: Select all

                            'Active' => $event['eventurl'] != '')
so that events without URL won't get an empty link.