Im about ready to call it good, and leave well enough alone.
Combining "My Calendar" with "Calendar"
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
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
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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
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?
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?
Well, I got it to work by removing a portion of line 131 of serendipity_plugin_mycalendar.php.
from this...
to this...
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.
from this...
Code: Select all
if ($days > 0 and $olddays > 0) {Code: Select all
if ($days > 0) {-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
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
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
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".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!
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.
Thanks,
Curtis.
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 11Curtis.
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.gizmola wrote: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".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!
You might want to change Line 108 in serendipity_event_mycalendar.php
to
so that events without URL won't get an empty link.
Code: Select all
if (!isset($eventData[$day])) {
$eventData[$day] = array(
'Class' => 's9y_mc_event',
'Title' => $event['eventname'],
'Extended' => array(
'Link' => $event['eventurl'],
--> 'Active' => true)
);Code: Select all
'Active' => $event['eventurl'] != '')2b || !2b