Minor Plugin Updates
I just tagged new versions of the http-authentication and ical-events plugins:
The releases include updated readme files for the really slick WordPress plugin directory that was released today.
The ical-events plugin also contains a minor fix for to avoid a case where a repeat was added after the RRULE end time.
Comments
Comment from Jeff Hopkins on
Hi Daniel!
Love your iCal events plugin.
I’m trying to get it to update multiple times daily…but can’t find the `ICAL_EVENTS_CACHE_LIFETIME` line in the plugin.
Could you tell me where it is…and maybe tell me how I might re-write it to check every few hours instead of once a day? Thanks!
Jeff
Comment from dwc on
Jeff,
My apologies – I renamed the constant used to determine how long to cache but forgot to update the readme. The line you’re looking for is:
define('ICAL_EVENTS_CACHE_TTL', 24 * 60 * 60); // 1 day
To have it update every 4 hours, change it to:
define('ICAL_EVENTS_CACHE_TTL', 4 * 60 * 60);
I’ve updated the readme and released a new version to correct this. Thanks!
Comment from Jeff Hopkins on
Hey Daniel…sorry to bug you again.
My site is: http://www.jeff-hopkins.com. I’m using the plugin, and I’ve got a bunch of lines that look like this:
Unsupported iCal BYMONTHDAY value “BYMONTHDAY=1”
Unsupported iCal BYMONTHDAY value “BYMONTHDAY=22”
Unsupported iCal BYMONTHDAY value “BYMONTHDAY=4”
Before I see some events that seem to be posted the right way.
Ever seen anything like that? Looks like something in my iCal is weird…but I don’t know what.
Thanks in advance, I’m digging the plugin.
Jeff
Comment from dwc on
Jeff,
Certain types of events are not supported by the plugin at this time. The parser doesn’t handle all recurrence rules (e.g. BYMONTHDAY), and I haven’t had a chance to add them.
For now, you can download 1.12 to hide those error messages from:
http://svn.wp-plugins.org/ical-events/tags/1.12/
Be sure to grab all four files and replace the current ones you have.
Comment from Jeff Hopkins on
Thanks, that fixed it!
Really appreciate all the help.
Jeff
Comment from Sam on
I am using http-authentication 1.7.
I have apache authentication protecting the whole site, so when a user sees any page, they have definitely authenticated against apache.
When a user first goes to my WordPress site, if they try to add a comment to an existing post, they get presented with the “Name / Mail / Website” fields above the comment. So at this point it does not seem that they are “logged in.”
If the user attempts to create a completely new post, when they get to the post creation screen they ARE automatically logged in. If they then go back at some point to put comments on any post, it now shows them as logged in.
So it seems like the users need to go somewhere in wp-admin to “trigger” being logged in, then they are fine throughout the site.
What can I do to get the user to be “logged in” to wordpress in the first place?
Is that clear?
Comment from Sam on
Just as a follow up to my last comment, I went and turned on the WordPress option:
Users must be registered and logged in to comment
Now when a user tries to add a comment (if they have not yet been into wp-admin) they get:
You must be logged in to post a comment.
If they click “logged in” in that message, it does log them in automatically.
I would prefer if the users were just automatically logged in in the first place and never saw that message.
Comment from dwc on
Sam,
Give the Angsuman’s Authenticated plugin a try. It requires people to be logged in to see your blog. When used in conjunction with the http-authentication plugin, this should be transparent to users once they’re logged in to the external authentication mechanism.
There are a few other restriction plugins available in case you’re looking for more fine-grained control.
Comment from Sam on
That did the trick, thanks.
Comment from John on
Thanks for the update dwc, i am using http-authentication on some of my blogs,its really nice (i recoded some 😉 )
Comment from k on
Hi dwc,
is there a way to wrap an event into an event_url using google calendar?
Thanks a lot!
Comment from dwc on
k,
The ical-events plugin does support event URLs (linking the summary by default). However, I’m not sure if Google Calendar supports this field.
Comment from arley on
I’m trying to add your calendar to this site that I manage, and for some reason the hours do not show up. I’ve pasted in the example php for the florida calendar and it shows the same behavior as the google calendar I’m trying to post. I’m assuming it’s something I’m doing wrong since no one else here is having that problem.
Comment from dwc on
arley,
Do you have an ical-events-cache folder inside your wp-content folder? Are there any files in it?
Comment from Don on
Hey, don’t mean to crash the party, but was just browsing your site and found the Plugins link in the sidebar is dead….says 11 post but gives me a 404 when I click on it. Also, the UH link is dead. Just a FYI.
Don
Comment from dwc on
Hey, Don. Thanks for the heads up.
I’ve reverted back to WordPress 2.2 for now. WordPress trunk contains some changes to the category structure that don’t seem to be complete.
Comment from Adam on
Daniel,
Great work on the iCal plugin. I’m the author of another wordpress plugin, the KB Countdown widget. It counts down the number of days, weeks, etc to a specific event.
I’ve had people ask me in the past about making my plugin able to handle multiple events (via an iCal file, for example). So I’m currently updating my plugin, and I think I’ll make it piggyback on yours. That is, if my plugin detects that the class “ICalEvents” is defined, then it will offer them options to use an iCal source instead of just specifying a single date, and then it will use your plugin on the backend.
Just thought I’d give you a heads up, since this could increase downloads of your plugin, which could increase the number of people who come here to ask about errors they might get parsing iCal files.
Comment from dwc on
Adam,
That sounds cool! Let me know if you have any questions.
Comment from Gunnar on
Hi,
thank you for the great plug in.
I think my problem is not a problem of your plugin – but maybe you have an idea.
I’m using google calendar and I try to set a link in the event-title. It works in google calendar and in the ics-file it is also correct.
but in the source of my website produced by wordpress instead of
Comment from Andrew Schmitt on
This is a great plugin.
I also tried to put a URL embedded in the Google Calendar and Ical cannot parse it. It appears something is transcoding the vital “;
$queryString .= “&after=”;
$queryString .= “&before_date=”;
$queryString .= “&after_date=”;
$queryString .= “&use_summary=true”;
$queryString .= “&before_summary=”;
$queryString .= “&after_summary=”;
$queryString .= “&use_description=0”;
$queryString .= “&replace_newlines_with=”;
$queryString .= “&before_description= – “;
$queryString .= “&after_description=”;
$queryString .= “&use_location=0”;
$queryString .= “&before_location= (“;
$queryString .= “&after_location=)”;
$queryString .= “&use_url=0”;
$queryString .= “&gmt_start=”;
ICalEvents::display_events($queryString . time()); ?>`
Comment from Andrew Schmitt on
Whoops that last comment got munged…
Comment from Joe on
I had a calender with my primary e-mail/google calendar as a test, and it worked.
Now i’ve switched to the calendar I WANTED it to work with (i.e. different e-mail) and it is telling me there is a parsing error.
If I switch the e-mail back to the original one, it works. Any idea what’s up?
Comment from Ryan on
Hi
Thanks for your plugin. Im using it with mod_ntlm and apache for an intergrated SSO. I am having a problem where unless I proctect the entire WordPress directory with NTLM, it will fail to authenticate and bring up the “No REMOTE_USER found……”. I have applied NTLM to be used for /wp-login.php and /wp-admin/. Are there any files I’m missing?
Thanks in advance
Ryan
Comment from dwc on
Ryan,
What version of WordPress are you using?
I’m not familiar with mod_ntlm but for some reason it sounds like it’s not protecting the directory. Do your server access logs show a username?
Comment from DeezJee on
You’ve got a nice plugin! But I can’t get it to work with iCal from my online .mac account
When I use the url to the ics from the txt file, I get everything to work. So I assume it has got something to do with the ics from my online calendar (http://ical.mac.com/deezjee/tourlist)
Can you help me?
Comment from dwc on
DeezJee,
Try this recommendation – the URL is a little different.
Comment from DeezJee on
That’s it! Thank you very much!
Keep up the good work
Comment from Ryan P on
I was using your HTTP Authentication plugin for 2.3.3 just fine.
I upgraded to 2.5 today, and now whenever I login with my custom process, I get taken to wp-login.php.
From there, I can enter in anything in the username and password fields and hit submit.
After it re-displays the login saying incorrect password, I type in /wp-admin in my location bar manually, and it lets me into the admin area.
But, I HAVE to type in something to the username/password fields first.
It’s almost like add_action(‘wp_authenticate’…) is not being called anymore in 2.5.
Any thoughts on why it’s not working?
Thanks!
Comment from dwc on
Ryan P,
I briefly tested 2.5 last week and ran into the same behavior. I haven’t had a chance to dig into the problem more, but I hope to do so this week.
Comment from Ryan P on
Ok, thank you.
This guy says wp_authenticate is deprecated in 2.5: http://adambrown.info/p/wp_hooks/hook/wp_authenticate
so I’m not sure what the replacement would be.
Comment from Ben Chun on
I left a comment on an older post before I found this — sorry!
As for wp_authenticate being deprecated: I looked in wp-includes/pluggable.php and wp_authenticate is there. It does say @since 2.5 which seems a little strange. Perhaps it implemented differently prior to 2.5?
Anyway, the workaround from Ryan P shows us that wp_authenticate is still being called on regular page loads. But it looks like wp-login.php no longer directly calls do_action_ref_array(‘wp_authenticate’, array(&$user_login, &$user_pass)); but instead calls wp_signon() which is in wp-includes/user.php
I think this change in wp-login.php is the culprit, because wp_signon() wants to either be passed some credentials or have them posted from a form — and it will return before calling wp_authenticate if that’s not the case. In prior versions, the do_action_ref_array(‘wp_authenticate’, array(&$user_login, &$user_pass)); happened even if the user_login and user_pass were empty.
What’s maddening is that I don’t know where to find the WordPress documentation for this change. Obviously someone had an idea of how they want authentication to work in WordPress 2.5. How can we know what they were thinking? It doesn’t seem that wp_signon is pluggable, so how is this stuff supposed to work?
Comment from CFK on
Hi,
first, thanks for this useful plugin.
It minimizes the work for my own plugin i currently develop. ;o)
But, I want to note for a little bug.
The format string in line 45 of ical-events.php (v.1.12) contains a %l (small L) which results in missing hours on output.
So you should replace it to an %H (for 24h-format) or %I (for 12h-format)
if (! isset($r[‘time_format’])) $r[‘time_format’] = ‘%H:%M %p’;
or
if (! isset($r[‘time_format’])) $r[‘time_format’] = ‘%I:%M %p’;
Maybe, it seems to be a typo. ;o)
Bye and Keep at it
CFK
Comment from dwc on
CFK,
%l is a supported conversion specification for most UNIX strftime implementations, but you’re right that PHP doesn’t necessarily support it. I’ve changed it to use %I for better compatibility. Thanks!
What sort of plugin are you working on?
Comment from CFK on
Hi,
I didn’t know, but later i saw an user comment on the php manual, that %l (and some others) can be used for date/time formatting. But, you said, only some systems support it.
However.
I use your plugin like it is, for displaying dates exported by sunbird.
But I’ll also need the other way, so users should change dates remote over the site and sunbird imports the changes.
Maybe i will modify you plugin a bit and add some additional functionality.
When I have finished developing the plugin and the site goes online, I’ll let you know.
So long
CFK
Comment from Juska on
Hi!
The plugin doesn’t show scandinavian characters like ä, å and ö correctly. Is there a way to make this work? I think a simple character setting would do the trick, but how?
Thanks for a great plug-in!
Juska
Comment from dwc on
Juska,
The development version of ical-events plugin supports a
charset
parameter todisplay_events
that allows you to specify the character set of the calendar:ICalEvents::display_events('url=...&charset=EUC-JP');
You can download the development version at:
http://downloads.wordpress.org/plugin/ical-events.zip
Comment from happe on
hello,
I use your plugin and its working smoth. but how can I format the event without endtimes? Thanks for Your work!
HP