<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mFabrik - mobile sites, apps, HTML5 and CMS software development &#187; cms</title>
	<atom:link href="http://blog.mfabrik.com/tag/cms/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mfabrik.com</link>
	<description>Freedom delivered.</description>
	<lastBuildDate>Wed, 03 Aug 2011 09:47:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Making Plone easy again (and Sauna Sprint topics)</title>
		<link>http://blog.mfabrik.com/2011/06/08/making-plone-easy-again-and-sauna-sprint-topics/</link>
		<comments>http://blog.mfabrik.com/2011/06/08/making-plone-easy-again-and-sauna-sprint-topics/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 08:14:28 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sauna sprint]]></category>
		<category><![CDATA[sphinx]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=1274</guid>
		<description><![CDATA[This blog post is about making Plone CMS to accessible for more developers. This is a major topic on which we are working on in Sauna Sprint 2011 (see the previous blog post about Sauna Sprint and motivation to come to Finland). Preface Please do not take this post too seriously if I am ranting [...]]]></description>
			<content:encoded><![CDATA[<p>This blog post is about making <a href="http://plone.org">Plone CMS</a> to accessible for more developers. This is a major topic on which we are working on in Sauna Sprint 2011 (<a href="http://blog.mfabrik.com/2011/06/08/sauna-sprint-2011-motivational-blog-post-%E8%9A%8A%E3%81%8C%E6%A5%BD%E3%81%97%E3%81%84%E3%81%A7%E3%81%99/">see the previous blog post about Sauna Sprint and motivation to come to Finland</a>).</p>
<h2>Preface</h2>
<p>Please do not take this post too seriously if I am ranting tongue-in-cheek. This thinking does not reflect the official opinion of Sauna Sprint team any way, it is just my personal rambling.</p>
<h2>Background</h2>
<p>Plone is having popularity issues. This can be deducted by:</p>
<ul>
<li>PHP CMS are more popular (Google trends and so on)</li>
<li><a href="http://amplicate.com/love/plone">Plone lacks love</a></li>
<li>By discussing with Python programmers outside Plone community: they see Plone as monster</li>
</ul>
<p>Plone is a superior CMS product (feature wise, polish wise, tech wise, and so on). So how did this happen?</p>
<p>My theory, you are free to disagree, is that the community has been driving &#8220;wrong&#8221; ideologies</p>
<ul>
<li>Plone&#8217;s &#8220;buyers&#8221; are not users, but developers</li>
<li>There has been no driving community factor to make Plone accessible for more developers. Plone community has been working to make Plone work for the existing community members, not new members. The consulting companies have been too busy to extract money from their existing big clients. It might even be that it&#8217;s the best interest of these companies to keep the barrier of entry high, as this way they protect the Plone business for themselves. Note that this strategy will fail in the point there is no longer Plone business.</li>
</ul>
<p>The big boys are telling that customers are abandoning Plone, because there are no developers. I know a lot of Plone developers, looking for more Plone work.  I&#8217;ll translate this that there are not enough affordable Plone developers entering the market.</p>
<p>I am also not buying arguments like</p>
<ul>
<li>&#8220;don&#8217;t compare apples to oranges (Django vs. Plone)&#8221;</li>
<li>&#8220;its history and evolved that way&#8221;</li>
<li>&#8220;big tool must be complex&#8221;</li>
</ul>
<h2>The result</h2>
<p>Plone is easy to use, but hard to develop. <strong>If you need to use code generators and boiler-plate in Python code, you are doing it wrong.</strong></p>
<p>Plone is a soup of different, non-mainstream, technologies. To be a Plonista you need master: Python (ok docs), Plone user mode (good docs),  Zope component architecture (some docs), ZCML (no useful docs), GenericSetup  (no docs), TAL (some docs), Archetypes (basically no docs), buildout  (aaaaaarghs) &#8230; You have too much to learn from material which does not exist. Today the material effectively does not exist if it&#8217;s not your first Google hit &#8211; I am against book.</p>
<p>New developers are not getting in. It is easier to duplicate basic Plone functionality in a hacky in-house Django CMS than customize Plone for your use case. Plone does not give any more added value to the new developers. There is no business motivation to adapt Plone as a technology platform in new ventures.</p>
<h2>The quest</h2>
<p>Let&#8217;s fix it, as I see the developer acceptance the most crucial challenge Plone community is facing if the community wants to survive.</p>
<p>What we can do here is</p>
<ul>
<li>Make Plone easier for developers</li>
<li>Make more, better, learning material available</li>
<li>Eliminate and protect against factors in Plone which hinder the goals of two above bullets (do not include new technologies or modules to core if they make developers sad)</li>
</ul>
<p>To accomplish this we can</p>
<ol>
<li>Promote &#8220;easy&#8221; technologies inside and outside Plone community (Dexterity over Archetypes, Grok over ZCML)</li>
<li>Making a standard workflow available for them (Django style tutorial that do 1, 2, 3 and you are a certified Plone developer)</li>
<li>Kill technologies which make the stack unnecessary complex and are not necessarily needed in newbie use cases (buildout, I am looking at you)</li>
<li>Replace old, badly documented and difficult solutions with easier ones  (could we actually replace TAL with something more popular?)</li>
</ol>
<h2>Operational plan</h2>
<p>Here are some concrete tasks what we could tackle in Sauna Sprint.</p>
<p>Make it easy department</p>
<ul>
<li>Plone auto-restart team: provide working and fast auto-restart á la Django or Tornado (hint: plone.reload doesn&#8217;t cut it &#8211; you need real restarts process-wise)</li>
<li>Default custom product team: ship Plone with a file-system based custom product skeleton, so that when you need to include your first custom Python module you don&#8217;t need to learn about buildout and paster first . You actually can copy-paste in Python code and it just works.</li>
<li>Through-the-web is happy again team: Make it possible to code and execute Python through-the-web so that it actually works.: a working replacement for RestrictedPython</li>
</ul>
<p>Fix user-wise broken things department</p>
<ul>
<li>Buildout team: make buildout more user friendly: spit out error messages which are actually useful, have newbie buildout tutorial from the developer perspective. Nothing bad should happen when buildout is run. Make buildout to confirm version updates, etc.</li>
<li>Anti-buildout team: how to install eggs without buildout. Why did we need the buildout in the first place?</li>
</ul>
<p>This is how you do it department</p>
<ul>
<li>Tutorial team: Make &#8220;gapless&#8221; hand-holding tutorial for creating your first view, form and content-type. Make it so that you do not need to look outside the tutorial or learn anything unnecessary (don&#8217;t make me think)</li>
<li>Picture team: draw big pictures of Plone architecture, how different parts are connected, so that new developers get hang on things easily</li>
<li>Document generator team: Integrate collective.developermanual with Sphinx tool that generate the reference  documentation from the source code: views, viewlets, templates, CSS classes, portlets, etc.</li>
</ul>
<p>Hasta la vista babe department</p>
<ul>
<li>Kill it with fire team: Hunt down all bad learning material and make it redirect to new learning material (no ExternalMethods, no Install.py, no plone_skins, etc.)</li>
<li>Nuke it from orbit team: I am not sure what this team could do, but I like the feeling of the name</li>
</ul>
<p>We hope that novice  developers attend the sprint. This way we can use you as guinea pigs and document the pain points on a road to become Plone developer. Don&#8217;t worry &#8211; we&#8217;ll inject you with proper medicine to numb the pain and forget bad memories.
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/06/08/making-plone-easy-again-and-sauna-sprint-topics/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Web and Mobile 1.0.3 released, Plone 4.1 compatible</title>
		<link>http://blog.mfabrik.com/2011/06/02/web-and-mobile-1-0-3-released-plone-4-1-compatible/</link>
		<comments>http://blog.mfabrik.com/2011/06/02/web-and-mobile-1-0-3-released-plone-4-1-compatible/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 17:39:43 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[convergence]]></category>
		<category><![CDATA[multichannel]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=1285</guid>
		<description><![CDATA[I just released Web and Mobile 1.0.3. It has some minor compatibility fixes for Plone 4.1 (in fact there was nothing broken besides unit tests). Please update your buildout pindowns for Dexterity 1.0: extends = http://dist.plone.org/release/4.1rc2/versions.cfg http://good-py.appspot.com/release/dexterity/1.0?plone=4.1rc2 Please report all the issues in the issue tracker. &#160; &#160; Get developers  Subscribe mFabrik blog in a [...]]]></description>
			<content:encoded><![CDATA[<p>I just released <a href="http://plone.org/products/web-and-mobile">Web and Mobile 1.0.3</a>. It has some minor compatibility fixes for Plone 4.1 (in fact there was nothing broken besides unit tests).</p>
<p>Please update your buildout pindowns for Dexterity 1.0:</p>
<pre>extends =

http://dist.plone.org/release/4.1rc2/versions.cfg

http://good-py.appspot.com/release/dexterity/1.0?plone=4.1rc2</pre>
<p>Please report all the issues in <a href="http://code.google.com/p/plonegomobile/issues/list">the issue tracker</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/06/02/web-and-mobile-1-0-3-released-plone-4-1-compatible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: create and theme mobile Plone site with Web and Mobile</title>
		<link>http://blog.mfabrik.com/2011/04/11/tutorial-create-and-theme-mobile-plone-site-with-web-and-mobile/</link>
		<comments>http://blog.mfabrik.com/2011/04/11/tutorial-create-and-theme-mobile-plone-site-with-web-and-mobile/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 19:41:16 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[zope]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[lxml]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web and mobile]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=1055</guid>
		<description><![CDATA[This is a short tutorial how to mobilize your Plone web site using Web and Mobile CMS and apply some custom theming on it. Web and Mobile 1.0 has now been independently deployed by various organizations in  Switzerland, Netherlands, USA and German. If you get stuck in a point please ask questions on the gomobile-dev [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short tutorial how to mobilize your Plone web site using <a href="http://webandmobile.mfabrik.com">Web and Mobile CMS</a> and apply some custom theming on it. <a href="http://plone.org/products/web-and-mobile">Web and Mobile 1.0</a> has now been independently deployed by various organizations in  <a href="http://www.seantis.ch/news/mobile.amtsblatt.ch">Switzerland</a>, <a href="http://m.zestsoftware.nl/">Netherlands</a>, <a href="http://m.tsachoice.com/">USA</a> and <a href="http://m.veit-schiele.de/">German</a>.</p>
<p>If you get stuck in a point <a href="http://groups.google.com/group/gomobile-dev">please ask questions on the gomobile-dev discussion forum</a>.</p>
<h2>Prerequisites</h2>
<ul>
<li>Basic Plone development skills</li>
<li><a href="http://plone.org/products/zopeskel">Basic ZopeSkel knowledge</a></li>
<li>Basic <a href="http://plone.org/products/dexterity/documentation/manual/five.grok">five.grok knowledge</a> (<a href="http://grok.zope.org/">Grok framework</a> integration for Plone)</li>
</ul>
<p>This tutorial is little rough on details, but links to authoritative sources for more in-depth information. I hope to further polish this tutorial based on the user comments.</p>
<p><em>Note: currently the installation process does not work from China, as the local access to code.google.com and appspot.com servers is limited.<br />
</em></p>
<h2>Installation</h2>
<p><a href="http://webandmobile.mfabrik.com/docs/web-and-mobile/user-manual/installation#plone-4-buildout-cfg-changes">Install Web and Mobile to your buildout</a>.</p>
<p><a href="http://groups.google.com/group/gomobile-dev/browse_thread/thread/7f5e34e991cfdaa9">Possibly fight with lxml to get it running</a>.</p>
<p>Create a Plone site (if you don&#8217;t already have an existing site).</p>
<p>Then install following add-ons, in this order in the site control panel</p>
<ul>
<li>Go Mobile</li>
<li>Go Mobile Default Theme</li>
</ul>
<p>Now your website should have a basic mobile experience with a default Web and Mobile theme.</p>
<p><a href="http://blog.mfabrik.com/wp-content/uploads/2011/04/Screen-shot-2010-10-27-at-1.38.42-PM.png"><img class="alignnone size-medium wp-image-1207" title="Screen shot 2010-10-27 at 1.38.42 PM" src="http://blog.mfabrik.com/wp-content/uploads/2011/04/Screen-shot-2010-10-27-at-1.38.42-PM-287x300.png" alt="" width="287" height="300" /></a></p>
<h2>Test mobile site</h2>
<p><a href="http://webandmobile.mfabrik.com/docs/web-and-mobile/user-manual/installation#modifying-your-local-hosts-file">You can visit the mobile version of your site by putting a m.localhost domain in your /etc/hosts file</a>. You don&#8217;t need a mobile browser, as the mobile site is detected by a domain name by default. Your mobile site should be available from http://m.localhost:8080/Plone</p>
<p><a href="http://webandmobile.mfabrik.com/docs/web-and-mobile/user-manual/redirector">If you access the website with a mobile browser you will be automatically redirected to a mobile site</a>.</p>
<h2>Creating a mobile theme</h2>
<p>Install the ZopeSkel based mobile theme template to your buildout.cfg.</p>
<pre>parts =
   ...
   paster

[paster]
recipe = zc.recipe.egg
eggs =
  PasteScript
  gomobile.templates
  ${instance:eggs}</pre>
<p>Rerun buildout to enable <em>bin/paster</em> command:</p>
<pre>bin/buildout</pre>
<p>Create a theme skeleton using paster. We use a Python package named <em>gomobiletheme.yourcompanyname</em> here as an example name for the theme package. If it asks for &#8220;override files&#8221; answer yes:</p>
<pre>cd src
 ../bin/paster create -t gomobile_theme gomobiletheme.yourcompanyname</pre>
<p>List your new theme egg in buildout in develop-eggs. (Alternatively: use mr.developer  if you indent to put it directly under version control.)</p>
<pre>eggs =
    gomobiletheme.yourcompany
develop =
   src/gomobiletheme.yourcompan</pre>
<p>Rerun buildout.</p>
<h2>Test theme skeleton</h2>
<p>Test the theme installs and works. Restart Plone and install your theme add-on in the add-on installer.</p>
<p>Navigate to m.localhost again and see that the mobile site still opens.</p>
<h2>Theme theory</h2>
<p>The generated mobile theme includes five.grok based <em>viewlets.py</em> and <em>view.py</em> files where you are to place</p>
<ul>
<li>Mobile theme viewlets (note: mobile theme does not use viewlet managers)</li>
<li>Mobile specific view overrides</li>
<li>Mobile specific page template overrides</li>
</ul>
<p>All <a href="http://collective-docs.plone.org/views/layers.html">visual code registered against</a> <em>gomobiletheme.yourcompany.interfaces.IThemeLayer</em> is available and used when your site is browser in mobile mode.</p>
<h2>Changing logo</h2>
<p>Change the generated <em>gomobile.yourcompany.viewlets.Logo</em> class.  In the example below we set it to use logo image file from our web theme.</p>
<pre>class Logo(base.Logo):

 # Change logo URI here
 def getLogoPath(self):
 return "++resource++plonetheme.yourwebtheme.images/logo.png"</pre>
<p>If you are using logo from the web theme resource directory, make sure &lt;resourceDirectory&gt; in theme browser/configure.zcml does not have &lt;resourceDirectory layer=&#8221;"&gt; set. If it&#8217;s set the resource directory is not activate for the mobile theme and the mobile theme cannot access the logo file.</p>
<p>The logo image is resized automatically by <em>gomobiletheme.basic.viewlets.Logo</em> base class for different mobile screen resolutions.</p>
<h2>Changing footer text</h2>
<p>In <em>viewlets.py</em> add:</p>
<pre>class FooterText(base.FooterText):
 """ Free-form HTML text at the end of the page """

 # the presence of this viewlet includes a new page template
 # and overrides default footertext</pre>
<p>Then include the page template itself. Add new file to the your theme package <em>templates/footertext.pt</em>:</p>
<pre>&lt;div id="footer-text" i18n:domain="isleofback.app"&gt;
 Your text goes here.
&lt;/div&gt;</pre>
<h2>Change the default colours and CSS</h2>
<p>Mobile theme static CSS and Javascript resources are provided by five.grok <em>static</em> folder mechanism. <a href="http://webandmobile.mfabrik.com/docs/web-and-mobile/developer-manual/transformations">Transformations document provides some in-sight for different CSS files used by different handsets</a>: <em>common.css</em> is served to all mobile phones, <em>highend.css</em> for Webkit and Firefox based browsers, <em>lowend.css</em> for limited browsers.</p>
<p>The default <a href="http://plonegomobile.googlecode.com/svn/gomobiletheme.basic/trunk/gomobiletheme/basic/static/">gomobiletheme.basic</a> CSS resources are included by default with the theme skeleton. You need override only the CSS rules you specifically want to change for your own  theme. <a href="http://code.google.com/p/plonegomobile/source/browse/#svn%2Fgomobile.templates%2Ftrunk%2Fgomobile%2Ftemplates%2Ftemplates%2Fgomobile_theme%2F%2Bnamespace_package%2B%2F%2Bpackage%2B%2Fstatic">This can be done by adding rules to common.css, lowend.css and highend.css files which you can find from the generated theme package.</a></p>
<h2>Further info</h2>
<ul>
<li><a href="http://webandmobile.mfabrik.com/docs/web-and-mobile/developer-manual/theming">Read theming manual in Web and Mobile documentation section</a>.</li>
<li><a href="http://www.slideshare.net/miohtama/mad-about-mobile">See Web and Mobile presentation in Plone Conference 2010</a></li>
<li><a href="http://code.google.com/p/plonegomobile/source/browse/#svn%2Fplonecommunity.app%2Ftrunk%2Fplonecommunity%2Fapp">See plonecommunity.app package for an open source example</a></li>
<li><a href="http://code.google.com/p/plonegomobile/source/browse/gomobile.docs/trunk/gomobile/docs/manual/developer-manual/theming.txt">SVN trunk version of the theming manual for the latest instructions</a></li>
<li><a href="http://groups.google.com/group/gomobile-dev">Subscribe to Web and Mobile discussion group for further questions</a></li>
</ul>
<p>&nbsp;
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/04/11/tutorial-create-and-theme-mobile-plone-site-with-web-and-mobile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple push notifications (APN) with Python</title>
		<link>http://blog.mfabrik.com/2011/01/29/apple-push-notifications-apn-with-python/</link>
		<comments>http://blog.mfabrik.com/2011/01/29/apple-push-notifications-apn-with-python/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 14:14:39 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[ios]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[Android Cloud to Device Messaging (C2DM)]]></category>
		<category><![CDATA[apn]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[apple push notification]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[bitbucket]]></category>
		<category><![CDATA[bitreader]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[froyo]]></category>
		<category><![CDATA[google cloud push]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=942</guid>
		<description><![CDATA[We have created a middleware service which inputs RSS feeds and outputs Apple Push Notification. This allows integrate push notification support for your existing content management system easily. This blog post should give you some ideas if you are planning to create similar services. To have the über-experience of customer engagement with mobile push notifications [...]]]></description>
			<content:encoded><![CDATA[<p>We have created a middleware service which inputs RSS feeds and outputs Apple Push Notification. This allows integrate push notification support for your existing content management system easily. This blog post should give you some ideas if you are planning to create similar services.</p>
<p>To have the über-experience of <em>customer engagement</em> with mobile push notifications you need</p>
<ul>
<li>A mobile application (iOS, Android 2.2)</li>
<li>RSS feed to notifications middleware server (our solution)</li>
<li>RSS feeds themselves</li>
<li>Windows/UNIX server running the middleware</li>
</ul>
<h2>How it is put together</h2>
<p><a href="http://www.tornadoweb.org/">Tornado</a> web server is used to handle incoming HTTP requests in scalable manner.</p>
<p><a href="http://code.google.com/p/feedparser/">feedparser</a> library fetches RSS feeds and processes them to client notifications.</p>
<p>BitReader (<a href="http://blog.mfabrik.com/2010/09/08/bitreader-python-module-for-reading-bits-from-bytes/">post</a>, <a href="https://bitbucket.org/jtoivola/bitreader/wiki/Home">source</a>) library is used to create messages to interact with <a href="http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html">Apple push notification service</a> (APNs). The protocol is bit based protocol running directly over TCP/IP. Apple service has been designed to handle high volumes of traffic &#8211; it does not use anything like stateless HTTP to waste bandwidth.</p>
<p>Django models are used to store the state of each individual subscriber. Django&#8217;s ORM abstraction allows us to use the same middleware for small distributions (&lt; 1000 clients, SQLite database) or big ones (millions of clients, MySQL database). The stored state information includes the subscriber id and the current badge number &#8211; the red circle on the app icon showing the count unread posts. When the application is launched, it can decrease its badge number by doing a HTTP call to the server.</p>
<p>Django settings are used to put together required certificates and whether the application is run in sandbox mode.</p>
<h2>Walkthrough</h2>
<p>There is a core IO loop, running in a separate process, called <em>stream observer</em>. This loops updates fetches RSS feeds&#8217; status and passes updates to Tornado server over HTTP.  With this arrangement, any HTTP capable client can send push notifications.</p>
<p>Tornado handles incoming updates, updates the related subscribe status &#8211; how many unread notifications, etc. through exposed Django views. The notification is formatted according to the variables available on the subscriber mobile platform. In Apple&#8217;s case, the notification message gets title, badge, sound and a launch image. Payload is checked against hard 256 byte limit.</p>
<p>Then the payload is pushed to <a href="http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html">Apple servers</a> over TCP/IP protocol. SSL certificaties needed.</p>
<p>A subscriber is registered  when the mobile application is launched. The application asks a subscriber id from Apple servers. Then, this subscriber id is delivered to our middleware over normal HTTP call.</p>
<p>The middleware also handles feedback service which gives you list of devices which have unsubscribed from your service. This way you can cut off notifications from unsubscribed clients. This is also done using BitReader and TCP/IP.</p>
<h2>Future</h2>
<p>The architecture is built so that different push backends can be included in the service. Android support is on the roadmap and we probably will have Blackberry and Meego support (when/if Nokia announces such a service).</p>
<p>We have currently tested this solution with RSS streams from WordPress and Plone.</p>
<p>We may release source code when it&#8217;s ready.</p>
<h2>More info</h2>
<ul>
<li><a href="http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/">http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/</a></li>
</ul>
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/01/29/apple-push-notifications-apn-with-python/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Plone 4 released &#8211; the best open source CMS of 2010?</title>
		<link>http://blog.mfabrik.com/2010/09/01/plone-4-released-the-best-open-source-cms-of-2010/</link>
		<comments>http://blog.mfabrik.com/2010/09/01/plone-4-released-the-best-open-source-cms-of-2010/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 11:32:57 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=720</guid>
		<description><![CDATA[The long awaited version 4 of enterprise grade Plone CMS has been released. Plone 4 is up to 5x times faster than  Joomla!, Drupal or WordPress systems Plone is secure &#8211; it has no known site breaches &#8211; it even runs on fbi.gov and cia.gov Plone has the best user experience and easiest to use [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://plone.org/products/plone/features/">The long awaited version 4 of enterprise grade Plone CMS has been released</a>.</p>
<ul>
<li><a href="http://plone.org/products/plone/features/faster">Plone 4 is up to 5x times faster than  Joomla!, Drupal or WordPress systems</a></li>
<li><a href="http://plonemetrics.blogspot.com/2009/04/plone-security.html">Plone is secure &#8211; it has no known site breaches &#8211; it even runs on fbi.gov and cia.gov</a></li>
<li><a href="http://plone.org/news/plone-4-released">Plone has the best user experience and easiest to use of open source CMSes &#8211; Alexander Limi,  the usability experts, also works on Firefox on Mozilla corporation</a></li>
</ul>
<p><a href="http://www.reddit.com/r/programming/comments/d855t/proggit_we_just_released_plone_4_our_open_source/">Vote Plone 4 release news on reddit</a>.</p>
<p>Yeah, yeah&#8230; it is a linkadvertisement <img src='http://blog.mfabrik.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/09/01/plone-4-released-the-best-open-source-cms-of-2010/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How people perceive Plone outside Plone community</title>
		<link>http://blog.mfabrik.com/2010/08/21/how-people-perceive-plone-outside-plone-community/</link>
		<comments>http://blog.mfabrik.com/2010/08/21/how-people-perceive-plone-outside-plone-community/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 18:01:49 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[cms]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[attidude]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[dickheads]]></category>
		<category><![CDATA[forums]]></category>
		<category><![CDATA[freenode]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[mailman]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=686</guid>
		<description><![CDATA[Our company does business with multiple CMS systems, like Joomla, Plone and Drupal.  They all have their advantages, they all have their disadvantages. We do not want to make CMS a religion. It&#8217;s a tool. You can argue with the client which tool is a right job for a task. Joomla is lightweight solution for [...]]]></description>
			<content:encoded><![CDATA[<p>Our company does business with multiple CMS systems, like Joomla, Plone and Drupal.  They all have their advantages, they all have their disadvantages. We do not want to make CMS a religion. It&#8217;s a tool. You can argue with the client which tool is a right job for a task. Joomla is lightweight solution for non-critical systems, Plone is good with lots of content, editors and workflows flying around. etc. etc.</p>
<p>I had this curious piece on conversation on #joomla channel on freenode. Though it is an individual case, I hope it will bring some light to the fact how people perceive Plone outside Plone community and what Plone should to do fix it.</p>
<p>I think it would be beneficial for Plone to finally close mailman for the site administration / user support and move to real web forums / Google Groups / whatever which would be usable.</p>
<p>Also, there is an example how unprofessionalism is not good for the community.</p>
<pre>[20:23:29] x: Biggest problem so far is finding competent ("I will deliver on this schedule) joomla consulting experts. Second biggest problem is security, our site has been hacked 3 times in the past 6 months
[20:25:18] me: have you considered any alternative CMS with better security track record?
<strong>[20:25:50] x: moo: we moved from Plone to Joomla. 3 years on Plone with no hacks.</strong>
<strong>[20:26:04] x: Problem with plone is no forums with email support</strong>
[20:26:21] me: you pay for support
[20:26:30] z: did you do basic joomla security guidelines?
[20:26:39] me: also check http://plone.org/support
[20:26:40]  Title: Support options for Plone — Plone CMS: Open Source Content Management (at plone.org)
[20:26:51] x: moo: I'm fine with paying for support. We're paying SiteGround $200-$300/month on average when you add the support costs.
[20:26:58] z: ie using a key to access admin, changing default sql prefix
[20:27:01] AngryPerson: who cares about plone
[20:27:10] AngryPerson: its an ancient cms thats clearly past its time
[20:27:20] AngryPerson: its only privately supported with little community support
[20:28:34] AngryPerson: Moo^_^: why are you even in here?
[20:28:40] AngryPerson: you just want to piss on joomla?
[20:28:43] me: we do business on drupal, joomla and plone
[20:28:48] me: different tool for different job
[20:28:51] -*- y shrugs
[20:29:01] AngryPerson: just seems to me like you want to push ppl away from joomla
[20:29:11] x: z: After 6 months I'm still a Joomla noob. I need a consulting services company that will do the security patching, maintenance, service on the site, and host it.
[20:29:25] me: not true
[20:29:36] AngryPerson: Moo^_^: well regardless of what you say, tahts how it seems to me
[20:29:54] z: actually I've had good luck just following a few blog posts
[20:30:10] me: I don't defend myself, as I don't want to engage such a conversation with you
[20:30:22] AngryPerson: thats good, why dont you fuck off too
[20:30:22] &lt;-* jools has kicked y from #joomla (Please watch your language) [20:30:22] --&gt; y (dgdf@unaffiliated/anti-mttr/x-9384728) has joined #joomla
[20:30:27] z: nothing is impervious, but you drastically reduce your attractiveness to hackers by a few simple steps
[20:30:32] AngryPerson: stop giving ppl your shitty advice</pre>
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/08/21/how-people-perceive-plone-outside-plone-community/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Automatically generating description based on body text</title>
		<link>http://blog.mfabrik.com/2010/06/04/automatically-generating-description-based-on-body-text/</link>
		<comments>http://blog.mfabrik.com/2010/06/04/automatically-generating-description-based-on-body-text/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 11:17:37 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[dublin core]]></category>
		<category><![CDATA[restrictedpython]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[zmi]]></category>
		<category><![CDATA[zope]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=565</guid>
		<description><![CDATA[Below is a sample script to automatically generate descriptions based on page body text. It is for Plone CMS, but should be applicable to any Python based CMS with some modifications. The idea is that we take three first sentences and use them as a description. Use case: People are lazy to write descriptions (descriptions as [...]]]></description>
			<content:encoded><![CDATA[<p>Below is a sample script to automatically generate descriptions based on page body text. It is for <a href="http://plone.org">Plone</a> CMS, but should be applicable to any Python based CMS with some modifications.</p>
<p>The idea is that we take three first sentences and use them as a description.</p>
<div>Use case: People are lazy to write descriptions (descriptions as in Dublin Core metadata). You can generate some kind of description by taking the few first sentences of the text. This is not perfect, but this is way better than empty description. Also, the script comes with good comments which should be helpful for beginner Plone programmers.</div>
<div></div>
<div>Please comment if you have other simple ideas to generate descriptions.</div>
<div></div>
<div>Usage</div>
<div>
<ul>
<li>Add  Script (Python) item through Zope Management interface to any Plone folder</li>
<li>Put in the code payload below</li>
<li>Hit Test tab or type in Script URL manually &#8211; note that the operation is one shot only</li>
<li>The script iterates through all content items in that folder</li>
<li>The script will provide logging output to standard Plone log (var/log and stdout if Plone is run in the debug mode).</li>
</ul>
</div>
<p>Since Zope uses <a href="http://pypi.python.org/pypi/RestrictedPython/">RestrictedPython</a> for through-the-web created scripts, the user of this script cannot breach the server security (they cannot make Python calls they have no permission for). This sets some limitations for automating tasks like this, but we don&#8217;t hit those limitations in our use case.</p>
<pre>def create_automatic_description(content, text_field_name="text"):
    """ Creates an automatic description from HTML body by taking three first sentences. 

    Takes the body text

    @param content: Any Plone contentish item (they all have description)

    @param text_field_name: Which schema field is used to supply the body text (may very depending on the content type)
    """

    # Body is Archetype "text" field in schema by default.
    # Accessor can take the desired format as a mimetype parameter.
    # The line below should trigger conversion from text/html -&gt; text/plain automatically using portal_transforms
    field = content.Schema()[text_field_name]

    # Returns a Python method which you can call to get field's
    # for a certain content type. This is also security aware
    # and does not breach field-level security provded by Archetypes
    accessor = field.getAccessor(content)

    # body is UTF-8
    body = accessor(mimetype="text/plain")

    # Now let's take three first sentences or the whole content of body
    sentences = body.split(".")

    if len(sentences) &gt; 3:
       intro = ".".join(sentences[0:3])
       intro += "." # Don't forget closing the last sentence
    else:
       # Body text is shorter than 3 sentences
       intro = body

    content.setDescription(intro)

# context is the reference of the folder where this script is run
for id, item in context.contentItems():
     # Iterate through all content items (this ignores Zope objects like this script itself)

     # Use RestrictedPython safe logging.
     # plone_log() method is permission aware and available on any contentish object
     # so we can safely use it from through-the-web scripts
     context.plone_log("Fixing:" + id)

     # Check that the description has never been saved (None)
     # or it is empty, so we do not override a description someone has
     # set before automatically or manually
     desc = context.Description() # All Archetypes accessor method, returns UTF-8 encoded string

     if desc is None or desc.strip() == "":
          # We use the HTML of field called "text" to generate the description
          create_automatic_description(item, "text")

# This will be printed in the browser when the script completes succesfully
return "OK"</pre>
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/06/04/automatically-generating-description-based-on-body-text/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Integrating and theming WordPress with your CMS site using XDV</title>
		<link>http://blog.mfabrik.com/2010/03/28/integrating-and-theming-wordpress-with-your-cms-site-using-xdv/</link>
		<comments>http://blog.mfabrik.com/2010/03/28/integrating-and-theming-wordpress-with-your-cms-site-using-xdv/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 12:48:17 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[xdv]]></category>
		<category><![CDATA[zope]]></category>
		<category><![CDATA[deliverance]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[locationmatch]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[theming]]></category>
		<category><![CDATA[virtualhost]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xsl]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=421</guid>
		<description><![CDATA[Introduction XDV is an external HTML theming engine, a.k.a. theming proxy, which allows you to mix and match HTML and CSS from internal and external sites by using simple XML rules. It separates the theme development from the site development, so that people with little HTML and CSS knowledge can create themes without need to [...]]]></description>
			<content:encoded><![CDATA[<div id="xdv-theming">
<div>
<h1><a id="introduction" name="introduction" href="http://www.tele3.cz/jbar/rest/render.py#id1">Introduction</a></h1>
<p>XDV is an external HTML theming engine, a.k.a. theming proxy, which allows you to mix and match HTML and CSS from internal and external sites by using simple XML rules. It separates the theme development from the site development, so that people with little HTML and CSS knowledge can create themes without need to know underlying Python, PHP or whatever. It also enables integration of different services and sites to one, unified, user experience. For example, XDV is used by <cite>plone.org &lt;http://plone.org&gt;</cite> to integrate Plone CMS and Trac issue tracker.  XDV compiles theming rules to XSL templates, which has been a standard XML based templates language since 1999. XSL has good support in every programming language and web server out there. Example backends to perform XSL transformation include</p>
<ul>
<li>Python and lxml library</li>
<li>Apache&#8217;s mod_transform</li>
<li>nginx web server</li>
<li>All XSL capable Java and .NET software out there</li>
</ul>
<p>XDV theming can be used together with Plone where enhanced support is provided by <a href="http://pypi.python.org/pypi/collective.xdv">collective.xdv package</a> package. Technically, collective.xdv adds Plone settings panel and does XSL transformation in Zope&#8217;s post-publication hook using lxml library.  XDV can be used standalone with <a href="http://pypi.python.org/pypi/xdv/0.3a2">XDV package</a> to theme any web site, let it be WordPress, Joomla, Drupal or custom in-house PHP solution from year 2000.  XDV is based on <a href="http://deliverance.openplans.org/">Deliverance specification</a> The difference between XDV and Deliverance reference implementation is that XDV internally compiles themes to XSL templates, when Deliverance relies on processing HTML in Python. Currently XDV approach seems to be working better, as we had many problems trying to apply Deliverance for WordPress site (redirects didn&#8217;t work, HTTP posts didn&#8217;t work, etc.).</p>
</div>
<div>
<h1><a id="tutorials" name="tutorials" href="http://www.tele3.cz/jbar/rest/render.py#id3">Tutorials</a></h1>
<ul>
<li><a href="http://plone.org/products/collective.xdv/documentation/reference-manual/theming">http://plone.org/products/collective.xdv/documentation/reference-manual/theming</a></li>
<li><a href="http://pypi.python.org/pypi/collective.xdv">http://pypi.python.org/pypi/collective.xdv</a></li>
<li><a href="http://pypi.python.org/pypi/xdv">http://pypi.python.org/pypi/xdv</a></li>
<li><a href="http://pypi.python.org/pypi/dv.xdvserver">http://pypi.python.org/pypi/dv.xdvserver</a> (with WSGI)</li>
</ul>
</div>
<div>
<h1><a id="setting-up-xdv-development-tools" name="setting-up-xdv-development-tools" href="http://www.tele3.cz/jbar/rest/render.py#id4">Setting up XDV development tools</a></h1>
<p>XDV tools are deployed as Python eggs. You can use tools like <cite>buildout &lt;http://www.buildout.org/&gt;</cite> configuration and assembly tool or easy_install to get XDV on your development computer and the server.  If you are working with Plone you can integrate XDV to your site existing buildout. If you are not working with Plone, <a href="http://pypi.python.org/pypi/xdv#installation">XDV home page</a> has instructions how to deploy XDV command standalone.</p>
</div>
<div>
<h1><a id="xdv-rules" name="xdv-rules" href="http://www.tele3.cz/jbar/rest/render.py#id5">XDV Rules</a></h1>
<p>Rules (rules.xml) will tell how to fit content from external source to your theme HTML.  It provides straightforward XML based syntax to manipulate HTML easily</p>
<ul>
<li>Append, replace and drop HTML pieces</li>
<li>Insert HTML snippets</li>
<li>CSS or XPath selectors can be used to identify HTML parts</li>
<li>It is possible to mix and match content from more than two sites</li>
<li>etc.</li>
</ul>
<p>Rules XML syntax is documented at <a href="http://pypi.python.org/pypi/xdv">XDV homepage</a>.  Rules will be compiled to XSL template (theme.xsl) by <em>xdvcompiler</em> command. The actual theming is done by one of the XSL backends listed above, by taking HTML as input and applying XSL transformations on it.  Note that currently rules without matching selectors are silently ignored and there is no bullet-proof way to debug what happens inside XSL transformation, except by looking into compiled theme.xsl.</p>
</div>
<div>
<h1><a id="using-xdv-to-theme-and-integrate-a-wordpress-site" name="using-xdv-to-theme-and-integrate-a-wordpress-site" href="http://www.tele3.cz/jbar/rest/render.py#id6">Using XDV to theme and integrate a WordPress site</a></h1>
<p>Below are instructions how to integrate a WordPress site to your CMS. In this example CMS is Plone, but it could be any other system.  We will create XDV theme which will theme WordPress site to match our CMS site in the fly.</p>
<p style="text-align: center;"><a href="http://blog.mfabrik.com/wp-content/uploads/2010/03/xdv_wordpress.png"><img class="size-full wp-image-424 aligncenter" title="xdv_wordpress" src="http://blog.mfabrik.com/wp-content/uploads/2010/03/xdv_wordpress.png" alt="" width="658" height="720" /></a></p>
<p>WordPress theme using built with XDV and using a live Plone web page as a theme template.  This way WordPress theme inherits &#8220;live data&#8221; from Plone site, like top tabs (portal sections), footer, CSS and other stuff which can be changed in-the-fly and reflecting changes to two separaet theming products would be cumbersome.  Benefits using WordPress for blogging instead of main CMS</p>
<ul>
<li>WordPress post and comment management is easy</li>
<li>WordPress does not need to be touched: the old public WordPress instance can keep happily running wherever it is during the whole process</li>
<li>You do not need to migrate legacy WordPress installations to your CMS&#8217;s internal blogging tool</li>
<li>WordPress comes with extensive blog spam filtering tools. We get 11000 spam comments a month.</li>
<li>WordPress is designed for blogging and the user interface is good for that</li>
<li>WordPress integrates well with blog pingback support services</li>
<li>WordPress supports Gravatars and other blogging plug-ins</li>
<li>..and so on&#8230;</li>
</ul>
<p>Benefits of using XDV theming instead of creating native WordPress theme are</p>
<ul>
<li>You need to maintain only one theming add-on product e.g. one for your main CMS and WordPress receives updates to this site and theme automatically</li>
<li>WordPress does not need to be touched</li>
<li>You can host your WordPress on a different server, even wordpress.com, and still integrate it to your main CMS</li>
<li>The theme can be recycled not only for WordPress, but also other external services: Bugzilla, Trac, Webmail, phpBB, you-name-it</li>
<li>Even though WordPress has slick UI, it is a well known fact that it is a can of worms internally. My developers do not like the idea of PHP development and would spit on my face if I ask them to go a develop a WordPress theme for us</li>
</ul>
<div>
<h2><a id="theme-elements" name="theme-elements" href="http://www.tele3.cz/jbar/rest/render.py#id7">Theme elements</a></h2>
<p>The theme will consist of following pieces</p>
<ul>
<li>Deliverance rules XML file which defines how to combine Plone and WordPress HTML (rules.xml)</li>
<li>Additional CSS definitions active only for WordPress (wordpress.css). Dependency to this CSS in injected to the &lt;head&gt; by rules XML</li>
<li>Special Plone page template which will provide slots where WordPress can drop in the content (wordpress_listing.pt)</li>
<li>A helper script which makes it easy for repeatable perform theming actions, like recompiling the theme (xdv.py)</li>
</ul>
<div>
<h3><a id="cms-page-template" name="cms-page-template" href="http://www.tele3.cz/jbar/rest/render.py#id8">CMS page template</a></h3>
<p>This explains how to create a Plone page template where WordPress content will be dropped in. This step is not necessary, as we could do this without touching the Plone. However, it makes things more straightforward and explicit when we known that WordPress theme uses a certain template and we explicitly define slots for WordPress content there.  Example:</p>
<pre>&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
      lang="en"
      metal:use-macro="here/main_template/macros/master"
      i18n:domain="plone"&gt;

&lt;body&gt;

    &lt;div metal:fill-slot="content"&gt;

        &lt;div id="wordpress-content"&gt;
                &lt;!-- Your WordPress "left column" will go there --&gt;
        &lt;/div&gt;

    &lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
</div>
<div>
<h3><a id="theming-rules" name="theming-rules" href="http://www.tele3.cz/jbar/rest/render.py#id9">Theming rules</a></h3>
<p>Following are XDV rules (rules.xml) how we will fit WordPress site to Plone frame.  It will integrate</p>
<ul>
<li>Content from WordPress</li>
<li>Metadata from WordPress</li>
<li>CSS from Plone</li>
<li>Page basic structrure from Plone</li>
</ul>
<p>rules.xml:</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;rules xmlns="http://namespaces.plone.org/xdv"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:css="http://namespaces.plone.org/xdv+css"&gt;

    &lt;!-- Remove WordPress CSS by filtering out &lt;style&gt; tags--&gt;
    &lt;drop css:content="style" /&gt;

    &lt;!-- Make sure that WordPress metadata is present in &lt;head&gt; section --&gt;
    &lt;append css:content="head link" css:theme="head" /&gt;

    &lt;!-- note: replace does not seem to handle multiple meta tags very well --&gt;
    &lt;drop css:theme="meta" /&gt;
    &lt;append css:content="head meta" css:theme="head" /&gt;

    &lt;!-- Use blog title instead of Plone page title --&gt;
    &lt;replace css:content="title" css:theme="title" /&gt;

    &lt;!-- Put WordPress sidebar to Plone's portlets section --&gt;
    &lt;append css:content="#r_sidebar" css:theme="#portal-column-one .visualPadding" /&gt;

    &lt;!-- Place wordpress content into our theme content area --&gt;
    &lt;copy css:content="#contentleft" css:theme="#wordpress-content" /&gt;

    &lt;!-- This mixes in WordPress specific CSS sheet which is applied for pages
         served from WordPress only and does not concern Plone CMS.
         This stylesheet will theme WordPress specific tags,
         like blog posts and comment fields.
         We keep this file in Plone, but this could be served from elsewhere. --&gt;
    &lt;append css:theme="head"&gt;
        &lt;style type="text/css"&gt;
           @import url(http://mfabrik.com/++resource++plonetheme.mfabrik/wordpress.css);
        &lt;/style&gt;
    &lt;/append&gt;

    &lt;!-- This stylesheet is used by special spam protection plug-in NoSpamNX --&gt;
    &lt;append css:theme="head"&gt;
        &lt;link rel="stylesheet" href="http://blog.mfabrik.com/wp-content/plugins/nospamnx/nospamnx.css" type="text/css" /&gt;
    &lt;/append&gt;

    &lt;!-- Remove Google Analytics script used for CMS site --&gt;
    &lt;drop css:theme="#page-bottom script" /&gt;

    &lt;!-- Rebuild our Google Analytics code, using a different tracker id this time
         which is a specific to our blog.
      --&gt;
    &lt;append css:theme="#page-bottom"&gt;

        &lt;script type="text/javascript"&gt;
                var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
                document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
        &lt;/script&gt;

        &lt;script type="text/javascript"&gt;
                try {
                       var pageTracker = _gat._getTracker("UA-8819100-2");
                       pageTracker._trackPageview();
                } catch(err) {
                }
        &lt;/script&gt;
    &lt;/append&gt;

&lt;/rules&gt;
</pre>
</div>
<div>
<h3><a id="wordpress-specific-css" name="wordpress-specific-css" href="http://www.tele3.cz/jbar/rest/render.py#id10">WordPress specific CSS</a></h3>
<p>This CSS has styles which are applied only to WordPress pages. They are mainly corner case fixes where WordPress and CMS styles must match.  The CSS file is loaded when rules.xml injects it to &lt;head&gt; section.  wordpress.css:</p>
<pre>/* Font and block style fixes */

#wordpress-content h1 {
        border: 0;
}

#wordpress-content .post-end {
        margin-bottom: 60px;
}

#wordpress-content pre {
        width: 600px;
        overflow: auto;
        background: white;
        border: 1px solid #888;
}

#wordpress-content ul {
        margin-left: 20px;
}

#wordpress-content .post-info-date,
#wordpress-content .post-info-categories,
#wordpress-content .post-info-tags {
        font-size: 80%;
        color: #888;
}

/* Make sure that posts and comments look sane in our theme */

#wordpress-content .post {
        margin-top: 15px;
}

#wordpress-content .commentlist li {
        margin: 20px;
        background: white;
        padding: 10px;
}

#wordpress-content .commentlist li img {
        float: left;
        margin-right: 20px;
        margin-bottom: 20px;
}

#wordpress-content #commentform {
        margin: 20px;
}

#wordpress-content {
        margin-left: 20px;
        margin-right: 20px;
}

/* Make WordPress "sidebaar" look like Plone "portlets */

.template-wordpress_listing #portal-column-one ul {
        list-style: none;
        margin-bottom: 40px;
}

.template-wordpress_listing #portal-column-one ul#Recent li {
        margin-bottom: 8px;
}

.template-wordpress_listing #portal-column-one ul#Categories a {
        line-height: 120%;
}

.template-wordpress_listing #portal-column-one h2 {
        background: transparent;
        border: 0;
        font-weight:normal;
        line-height:1.6em;
        padding:0;
        text-transform:none;
        font-size: 16px;
        color: #9b9b9b;
        border-bottom:4px solid #CDCDCD;
}
</pre>
</div>
<div>
<h3><a id="helper-script" name="helper-script" href="http://www.tele3.cz/jbar/rest/render.py#id11">Helper script</a></h3>
<p>The following Python script (xdv.py) makes it easy for us</p>
<ul>
<li>Recompile the theme</li>
<li>Test the theme applied on the site</li>
<li>Preview the theme in our browser</li>
</ul>
<dl>
<dt>It is basically wrapped with default file locations around</dt>
<dd><em>bin/xdvcompiler</em> and <em>bin/xdvrun</em> commands with some webbrowser opening magic.</dd>
</dl>
<p>xdv.py:</p>
<pre>"""

 This command line Python script compiles your rules.xml to XDV XSL

 Modify it for your own needs.

 It assumes your buildout.cfg has xdv section and generated XDV
 commands under bin/

 To compile, execute in the buildout folder::

     python src/plonetheme.mfabrik/xdv.py

 To build test HTML::

     python src/plonetheme.mfabrik/xdv.py --test

 To build test HTML and preview it in browser, execute in buildout folder::

     python src/plonetheme.mfabrik/xdv.py --preview

"""

import getopt, sys
import os
import webbrowser

# rules XML for theming
RULES_XML = "src/plonetheme.mfabrik/deliverance/etc/rules.xml"

# Which XSL file to generate for compiled XDV
OUTPUT_FILE = "theme.xsl"

# Which file to generate applied theme test runs
TEST_HTML_FILE = "test.html"

# Our "theme.html" is a remote template served for each request.
# Because we are doing live integrattion, this is a HTTP resource,
# not a local file.
THEME="http://mfabrik.com/news/wordpress_listing/"

#
# External site you are theming.
# Note: must have ending slash (lxm cannot handle redirects)
#
SITE="http://blog.twinapex.fi/"

try:
    opts, args = getopt.getopt(sys.argv[1:], "pt", ["preview", "test"])
except getopt.GetoptError, err:
    # print help information and exit:
    print str(err) # will print something like "option -a not recognized"

# Convert options to simple list
opts = [ opt for opt, value in opts ]

print "Compiling transformation"
value = os.system("bin/xdvcompiler -o " + OUTPUT_FILE + " " + RULES_XML +" " + THEME)
if value != 0:
    print "Compilation failed"
    sys.exit(1)

if "-p" in opts or "--preview" in opts or "-t" in opts or "--test" in opts:
      print "Generating test HTML page"
      value = os.system("bin/xdvrun -o " + TEST_HTML_FILE + " " + OUTPUT_FILE + " " + SITE)
      if value != 0:
          print "Page transformation failed"
          sys.exit(1)

if "-p" in opts or "--preview" in opts:
    # Preview the result in a browser
    # NOTE: OSX needs Python &gt;= 2.5 to make this work

    # Make sure test run succeeded
    url = "file://" + os.path.abspath(TEST_HTML_FILE)
    print "Opening:" + url

    # We prefer Firefox for preview for its superious
    # Firebug HTML debugger and XPath rule generator
    try:
        browser = webbrowser.get("firefox")
    except webbrowser.Error:
        # No FF on the system, or OSX which can't find its browsers
        browser = webbrowser.get()

    browser.open_new_tab(url)
</pre>
</div>
</div>
<div>
<h2><a id="compiling-the-theme" name="compiling-the-theme" href="http://www.tele3.cz/jbar/rest/render.py#id12">Compiling the theme</a></h2>
<p>This will generate XSL templates to do theming transform. It will compile rules XML with some boilerplate XSL.  Running our compile script:</p>
<pre>python src/plonetheme.mfabrik/xdv.py
</pre>
<p>Since Plone usually does not use any relative paths or relative resources in HTML, we do not give the parameter &#8220;Absolute prefix&#8221; to the compilation stage. In Plone, everything is mapped through a virtual hosting aware resource locator: portal_url and VirtualHostMonster.  For more information see</p>
<ul>
<li><a href="http://pypi.python.org/pypi/xdv/0.3a2#compilation">http://pypi.python.org/pypi/xdv/0.3a2#compilation</a></li>
</ul>
</div>
<div>
<h2><a id="testing-the-theme" name="testing-the-theme" href="http://www.tele3.cz/jbar/rest/render.py#id13">Testing the theme</a></h2>
<p>The following command will apply theme for an example external page:</p>
<pre>bin/xdvrun -o theme.html theme.xsl http://blog.twinapex.fi
firefox theme.xhtml
</pre>
<p>&#8230; or we can use shortcut provided by our script &#8230;</p>
<pre>python src/plonetheme.mfabrik/xdv.py --preview
</pre>
</div>
<div>
<h2><a id="applying-the-theme-in-apache-production-environment" name="applying-the-theme-in-apache-production-environment" href="http://www.tele3.cz/jbar/rest/render.py#id14">Applying the theme in Apache production environment</a></h2>
<p>These steps tell how to apply the integration theme for WordPress when WordPress is running under Apache virtualhost.</p>
<div>
<h3><a id="installing-dependencies" name="installing-dependencies" href="http://www.tele3.cz/jbar/rest/render.py#id15">Installing dependencies</a></h3>
<p>We use Apache and mod_transform. <a href="http://pypi.python.org/pypi/xdv#apache">Instructions how to set up modules for Apache</a> are available on XDV homepage. Some hand-build modules must be used, but instructions to set them up for Ubuntu / Debian are available.  Apache 2 supports <a href="http://httpd.apache.org/docs/2.2/mod/mod_filter.html">filter chains</a> which allow you to perform magic on HTTP response before sending it out. This corresponds Python&#8217;s WSGI middleware.  We&#8217;ll use special built of mod_transform and mod_depends which are known to working. These modules were forked from their orignal creations to make them XDV compatible, as the orignal has not been updated since 2004 (here you can nicely see how open source guarantees &#8220;won&#8217;t run out of support&#8221; freedom).</p>
<ul>
<li><a href="http://code.google.com/p/html-xslt/">XDV mod_transform and mod_depends homepage</a></li>
<li><a href="http://www.outoforder.cc/projects/apache/mod_transform/">Orignal mod_transform and mod_depends homepage</a></li>
</ul>
<p>Example:</p>
<pre>sudo -i
apt-get install libxslt1-dev libapache2-mod-apreq2 libapreq2-dev apache2-threaded-dev
wget http://html-xslt.googlecode.com/files/mod-transform-html-xslt.tgz
wget http://html-xslt.googlecode.com/files/mod-depends-html-xslt.tgz
tar -xzf mod-transform-html-xslt.tgz
tar -xzf mod-depends-html-xslt.tgz
cd mod-depends-html-xslt ; ./configure ; make ; make install ; cd ..
cd mod-transform-html-xslt ; ./configure ; make ; make install ; cd ..
</pre>
<p>Enable built-in Apache modules:</p>
<pre>a2enmod filter
a2enmod ext_filter
</pre>
<p>For modules <em>depends</em> and <em>transform</em> you need to manually add them to the end of Apache configuration, as they do not provide a2enmod stubs for Debian. Edit /etc/apache2/apache.conf:</p>
<pre>LoadModule depends_module /usr/lib/apache2/modules/mod_depends.so
LoadModule transform_module /usr/lib/apache2/modules/mod_transform.so
</pre>
<p>You need to hard reset Apache to make the new modules effective:</p>
<pre>/etc/init.d/apache2 force-reload
</pre>
</div>
<div>
<h3><a id="virtual-host-configuration" name="virtual-host-configuration" href="http://www.tele3.cz/jbar/rest/render.py#id16">Virtual host configuration</a></h3>
<p>Below is our virtualhost configuration which runs WordPress and PHP. Transformation filter chain has been added in.  /etc/apache/sites-enabled/blog.mfabrik.com:</p>
<pre>&lt;VirtualHost *&gt;

    ServerName blog.mfabrik.com
    ServerAdmin info@mfabrik.com

    LogFormat       combined
    TransferLog     /var/log/apache2/blog.mfabrik.com.log

    # Basic WordPress setup

    Options +Indexes FollowSymLinks +ExecCGI

    DocumentRoot /srv/www/wordpress

    &lt;Directory /srv/www/wordpress&gt;
        Options FollowSymlinks
        AllowOverride All
    &lt;/Directory&gt;

    AddType application/x-httpd-php .php .php3 .php4 .php5
    AddType application/x-httpd-php-source .phps

    # Theming set-up

    # This chain is used for public web pages
    FilterDeclare THEME
    FilterProvider THEME XSLT resp=Content-Type $text/html

    TransformOptions +ApacheFS +HTML
    # This is the location of compiled XSL theme transform
    TransformSet /theme.xsl

    # This will make Apache not to reload transformation every time
    # it is performed. Instead, a compiled version is hold in the
    # virtual URL declared above.
    TransformCache /theme.xsl /srv/plone/twinapex.fi/theme.xsl

    # We want to apply theme only for
    # 1. public pages (otherwise WordPress administrative interface stops working)
    &lt;Location "/"&gt;
        FilterChain THEME
    &lt;/Location&gt;

    # 2. Admin interface and feeds should not receive any kind of theming
    &lt;LocationMatch "(wp-login|wp-admin|wp-includes)"&gt;
        # The following resets the filter chain
        # http://httpd.apache.org/docs/2.2/mod/mod_filter.html#filterchain
        FilterChain !
    &lt;/LocationMatch&gt;

&lt;/VirtualHost&gt;
</pre>
</div>
<div>
<h3><a id="running-it" name="running-it" href="http://www.tele3.cz/jbar/rest/render.py#id17">Running it</a></h3>
<p>After Apache has all modules enabled and your virtualhost configuration is ok, you should see WordPress through your new theme by visiting at the site served through Apache:</p>
<ul>
<li><a href="../">http://blog.mfabrik.com</a></li>
</ul>
</div>
<div>
<h3><a id="automatically-reflecting-cms-changes-back-to-xdv-theme" name="automatically-reflecting-cms-changes-back-to-xdv-theme" href="http://www.tele3.cz/jbar/rest/render.py#id18">Automatically reflecting CMS changes back to XDV theme</a></h3>
<p>The theme should be recompiled every time</p>
<ul>
<li>Plone is restarted: CSS references change in &lt;head&gt; as CSS cache is rebuilt</li>
<li>CSS is modified: CSS references change in &lt;head&gt; as CSS cache is rebuilt</li>
<li>Plone content is changed and changes reflect back to WordPress theme (e.g. a new top level site section is being added)</li>
</ul>
<p>This is because the compilation will hard-link resources and template snippets to resulting the theme.xsl file. If hard-linked resources change on the Plone site, the transformation XSL file does not automatically reflect back the changes.  It could be possible to use Plone events automatically to rerun theme compilation when concerned resources change. However, the would be quite complex.  For now, we are satisfied with a scheduled task which will recompile the theme now and then.  Alternatively, mod_transforms could be run in non-cached mode with some performance implications.  Here is a shell script, update-wordpress-theme.sh, which will perform the recompilation and make Apache&#8217;s transformation cache aware of changes:</p>
<pre>#!/bin/sh
#
# Periodically update WordPress theme to reflect changes on CMS site
#

# Recompile theme
sudo -H -u twinapex /bin/sh -c cd /srv/plone/twinapex.fi ; python src/plonetheme.mfabrik/xdv.py

# Make Apache aware of theme changes
sudo apache2ctl graceful
</pre>
<p>Then we call it periodically in cron job, every 15 minutes in /etc/cron.d/update-wordpress:</p>
<pre># Make WordPress XDV theme to reflect changes on CMS
0,15,30,45 * * * * /srv/plone/twinapex.fi/update-wordpress-theme.sh
</pre>
</div>
</div>
<div>
<h2><a id="updating-wordpress-settings" name="updating-wordpress-settings" href="http://www.tele3.cz/jbar/rest/render.py#id19">Updating WordPress settings</a></h2>
<p>No changes on WordPress needed if the domain name is not changed in the theme transformation process.</p>
<div>
<h3><a id="site-url" name="site-url" href="http://www.tele3.cz/jbar/rest/render.py#id20">Site URL</a></h3>
<p>Unlike Plone, WordPress does not have decent virtual hosting machinery. It knowns only one URL which is uses to refer to the site in the external context (e.g. RSS feeds).  This setting can be overridden in</p>
<ul>
<li>WordPress administrative interface</li>
<li>wp-config.php</li>
</ul>
<p>Here is an example how we override this in our wp-config.php:</p>
<pre>// http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29
define('WP_HOME','http://blog.mfabrik.com');
define('WP_SITEURL','http://blog.mfabrik.com');
</pre>
</div>
</div>
<div>
<h2><a href="http://www.tele3.cz/jbar/rest/render.py#id21">HTTP 404 Not Found special case</a></h2>
<p>Http 404 Not Found responses are not themed by Apache filter chain. This is not possible due to order of pipeline in Apache.  As a workaround you can set up a custom HTTP 404 page in WordPress which does not expose the old theme.</p>
<ul>
<li>Go to WordPress admin interface, Theme editor</li>
<li>Edit 404.php and modify it so that it does not pull in the WordPress theme:
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Not found&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

        &lt;h1&gt;Not Found, Error 404&lt;/h1&gt;
        &lt;p&gt;Aaaaw, snap! The page you are looking for no longer exists. It must be our hamster who ate it.&lt;/p&gt;

        &lt;a href="&lt;?php bloginfo('url'); ?&gt;"&gt;Go to blog homepage&lt;/a&gt;

        &lt;a href="http://mfabrik.com"&gt;mFabrik business site&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
</li>
</ul>
<p>For more information see</p>
<ul>
<li><a href="http://codex.wordpress.org/Creating_an_Error_404_Page">http://codex.wordpress.org/Creating_an_Error_404_Page</a></li>
</ul>
</div>
<div>
<h2><a id="roll-out-checklist" name="roll-out-checklist" href="http://www.tele3.cz/jbar/rest/render.py#id22">Roll-out checklist</a></h2>
<p>Below is a checklist you need to go to through to confirm that the theme integration works on your production site</p>
<ul>
<li>WordPress public pages are loaded with the new theme</li>
<li>WordPress login works</li>
<li>WordPress administrative interface works</li>
<li>RSS feed from WordPress works and contain correct URLs</li>
<li>HTTP 404 not found is handled correctly</li>
<li>HTTP 302 redirect is handled correctly (i.e. missing / at the end of blog post URL)</li>
<li>Changes on CMS site are reflected to WordPress theme within the update delay</li>
<li>Old blog site is redirected to new site using HTTP 301 (if applies)</li>
</ul>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/03/28/integrating-and-theming-wordpress-with-your-cms-site-using-xdv/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SEO tips: query strings, multiple languages, forms and other content management system issues</title>
		<link>http://blog.mfabrik.com/2009/08/07/seo-tips-query-strings-multiple-languages-forms-and-other-content-management-system-issues/</link>
		<comments>http://blog.mfabrik.com/2009/08/07/seo-tips-query-strings-multiple-languages-forms-and-other-content-management-system-issues/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 11:34:15 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[content management system]]></category>
		<category><![CDATA[description]]></category>
		<category><![CDATA[disallowed]]></category>
		<category><![CDATA[dublin core]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[googlebot]]></category>
		<category><![CDATA[hidden]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[keywords]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[mediapartners]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[meta tags]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[query string]]></category>
		<category><![CDATA[robots.txt]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[search engine optimizations]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[sitemap]]></category>
		<category><![CDATA[tld]]></category>
		<category><![CDATA[top level domain]]></category>
		<category><![CDATA[webmaster tools]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=254</guid>
		<description><![CDATA[This post is collection of search engine optimization tips for content management systems, especially for Plone. Do not index query strings It is often desirable to make sure that query string pages (http://yoursite/page?query_string_action=something) do not end up into the search indexes. Otherwise search bots might index pages like site&#8217;s own search engine results  (yoursite/search?SearchableText=&#8230;) lowering [...]]]></description>
			<content:encoded><![CDATA[<p>This post is collection of search engine optimization tips for content management systems, especially for Plone.</p>
<h2>Do not index query strings</h2>
<p>It is often desirable to make sure that query string pages (http://yoursite/page?query_string_action=something) do not end up into the search indexes. Otherwise search bots might index pages like site&#8217;s own search engine results  (yoursite/search?SearchableText=&#8230;) lowering the visibility of  actual content pages.</p>
<p>GoogleBot has regex support in robots.txt and can be configured to ignore any URL ? in it. See the example below.</p>
<p>Query string indexing causes the crawler crawl things like</p>
<ul>
<li>Various search results (?SearchableText)</li>
<li>Keyword lists (?Subject)</li>
<li>Language switching code (?set_language)&#8230; making set_language appear as the document in the search results</li>
</ul>
<p>Also, &#8220;almost&#8221; human readable query strings look ugly in the address bar&#8230;</p>
<h2>Top level domains and languages</h2>
<p>Using top level domain name (.fi for Finland, .uk for United Kingdoms, and so on.) to make distinction between different languages and areas is optimal solution from the SEO point of view. Search engines use TLD information to reorder the search results based on where  the search query is performed  (there is difference between google.com and google.fi results).</p>
<p>Plone doesn&#8217;t use any query strings for content pages. Making robots to ignore query strings is especially important if you are hosting multilingual site and you use top level domain name (TLD) to separate languages: if you don&#8217;t configure robots.txt to ignore ?set_language links only one of your top level domains (.com, .fi, .xxx) will get proper visibility in the search results. For example we had situation where our domain <a href="www.twinapex.fi">www.twinapex.fi</a> did not get proper visibility because Google considered <a href="www.twinapex.com">www.twinapex.com</a>?set_language=fi as the primary content source (accessing Finnish content through English site and  language switching links).</p>
<h2>Shared forms</h2>
<p>Plone has some forms (send to, login) which can appear on any content page. These must be disallowed or otherwise you might have a search result where the link goes to the form page instead of the actual content page.</p>
<h2>Hidden content and content excluded from the navigation</h2>
<p>Any content excluded from the sitemap navigation  should be put under disallowed in robots.txt. E.g. if you check &#8220;exclude from navigation&#8221; for Plone folder remember to update robots.txt also.</p>
<p>In our case, our internal image bank must not end up being indexed, though images themselves are visible on the site. Otherwise you get funny search result: if you search by person&#8217;s name the photo will be the first hit instead of biography.</p>
<h2>Sitemap protocol</h2>
<p>Crawlers use Sitemap protocol to help determining the content pages on your site (note: sitemap seems to be used for hinting only and it is not authoritative).  Since version 3.1 Plone can automatically generate sitemap.xml.gz. You still need to register sitemap.xml.gz in Google webmaster tools manually.</p>
<p>There exists a sitemap protocol extension for mobile sites.</p>
<h2>Webmaster tools</h2>
<p>Google <a href="Webmaster tools">Webmaster tools</a> enable you to monitor your site visibility in Google and do some search engine specific tasks like submitting sitemaps.</p>
<p>I do not know what kind of similar functionality other search provides have. Please share your knowledge in the blog comments regarding this.</p>
<h2>HTML &lt;head&gt; metadata</h2>
<p>Search engines mostly ignore &lt;meta&gt; tags besides title so there is no point of trying fine-tune them.</p>
<h2>Example robots.txt</h2>
<p>Here is our optimized robots.txt for <a href="http://www.twinapex.com">www.twinapex.com</a>:</p>
<pre># Normal robots.txt body is purely substring match only
# We exclude lots of general purpose forms which are available in various mount points of the site
# and internal image bank which is hidden in the navigation tree in any case
User-agent: *
Disallow: set_language
Disallow: login_form
Disallow: sendto_form
Disallow: /images

# Googlebot allows regex in its syntax
# Block all URLs including query strings (? pattern) - contentish objects expose query string only for actions or status reports which
# might confuse search results.
# This will also block ?set_language
User-Agent: Googlebot
Disallow: /*?*
Disallow: /*folder_factories$

# Allow Adsense bot on entire site
User-agent: Mediapartners-Google*
Disallow:
Allow: /*</pre>
<h2>Useful resources</h2>
<ul>
<li><a href="http://googlewebmastercentral.blogspot.com/2007/12/answering-more-popular-picks-meta-tags.html">How Google treats HTML metatags</a>. This is especially interesting considering Plone&#8217;s support for Dublin core metadata (title, description, keywords). Note: &lt;meta&gt; keywords are not indexed.</li>
<li><a href="http://plone.org/products/plone-seo">Plone SEO add-on product</a></li>
<li><a href="http://www.askapache.com/seo/seo-with-robotstxt.html">SEO with robots.txt</a></li>
<li><a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=34627">Sitemaps mobile protocol</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/08/07/seo-tips-query-strings-multiple-languages-forms-and-other-content-management-system-issues/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>XHTML mobile profile transformer and cleaner for Python</title>
		<link>http://blog.mfabrik.com/2009/07/23/xhtml-mobile-profile-transformer-and-cleaner-for-python/</link>
		<comments>http://blog.mfabrik.com/2009/07/23/xhtml-mobile-profile-transformer-and-cleaner-for-python/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 04:06:02 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[aggregator]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[lxml]]></category>
		<category><![CDATA[mobile profile]]></category>
		<category><![CDATA[mobiready]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[search engine optimizations]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[valid]]></category>
		<category><![CDATA[validator]]></category>
		<category><![CDATA[w3c]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=227</guid>
		<description><![CDATA[Mobile phones, and especially mobile site validators, are very picky about the validy of XHTML. It must not be any XHTML, but special mobile profile XHTML. Also, search engines like Google, will punish you in the mobile search results if your site fails to conform to mobile profile. This is especially troublesome if you display [...]]]></description>
			<content:encoded><![CDATA[<p>Mobile phones, and especially mobile site validators, are very picky about the validy of XHTML. It must not be any XHTML, but special <a href="http://en.wikipedia.org/wiki/XHTML_Mobile_Profile">mobile profile XHTML</a>. Also, search engines like Google, will punish you in the mobile search results if your site fails to conform to mobile profile.</p>
<p>This is especially troublesome if you display external content (RSS feeds, ATOM feeds) on your mobile site. Incoming HTML cannot be guaranteed to follow any specification.</p>
<p>To solve this problem, we have created <a href="http://pypi.python.org/pypi/gomobile.xhtmlmp/">gomobile.xhtmlmp Python library</a> which helps you to transform any HTML to content to valid XHTML MP. The library is piloted on <a title="Plone mobile community site" href="http://plonecommunity.mobi">plonecommunity.mobi</a> site which  uses aggregated content from varying sources. The library is based on <a href="http://codespeak.net/lxml/lxmlhtml.html#cleaning-up-html">lxml.html.Cleaner</a>. The library is part of <a href="http://pypi.python.org/pypi/gomobile.mobile/">GoMobile project</a> which aims to create world class Python mobile web development tools.</p>
<h2>Highlights</h2>
<ul>
<li> Turn any incoming HTML/XHTML to mobile profile compatible</li>
<li>Enforce ALT text on images &#8211; especially useful for external tracking images (feedburner tracker). ALT texts are required by XHTML MP.</li>
<li>Protect against Cross-Site Scripting Attacks (XSS) and other nastiness, as provided by lxml.xhtml.clean</li>
<li>Unicode compliant &#8211; eats funky characters</li>
</ul>
<p>As an example <a href="https://plonegomobile.googlecode.com/svn/trunk/gomobile/gomobile.supporter/gomobile/supporter/feedfeeder/patches.py">we integrated gomobile.xhtmlmp  to Feedfeeder Plone add-on product</a>.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2009/07/23/xhtml-mobile-profile-transformer-and-cleaner-for-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

