Flux CMS, Documentation and Popoon
Simon asked me quite some stuff about Flux CMS and if it's good for his project. I answered now on the mailing list, see my post here and if you have something to add, do not hesitate to reply.
Simon asked me quite some stuff about Flux CMS and if it's good for his project. I answered now on the mailing list, see my post here and if you have something to add, do not hesitate to reply.
Flux CMS 1.3.0 didn't properly install on the latest Windows XAMPP installations and therefore I decided to release Flux CMS 1.3.1 today. Here's a short list of the most important changes since the 1.3.0 releases:
- added clipboardpastedialog to BXE
- Added Icons for delete in category/files/image blog-editor
- Fix Sitemap installer on Windows
- Linked Popoon to Popoon 1_1 branch
The SVN revision version of this tag is 6415.
Downloads are available via the wiki.
Beat has written his first port of Flux CMS for FreeBSD (in German). Go ahead and test it :)
In an effort to share more knowledge about how to develop webpages with Flux CMS, we start a this new category called "Snippets", which will contain little code-snippets, tips and tricks about how to get the most of Flux CMS. This is mainly stuff, we use in our daily coding life :) So let's start:
Sometimes you have to reuse the same static content in different places on a webpage. The xhtml plugin, which is mainly used for static content, supports the xinclude standard for including snippets of other XML documents (better said, the libxml2 library supports the xinclude standard, the xhtml plugin just calls this).
Let's say you want to include the <div id="content"> element from another xhtml document, then you just have to add the following line to your xhtml document:
<div id="content">
<xi:include
href="../anothercollection/index.de.xhtml#xmlns(xhtml=http://www.w3.org/1999/xhtml)xpointer(/xhtml:html/xhtml:body/xhtml:div[@id='content']/node())"
parse="xml"/>
</div>
You should not forget to define the xinclude namespace, somewhere in that document:
xmlns:xi="http://www.w3.org/2001/XInclude"
That's it. You now only have to edit the content at one place (in anothercollection/index.de.xhtml).
The xpath in xpointer() can be anything you like, and be aware, that the href attribute has to be relative. You also can include arbitrary xml files this way, they don't have to be xhtml resources.
There are some ideas to make that easier for the enduser, so he/she doesn't have to remember that whole xi:include string, but these are just ideas and no ETA on that.
Even though Flux CMS was always UTF-8 capable, we stored the content entity encoded in the database as MySQL 4.0 was not unicode ready. That changed with MySQL 4.1 and Flux CMS is now finally capable of using it (in the trunk version). If you install it from scratch and let the installer create the database, it will now automatically use the UTF-8 mode (if you have MySQL 4.1, which is highly recommended). If the DB already exists before you install Flux CMS, you should change the default character set to utf8 (see below) before the installation.
If you want to switch an already existing installation to UTF-8 mode, you have to do the following (if you don't do anything, it will still use the "entity-mode", so you don't have to "upgrade". Meaning, if your default character set and colaltion is not utf-8, the old mode is used)
Call
http://yourdomain.org/admin/webinc/update/
export the database with
mysqldump --skip-opt --extended-insert=false --compatible=mysql40 -Q --add-drop-table --complete-insert fluxcms > fluxcms.sql
(or similar that's just our default). Then do
ALTER DATABASE `fluxcms` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
and import the dump again with
mysql fluxcms < fluxcms.sql
without any warranty :) The old entries still will be entity encoded, but new ones not anymore.
Get it, while it's hot :)
There are way too many changes since the 1.2 release. New admin design, more blog features and many others, we lost track, as well...
See also this post for some info about switching the branch.
We plan to release more often in the future, with the new subversion layout it should be easier. The immediate plans for the 1.4 release aren't that big and could be not that far off.
The 1_3 branch will now only get bugfixes, new features go only in trunk. It's at the moment quite safe to use trunk, as we use this for projects we're currently working in. That's also the reason, why there almost certainly will be a 1.4 release soon.
Writing a new plugin in Flux CMS is an easy task, if you know how :) But now, it's even easier. I wrote a little script, which takes all the necessary tasks off you. Just call from the commandline:
php inc/bx/tools/generate/plugin.php
give the plugin a name and the script will generate the following files:
inc/plugins/yourplugin.php
themes/{folder}/yourplugin.xsl
data/yourplugin/.configxml
And you can start coding (and directly testing it with calling http://example.org/yourplugin/)
But it can more than that. If you already have a database table with data, which the plugin should use, you can tell the installer that (without the table prefix). It will then automatically create the necessary dbforms2 XML document (in the dbforms2/ directory), so that you can directly start editing the data with dbforms2 (just call it with http://example.org/admin/dbforms2/tablename/). The example XSLT and the plugin also uses then this DB data, outputs it as overview and in detail view.
Notice: The table needs to have the correct tablePrefix (bxcms_ by default) and a columns named "id".
Hope that helps in creating new plugins and getting started faster with Flux CMS.
Update: I made a little screencast about setting the db-table up, creating the plugin and editing the data with dbforms2 (there's no audio, btw :) )
The amount of trackback spam we get is amazing. It's all (or most of) rejected due to our spam filters, but it's still unnecessary (Most of you won't detect it anyway, as we don't send rejected comment notification mails by default). To at least cut down that a little bit, we added a new global option (goes into conf/config.xml): "blogTrackbacksTimeLimit". If that is set to true (it is by default), trackbacks are disabled after one month. I think, that in very few cases one has to trackback a post, which is more than a month old (very few people trackback at all anyway). And if you leave the comments open, that person can still do a "Manual Trackback" then.
I put this into the 1.3 branch as well, as it shouldn't break anything (but as usual, you should delete the tmp/dir after an update).
If you have a customized theme, you have to adjust blog.xsl, so that it doesn't display the trackback url anymore, if trackbacks aren't allowed. See the diff for what has to be done. If you don't change it, trackbacks are still not accepted, just the text on the post itself is missleading :)
We finally did it, we branched the upcoming 1.3 release of Flux CMS. And when we were at it, we renamed the trunk too to reflect the new name better and fix some inconsistencies, so read the following carefully.
The SVN branch of the 1.3 branch is available at:
https://svn.bitflux.ch/repos/public/fluxcms_demo/branches/1_3/
The new location for the trunk is at:
https://svn.bitflux.ch/repos/public/fluxcms_demo/trunk/
The old location of trunk is still there, but won't be updated anymore.
To make the switch easier, I wrote a little script, which should do everything for you *without* having to check out everything again (and without making *.OLD directories, if everything goes well). You can find the scripts in the bin/ directory and they are called switch-to-1_3-branch.sh resp. switch-to-trunk.sh. Call them from your project directory with "bash bin/switch-to-trunk.sh".
If you want to run a production website, we highly recommend checking out the 1.3 branch as trunk will be unstable in the near future (and may be not always backwards compatible).
The old trunk location (https://svn.bitflux.ch/repos/public/bxcmsng/) is still available, but won't be updated anymore. But the switch scripts are in there as well.
We of course also have snapshots of those new branches. See the wiki for further details.
The actual 1.3.0 release will be in the next days, unless any showstoppers are found.