- Use OC_TemplateLayout to render the layout. All apps using TALTemplate
will have to update their templates and remove any markup besides what
they want rendered. See the manual for more info.
- The classes now uses the OCA\TAL namespace.
NOTE: This version requires adjusting of your templates.
Since version 0.2 TAL Page Templates uses OC_TemplateLayout to, well, layout the page
This means that you will have to strip your templates from any HTML elements sorrounding your content.
If your page previously looked like:
From: Frank Karlitschek
To: "firstname.lastname@example.org Mailinglist"
Date: Wed, 20 Feb 2013
I'm very happy to announce the beta 1 of ownCloud 5
You can download it here:
This is beta quality and it is not recommended to use this in a production environment.
But if you want to help with testing and QA please download it and give feedback on
Let's give it a hard test.
The new encryption system is not yet part of this release but it will be included in
the next beta. An improved UI for the external filesystem mounting will also come with
the next beta.
Thanks to everybody who contributed and especially the people who worked super hard on
fixing bugs in the last few weeks and during the developer sprint last weekend.
You guys rock!!!
I've never used Ruby even though it's apparently the language of the hour (or maybe some hours ago - I'm often late on such stuff), but had to use it today to run some scripts. I didn't know what RVM was until a couple of hours ago, but when I had to use it, I found out that the package doesn't exist on 12.10 :-/
There's probably some PPA out there with updated packages, but a quick search didn't reveal any, so I decided to install it manually. As the packaged Ruby is kinda outdated, and doesn't match with some of the gems, I also installed a fresh version of that. To avoid clashing with anything that might need the packaged version, I installed it in my home directory. Luckily the RVM packagers made it very simple to do.
Back in January I wrote a post about syncing your Nokia N900 with ownCloud (btw, please read that first, if you have any questions/problems using the instructions here). Since I got a lot of very good advice and information in the comments on it, I thought I would post an update with a simpler and more correct configuration. Karel, who also commented on the post, was kind enough to send me his setup. Please refer to the original post for info about connecting to your device with SSH etc. For reference I use syncevolution version 1.2.2-1 from the extras-devel repository and a snapshot of ownCloud from git master, but it should also work fine with a recent 4.0.x release.
As in the original post owncloud refers to the URL to the root of your onCloud installation e.g. http://example.com/owncloud, user is your login and password is your password.
My default calendar is called calendar and my address book is called default.
First create a main configuration for ownCloud:
The N900 database is the standard storage. You can see the available ones by running syncevolution from the command line, and you can create new local calendars from the Calendar app and link them to e.g. your Work and Private calendars, just remember that the case matters, so the names must be entered exactly as they are printed by syncevolution.
And the address book:
This should just show the URI part of all contacts.
If everything worked out OK it's time to do the actual syncing. If you already have events and/or contacts on your device you want to keep you should do an initial slow sync:
syncevolution --sync slow owncloud
Some times you need to do it several times for it to succeed, but once you don't get any more error you can run a normal incrementel sync just by running
I chose to update everything from the server and ran
This article is looong overdue. I started it in July 2012 and never got any further, but now ownCloud 5 is released, and I have just released version 0.2 of TAL Page Templates for ownCloud so here it goes
(Some of the examples for "current" ownCloud templates are a bit outdated, but I hope you get the gist of it)
In last episode of...
In the previous post about TAL Page Templates for ownCloud I gave my reasons for wanting to implement PHPTAL in ownCloud, and gave a short example of the benefits it will give for the developer. I wrote I "...will dig deeper into how to use it to render a full page, how to access variables, how to make use of the powerfull METAL.." which I have later decided not to do, as many have described that better than I could do, so if you're not familiar with TAL and METAL, there's plenty to read in the resources section in that post. I also wrote that I would show "...how I’ve plugged it all in to use ownClouds built-in authentication, template discovery and internationalization system", but thinking about it, there is no reason for showing how it's implemented, but rather I should show more of how to use the ownCloud specific parts.
So this will mostly be a manual-like listing of how to use TAL page templates compared to the current use of inline PHP code.
With ownCloud 5 comes the new App Framework with another template engine - Twig. Personally I'm not very fond of the Twig markup, so hopefully from ownCloud 6 it will be possible to choose which engine to use. The App Framework is still very new, and I haven't explored it properly, but I'm sure it will be a great adition to ownCloud - especially if you can use TAL to write your templates
Links and images
A lot of the scripting used in ownClouds page templates is for linking to apps, pages, services and images. There are several convenience methods for this. PHPTAL implements the standard set of TALES expressions, but also allows you to create custom expression modifiers. I have utilized this to substitute the direct PHP calls.
About reaching the goal and beautifying the path or Usability is also about the code (usability in the code?).
Many moons ago, when I unintentionally had ended up as a web developer, I had the pleasure of working for two small companies that both used Plone and hence ZPT - Zope Page Templates. After messing around with allkinds of ugly, inconsistent web coding, it was a relief to be able to use the clean markup that TAL provides, and seamlessly assemble pages using METAL.
Using Zope also had the benefit of having Python as it's backend scripting language. I don't want to dive into how much I prefer Python over PHP - enough has been said about that already - and I fully acknowledge that the ubiquity of PHP makes it the perfect choice for a project like ownCloud. Nor do I want to question the strength of the template class used in ownCloud; you can do practically everything. But the strength of OC_Template is IMHO also it's weakness.
During the few months I've been coding for ownCloud, ideas for it's usage have spawned, new apps pop up, code is being tweaked to do amazing stuff and soon the app repository will be "there's an app for that" also for ownCloud.
Being at the point where everyone can create and publish an app for ownCloud sets up some requirements:
Maintainability: If the app is ever abandoned, it has to be easy for a new maintainer to take over. This leads to:
Readability: No-one wants to maintain an app with poorly structured code and markup, or with none or insufficient documentation.
Validity: This is very broad and covers e.g. packaging, cross browser usability and that the markup adheres to common standards.
Maintain the beauty of the markup.
With the Template Attribute Language (TAL) we can achieve having beautifully structured markup, and the interpreter will let us know of any missing end tags or wrongly nested markup, as a matter of fact the page won't render if we mess it up.
The good thing is that some good people have made a PHP library that implements TAL, TALES and METAL, so I've made a proof of concept ownCloud integration using it, which actually works pretty well, if I may say so
Time to show what this will mean for the template author. As example I use the form for editing the structured name data in the ownCloud Contacts app.
Below is how the currently used markup looks.
This isn't exactly pretty, and if you want to use a visual HTML editor, it won't look good there either. And believe me, this isn't the worst looking example
Let's see the same snippet edited for using TAL and TALES
In part 1 I've shown the basics of using TAL, but this is only a foretaste of how PHPTAL can be used in ownCloud. In the next part - hopefully comming shortly - I will dig deeper into how to use it to render a full page, how to access variables, how to make use of the powerfull METAL macros and how I've plugged it all in to use ownClouds built-in authentication, template discovery and internationalization system.
In the meanwhile have a look at the resources below for information about TAL, TALES and METAL
Update: I wrote this article quite a while ago, but never got around to publishing it. In the mean time I've made my implementation available at https://github.com/tanghus/tal/ and made a Journal/Notes app utilizing it which is available at https://github.com/tanghus/journal/. I will publish both soon at the ownCloud app repository. Update 2: The TAL Page Templates only works on current git master which will be released as ownCloud 5 in some time within the next couple of months
Update 3: I have released TAL Page Templates for ownCloud 4.5 and it is available from the app repository, or from Settings/Apps when you have installed/upgraded to 4.5. At the same time I have released a small Journal/Notes app which uses the TAL templates.
I have my ownCloud instance in a sub-domain at my hosting provider, so I prefer to make a weekly backup of my calendar and contacts. There is no documented way of doing this afaik, but if you run a *nix-like system where wget is installed, it's actually pretty straight forward.
In this example owncloud refers to the URL to the root of your ownCloud installation e.g. http://example.com/owncloud, user is your login and password is your password.
The URL to use is the same you use if you want to download the calendar or address book manually. In the upper, right corner of the Calendar and the Contacts app, there's a button named respectively Calendars and Address books. When you click on that, you get a dialog box with a list of your calendar(s) and address book(s). The screen shot below is from the Contacts app. To download manually push the button. Instead of doing that, right-click on it, and select "Copy link location" (or whatever your browser calls it) from the context menu.
Your clipboard will now hold a URL looking something owncloud/apps/contacts/export.php?bookid=1 - for the calendar it would look like owncloud/apps/calendar/export.php?calid=1.
Make a simple script using those URLs:
The --auth-no-challenge is to avoid having the server send an authentication challenge, which would mess up the download. The --no-clobber is to avoid downloading a file that already exists. When gzipping the downloaded file it gets a .gz extension appended to the filename, so it should normally not be an issue though. The backup files will now have names containing the year and week number like contacts-2012-17.vcf.gz and calendar-2012-17.ics.gz. If you prefer to backup in another schedule than weekly, you will of course have to change the date command accordingly.
Save the script somewhere preferably in your PATH - I use ~/bin for my scripts - and make it executable: chmod u+x ~/bin/owncloud_backup.sh - or whatever you choose to call it. Test if the script works and set it up to run on a regular basis as a cron job or any other job scheduler; I use KAlarm because it's so damn easy to use
You could use curl instead of wget, it's just a matter of preference.
Update: As Klaus Muth mentions in a comment, it cannot be stressed enough that this method should not be used in a multi user environment as it places passwords in the process list at runtime.
Update 2 June 13 2012: I have updated the paths for ownCloud >= 4.3 (git master and stable4). HTTP Auth was broken in versions before that.
I freaking hate AppArmor! Of course only because I don't want to be bothered when an update makes a mess of it - I really don't know how it works but I don't want to need to know either. Some months ago I tried out Logitech Media Server on my box, and it screwed it up big time. Now it seems there has been an update, so it doesn't accept symlinks anymore. It seems logical that it shouldn't, but Ubuntu could have done a better job fixing it - or maybe it's because I had already edited it, that it didn't get updated..? A search lead me to an issue at Launchpad about it, but I've only skimmed through it.
Anyways, today when I rebooted MySQL wouldn't run and /var/log/syslog was filled with entries like this:
Mar 30 11:55:31 tanghus kernel: [ 1309.198481] type=1400 audit(1333101331.343:97): apparmor="DENIED" operation="mknod" parent=1 profile="/usr/sbin/mysqld" name="/run/mysqld/mysqld.sock" pid=7192 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=114 ouid=114
Mar 30 11:55:36 tanghus kernel: [ 1314.463559] init: mysql main process (7192) terminated with status 1
Mar 30 11:55:36 tanghus kernel: [ 1314.463606] init: mysql main process ended, respawning
Mar 30 11:56:01 tanghus kernel: [ 1339.105333] init: mysql post-start process (7194) terminated with status 1
Mar 30 11:56:01 tanghus kernel: [ 1339.111425] type=1400 audit(1333101361.335:98): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=7291 comm="apparmor_parser"
To fix it edit /etc/apparmor.d/usr.sbin.mysqld and replace the lines:
and restart mysql by running sudo service mysql restart - if it doesn't respawn by itself. AppArmor should automagically refresh from the change of it's configuration file, otherwise run sudo service apparmor restart.
One could argue so. Harald Sitter (apachelogger) tells that a lot of the base software Kubuntu relies on, will move from the main to universe repository, and that it:
(...) bares a great deal of opportunities for Kubuntu. Primarily it gives the community yet bigger control over what the distribution looks like as we do not need to get software approved to be worthy of Canonical’s support. At the same time it also reduces the policy overhead (main inclusion for those who have heared of it). The detanglement allows us to move even closer to KDE without having to worry about conflicting interests (...)
I have used Kubuntu since one of the first releases (something with a hedgehog?) and enjoy that KDE packages appears in the PPA fast and well tested. One of my major complaints about Kubuntu is that packages such as qtwebkit are totally out of date, and causes crashes and lack of functionality in the up-to-date KDE programs and libraries.
Maybe a really community driven Kubuntu will prove to be much better in the long run?
Via How Kubuntu Did Not Change | Apachelogger's Log.
Like so many other people have said: It's too little, too late.
Google has scared away a LOT of people, including me who wasn't even subject to their name witch hunt. I have deleted my G+ account, and I don't want it back. I don't want to be part of a "community" where I can risk being asked about identification, or if I know the right people. The former sounds like a police state, the latter either as a fancy night club, or the local biker gang - I'm not sure which is worst.