mijen Posted June 21, 2013 Share Posted June 21, 2013 I would like to add a list of say the 5 next events from a caldav calendar server (I'm using baikal). Initially it could be just a single field including a list or table with the 5 next events, with say the first 10 words from the description of each event. Ideally it would be possible to browse the calendar (read-only) but I would like to start out with something that can be added without any programming skills (if possible). /Michael Link to comment Share on other sites More sharing options...
mijen Posted June 22, 2013 Author Share Posted June 22, 2013 Hello forum, I'm a newbie using Processwire, so feel free to let me know if the description of above doesn't make sense, and requires better description. Or maybe the solution is so simple it is a dumb question? I have seen solutions using google calendar, but from what I could see it doesn't use the caldav interface of google cal, is this correct? I'm using a mysql backend for the caldav server, maybe it would be easier to try to get the entries directly from mysql database instead. This is also an option to consider, if there is already functionality in processwire that directly supports this. /Michael Link to comment Share on other sites More sharing options...
kongondo Posted June 22, 2013 Share Posted June 22, 2013 Hi Michael, Welcome to PW and the forums! Being a weekend, things are a bit slow here . Someone more knowledgeable than I will respond in due time and give you an appropriate answer, I believe Link to comment Share on other sites More sharing options...
ryan Posted June 26, 2013 Share Posted June 26, 2013 Michael, it sounds to me like you want to use a web service to display a calendar. Is that correct? Or are you wanting to import the calendar to your site into pages? Since your goal is to display a table with the 5 next events, I think the best bet is to use an approach similar to the MarkupRSS or MarkupTwitterFeed module, which is to poll the web service, display the results, and optionally cache them for a period of time. I've not worked with caldav or baikal, so don't know the considerations there but most likely the approach you take would be the same in ProcessWire as it would be outside of it. Meaning, any PHP examples you find from the company providing the service should be applicable in ProcessWire. Link to comment Share on other sites More sharing options...
mijen Posted June 29, 2013 Author Share Posted June 29, 2013 Kongondo, Thanks! Ryan, I want to list the 5 next events inside my pages, like news headlines, and from there they should be read-only. If users need to modify the calendar entries they will have to use Mozilla Lightning. Caldav is a protocol for communicating with a calendar, there is a good overview of implementations from this link: http://caldav.calconnect.org/index.html From this link (http://caldav.calconnect.org/implementations/librariestools.html) there are Ruby, Python, C, and Java implementations but apparently no PHP implementations. In light of that what would be your recommendation? I prefer not to write a caldav client in php (not only not prefer, also I don't have the skills). Is there some of the existing libraries that are easier to interface with ProcessWire than others? /Michael Link to comment Share on other sites More sharing options...
horst Posted June 29, 2013 Share Posted June 29, 2013 http://www.google.com/search?q=caldav+php+client So, you also don't need a fully client, - you only want to read, not to write. https://github.com/DAViCal/davical/blob/master/inc/caldav-client.php Link to comment Share on other sites More sharing options...
mijen Posted July 2, 2013 Author Share Posted July 2, 2013 Hmm ... good "old" Google is clever again. Next question (forgive me, this _is_ newbie section) is : what is proposed method of integrating this library into processwire? What about username and password security, is there a recommended approach to make it a secure solution? /Michael Link to comment Share on other sites More sharing options...
ryan Posted July 3, 2013 Share Posted July 3, 2013 Next question (forgive me, this _is_ newbie section) is : what is proposed method of integrating this library into processwire? What about username and password security, is there a recommended approach to make it a secure solution? You can include_once() or require_once() the library's autoloader or bootstrap file directly from your ProcessWire template file. You can basically treat ProcessWire template files as plain PHP files and use it in the same manner. If the library is something you are wanting to include on all template files automatically, you might want to include it from an init.php file per the $config->prependTemplateFile option available in /site/config.php. ProcessWire uses blowfish hashing for password security of users in the system, which is the recommended approach. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now