- at 11:16 AM
Chyrp v2.0 RC3 out!
The third release candidate for v2.0 is out. Download here. As usual, read the README for upgrading instructions if you don’t know them already. (tl;dr: disable modules, overwrite junk, run upgrade.php, enable modules, run upgrade.php again.)
What’s new?
Stronger Model backend. Implemented has_many, belongs_to, and has_one relations between models. This is done using the magic
getPHP method. So, for example,$visitor->group()->nameis now$visitor->group->name. The previous method is maintained for backwards compatibility, but will be removed after 2.0 goes final.Added a
paginateTwig block syntax, for paginating over arrays or arrays ofplaceholder‘d Models.Usage:
{% paginate loopvar in perpage source as targarvar %}
$loopvar.title
{% endpaginate %}
loopvaris the variable used within the paginate loop.perpageis how many per page.sourceis the source array.targetvaris the var to set in the main scope, e.g.$targetvar.next_link- Enhanced keyword searching:
Searching post attributes, e.g.
name:Googlefor searching for a link named “Google”Multi-word searches, e.g.
source:"Albert Einstein"- Rewrote the Tagginator module to use the
post_attributestable and YAML.
- Rewrote the Tagginator module to use the
You can also view posts by multiple tags, e.g.
http://example.com/tag/tag1+tag2+tag3/.Comments module now uses the
has_manyModel relationship with Post.Added a
list_notatefunction that turns an array into"foo", "bar", and "baz".Replaced our
truncatefunction with the one from CakePHP, which auto-closes HTML tags. Woo!Added standard
markup_titleandmarkup_textfilters.Added an extensible
emailfunction that serves as amailfallback.Added a
nowhelper that acts as a mask tostrtotime, for hotness likenow("+1 day").Added a
relative_timehelper, for things like10 hours ago. Goes up tomillenia. Just in case.
There were also a lot of fixes in this release. I’m not going to list those though, for the sake of my sanity and time. If something was broken for you before and it works now, well, there you go.
I broke my promise of not adding things in this RC again, but as they’re all completely backwards-compatible, I hope you can forgive me. :)
With this RC everything on my to-do list and every Lighthouse ticket is now closed. As such, this should be a much more traditional RC in that no more major features will be added. I’m now working on the new site.