<?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>Loftux AB</title>
	<atom:link href="http://loftux.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://loftux.com</link>
	<description>Dokumenthantering och informationshantering med öppen källkod</description>
	<lastBuildDate>Fri, 04 May 2012 11:11:20 +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>Select metadata edit form based on aspect</title>
		<link>http://loftux.com/2012/05/04/select-metadata-edit-form-based-on-aspect/</link>
		<comments>http://loftux.com/2012/05/04/select-metadata-edit-form-based-on-aspect/#comments</comments>
		<pubDate>Fri, 04 May 2012 11:11:20 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[surf]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=877</guid>
		<description><![CDATA[<p>For a client I needed to come up with a solution to use a specific metadata edit form when the document had a certain aspect applied. Reason was that that if it had this aspect, you should only be allowed to edit this subset of metadata, not the default name, title etc (sort of a [...]]]></description>
			<content:encoded><![CDATA[<p>For a client I needed to come up with a solution to use a specific metadata edit form when the document had a certain aspect applied. Reason was that that if it had this aspect, you should only be allowed to edit this subset of metadata, not the default name, title etc (sort of a lockdown). Out of the box you can only configure different forms based on document type so I needed to find a way to see if the document had the aspect applied, and if so show a special form.</p>
<p>In Share, when I need to alter default functionality I start with looking into the page I need to change, and then find out how this page is called, and if I can add parameters or need to change javascript. In this case it is page/site/{site}/edit-metadata that I somehow need to tell to use a different form. This page use template-instances/edit-metadata.xml, and in there is a form component</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- Edit Metadata Form --&gt;
&lt;component&gt;
  &lt;region-id&gt;edit-metadata&lt;/region-id&gt;
  &lt;url&gt;/components/form&lt;/url&gt;
  &lt;properties&gt;
    &lt;itemKind&gt;node&lt;/itemKind&gt;
    &lt;itemId&gt;{nodeRef}&lt;/itemId&gt;
    &lt;mode&gt;edit&lt;/mode&gt;
    &lt;submitType&gt;json&lt;/submitType&gt;
    &lt;showCaption&gt;true&lt;/showCaption&gt;
    &lt;showCancelButton&gt;true&lt;/showCancelButton&gt;
  &lt;/properties&gt;
&lt;/component&gt;
</pre>
<p>The form is rendered using the webscript /components/form, now I need to find out if there is a way to pass in a form id. I then look in folder site-webscripts/org/alfresco/components/form/ to find out how the form generation works, form.get.html.ftl includes form.lib.ftl and in there I can see that you can pass formId as an argument. I can now either alter template-instances/edit-metadata.xml, or use the new Surf extensibility functionality (from version 4.0). With a surf extension i add to site-data/extension a file called myextension.xml with content</p>
<pre class="brush: xml; title: ; notranslate">
&lt;extension&gt;
	&lt;modules&gt;
		&lt;module&gt;
			&lt;id&gt;ReplaceForm&lt;/id&gt;
			&lt;description&gt;Show edit metadata for specific form&lt;/description&gt;
			&lt;components&gt;
				&lt;component&gt;
					&lt;scope&gt;template&lt;/scope&gt;
					&lt;region-id&gt;edit-metadata&lt;/region-id&gt;
					&lt;source-id&gt;edit-metadata&lt;/source-id&gt;
					&lt;sub-components&gt;
						&lt;sub-component id=&quot;default&quot;&gt;
							&lt;evaluations&gt;
								&lt;evaluation id=&quot;hide&quot;&gt;
									&lt;render&gt;false&lt;/render&gt;
								&lt;/evaluation&gt;
							&lt;/evaluations&gt;
						&lt;/sub-component&gt;
						&lt;sub-component id=&quot;edit-metadata-new&quot; index=&quot;25&quot;&gt;
							&lt;url&gt;/components/form&lt;/url&gt;
							&lt;properties&gt;
								&lt;itemKind&gt;node&lt;/itemKind&gt;
								&lt;itemId&gt;{nodeRef}&lt;/itemId&gt;
								&lt;formId&gt;{formId}&lt;/formId&gt;
								&lt;mode&gt;edit&lt;/mode&gt;
								&lt;submitType&gt;json&lt;/submitType&gt;
								&lt;showCaption&gt;true&lt;/showCaption&gt;
								&lt;showCancelButton&gt;true&lt;/showCancelButton&gt;
							&lt;/properties&gt;
						&lt;/sub-component&gt;
					&lt;/sub-components&gt;
				&lt;/component&gt;
			&lt;/components&gt;
		&lt;/module&gt;
	&lt;/modules&gt;
&lt;/extension&gt;
</pre>
<p>I will not go into details about surf extension, instead watch the Alfresco <a href="http://www2.alfresco.com/TTL_Episode54" target="_blank">Webinar</a> about Surf extension with David Draper and read the <a href="http://www.slideshare.net/alfresco/tech-talk-live-on-share-extensibility" target="_blank">slides</a>. What happens when this customization is applied is that the default component is replaced by one that can take formId as url parameter. You can easily test this (when above extension is applied) by navigating to page edit-metadata and in the end of the url add &#038;formId=doclib-simple-metadata. You will se the form that is normally just used for the popup edit metadata dialog in the full page edit.</p>
<p>So now I need a way to call this page with the formId parameter. The edit-metadata page is opened using a document library action, so I need to append the formId parameter if (and only then) the aspect in question is used. From version 4.0 this is in configuration that you can easily alter. The default config for actions is found in share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml. From there I came up with this config that you can put in share-config-custom.xml</p>
<pre class="brush: xml; title: ; notranslate">
  &lt;config evaluator=&quot;string-compare&quot; condition=&quot;DocLibActions&quot;&gt;
    &lt;!-- Action definitions --&gt;
    &lt;actions&gt;
      &lt;action id=&quot;document-edit-metadata&quot; type=&quot;pagelink&quot; label=&quot;actions.document.edit-metadata&quot;&gt;
        &lt;param name=&quot;page&quot;&gt;edit-metadata?nodeRef={node.nodeRef}&lt;/param&gt;
        &lt;permissions&gt;
          &lt;permission allow=&quot;true&quot;&gt;Write&lt;/permission&gt;
        &lt;/permissions&gt;
        &lt;evaluator negate=&quot;true&quot;&gt;evaluator.doclib.action.isLocked&lt;/evaluator&gt;
        &lt;override&gt;document-edit-properties&lt;/override&gt;
      &lt;/action&gt;
      &lt;action id=&quot;document-edit-metadata-diarie&quot; type=&quot;pagelink&quot; label=&quot;actions.document.edit-metadata&quot;&gt;
        &lt;param name=&quot;page&quot;&gt;&lt;![CDATA[edit-metadata?nodeRef={node.nodeRef}&amp;formId=diarie]]&gt;&lt;/param&gt;
        &lt;permissions&gt;
          &lt;permission allow=&quot;true&quot;&gt;Write&lt;/permission&gt;
        &lt;/permissions&gt;
        &lt;evaluator&gt;evaluator.isDiarieNotLocked&lt;/evaluator&gt;
        &lt;override&gt;document-edit-metadata&lt;/override&gt;
        &lt;override&gt;document-edit-properties&lt;/override&gt;
      &lt;/action&gt;
    &lt;/actions&gt;

    &lt;!-- Action Group definitions --&gt;
    &lt;actionGroups&gt;
      &lt;actionGroup id=&quot;document-browse&quot;&gt;
        &lt;action index=&quot;130&quot; id=&quot;document-edit-metadata&quot; /&gt;
        &lt;action index=&quot;130&quot; id=&quot;document-edit-metadata-diarie&quot; /&gt;
      &lt;/actionGroup&gt;
      &lt;actionGroup id=&quot;document-details&quot;&gt;
        &lt;action index=&quot;120&quot; id=&quot;document-edit-metadata-diarie&quot; /&gt;
      &lt;/actionGroup&gt;
    &lt;/actionGroups&gt;
  &lt;/config&gt;
</pre>
<p>It does two things, first I replace the popup metadata edit in browse mode, I want the full page. So that is why the default config for action &#8216;document-edit-metadata&#8217; is added. I cannot only add this action to Action group definitions, because then you will see both, that is why I redefine the action, but now with an override to hide document-edit-properties if used. Next is to add my new action &#8216;document-edit-metadata-diarie&#8217; that has the formId parameter. Note that it needs enclose the parameter in CDATA to be valid xml. If the evaluator returns true, then use this one and override the others. So next we need to define the evaluator.isDiarieNotLocked. Default evaluators can be found in share/WEB-INF/classes/alfresco/slingshot-documentlibrary-context.xml. Put yours in a mycustom-context.xml file in the class-path.</p>
<pre class="brush: xml; title: ; notranslate">
  &lt;bean id=&quot;evaluator.hasdiariefordaspect&quot; parent=&quot;evaluator.doclib.action.hasAspect&quot;&gt;
    &lt;property name=&quot;aspects&quot;&gt;
      &lt;list&gt;
        &lt;value&gt;lx:diarieFord&lt;/value&gt;
      &lt;/list&gt;
    &lt;/property&gt;
  &lt;/bean&gt;
  &lt;bean id=&quot;evaluator.isNotLocked&quot; parent=&quot;evaluator.doclib.action.chainedMatchOne&quot;&gt;
    &lt;property name=&quot;evaluators&quot;&gt;
      &lt;list&gt;
        &lt;ref bean=&quot;evaluator.doclib.action.notEditable&quot; /&gt;
      &lt;/list&gt;
    &lt;/property&gt;
    &lt;property name=&quot;negateOutput&quot; value=&quot;true&quot; /&gt;
  &lt;/bean&gt;
  &lt;bean id=&quot;evaluator.isDiarieNotLocked&quot; parent=&quot;evaluator.doclib.action.chainedMatchAll&quot;&gt;
    &lt;property name=&quot;evaluators&quot;&gt;
      &lt;list&gt;
        &lt;ref bean=&quot;evaluator.hasdiariefordaspect&quot; /&gt;
        &lt;ref bean=&quot;evaluator.isNotLocked&quot; /&gt;
      &lt;/list&gt;
    &lt;/property&gt;
  &lt;/bean&gt;
</pre>
<p>So my evaluators does this, evaluator.hasdiariefordaspect checks that is has the required aspect, evaluator.isNotLocked evaluates if it can be edited and is not locked (this one propbably can be defined in a smarter way, but it works), then finally put together in evaluator.isDiarieNotLocked where we need both previous evaluators to be true. If you want to learn more about Share Document library extension read Mike Hatfields <a href="http://blogs.alfresco.com/wp/mikeh/" target="_blank">blog</a>.</p>
<p>And finally we have customized Share to use a specific form for edit metadata when the document has the selected aspect applied. With only configuration files!</p>
<p>Note that my approach lets user with a bit of knowledge add whatever form id they want in the url, and thus potentially edit hidden metadata. In this use case it was not considered an issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2012/05/04/select-metadata-edit-form-based-on-aspect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Alfresco CIFS &#8211; Windows 2008 leaking SMB sessions</title>
		<link>http://loftux.com/2012/02/27/alfresco-cifs-windows-2008-leaking-smb-sessions/</link>
		<comments>http://loftux.com/2012/02/27/alfresco-cifs-windows-2008-leaking-smb-sessions/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 09:56:35 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=864</guid>
		<description><![CDATA[<p>One of the strengths with Alfresco is the many ways you can interact with the repository, getting information in and out of the repository not only using the web client, but also with protocol such as imap, ftp nfs, webdav, and cifs. But taking a protocol such as cifs (before 1996 known as smb) that [...]]]></description>
			<content:encoded><![CDATA[<p>One of the strengths with Alfresco is the many ways you can interact with the repository, getting information in and out of the repository not only using the web client, but also with protocol such as imap, ftp nfs, webdav, and cifs. But taking a protocol such as cifs (before 1996 known as smb) that is non-versioning network file system and apply it to a versionable repository such as Alfresco you are on to a tough journey. I have been dealing more with cifs for many of my clients than I ever would have wanted, but I understand client that wish to use Alfresco via cifs. Their end users can just continue editing document the way they are used to and avoiding the extra steps of download/upload that the web client like Share requires.</p>
<p>The problem here is that although there is a file locking mechanism in CIFS, and Alfresco can check for that and detect when there is a file save and apply versioning in the background, there is no way to control how client implements a file save. Many document editing clients implements some sort of temporary file where the actual saving takes place, until you finally close the document, the original document is deleted by the client, and replaced by the temporary file now renamed to the original name. This Alfresco has to detect to actually do versioning, and not just plain delete and creation of a new document. My intention here is not to exactly explain the process, rather give you a quick insight of what Alfresco has to deal with. And if you think that the Microsoft Office suite has one way of doing a file save, think again. Not only does the file save process differ between the different office products, it differs between version, Microsoft Word 2003 have a different save process than version 2007. In version 4 of Alfresco this has finally been dealt with in a reliable way, and I feel comfortable saying to my clients that they can use cifs without file editing in some cases corrupting the files.</p>
<p>So for one of my clients we quickly upgraded to version 4, and deployed Alfresco with Share client not only acting as collaboration tool, but also as their Intranet. And with document editing via cifs with Single Sign On using Kerberos. And to start with all is well. Until they start the bigger roll out to let more users edit via cifs. Then some users get access denied and get prompted with a login, but no credentials entered ever work. And these clients are are all on a Windows 2008 Terminal Server. And a issue tracking journey begins ending in a very odd workaround.</p>
<p>The reports of this error starting coming in the second week in january. Now from the end users perspective it is Alfresco that is failing, but when researching issues like this it can be just about anything from the Windows OS, network equipment, and Alfresco. You just have to keep an open mind about every possibility and not start a blame game between Windows, Network and Alfresco administrators. Here are some of the things we tried collaboratively (not specifically in this order)</p>
<ul>
<li>There was an authentication error is Kerberos. So in Alfresco turn on all the Kerberos and authentication logging there is. But no authentication errors in the log at all. It either works, or not.</li>
<li>Windows admins notice that this happens around 50 users being logged in on the Terminal server. So maybe a throttling error with Active Directory servers. Second terminal server deployed, but on this server it happens around 10 users?</li>
<li>Verifying all the krb5.conf settings, creating new keytab files and deploy on the Alfresco server</li>
<li>Upgrading the Ubuntu version on the server Alfresco runs on</li>
<li>Upgrading Alfresco version to latest Alfresco Community 4.0.d</li>
<li>Restart of Terminal servers. Temporarily helped, but cifs session after a while started to get denied.</li>
<li>Packet tracing, staring yourself blind at packet traces. We could catch the Authentication denied for SMB, but there was no clue whatsoever about why.</li>
</ul>
<p>None of the above gave some insight, and we tried many more things not mentioned here. And if you have about 200 users relying on the Alfresco server being available, you cannot just restart Alfresco to try out configuration changes, or the terminal server. Probably would have saved some time if you are on Alfresco Enterprise, were you can change configuration and log levels without restart.</p>
<p>What finally gave a clue what was going on was setting the cifs.sessionDebug flags in alfresco-global.properties. Since we had no clue where the error could be, almost all of available flags were set. And it spits out lots of information, and in there we found </p>
<p><code>[SMB] Failed to allocate UID for virtual circuit, [0:-1,[peter@DOMAIN.NET:null,,,192.168.10.10,Normal],Tree=0,Searches=0]</code>. </p>
<p>It is not a very obvious error, and that it is the cause for authentication denied is even less obvious if you have no clue what a virtual circuit is. Time to learn more about cifs protocol than you want to. There was a similar error filed already <a href="https://issues.alfresco.com/jira/browse/JLAN-142" target="_blank">JLAN-142</a>, that I have now amended.</p>
<p>My client currently have have cifs working. It turns out that Windows 2008 Terminal server is &#8220;eating&#8221; smb sessions, and not releasing them, making Alfresco run out of Virtual Circuits . We have deployed two things, one is to compile a custom version of Alfresco (thank you for being open source) increasing virtual circuits from default 16 to 128. The other is a crazy one, the bug in windows can be worked around if you never log out the first user that logs into the terminal server as discussed in <a href="http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2networking/thread/9f93508c-71fa-4807-b41a-8f558563afe3" target="_blank">this Microsoft forum discussion</a>. Since we deployed two fixes at the same time I cannot for sure say which is the final solution, or if they interact, but it actually looks like it is the &#8220;keep user logged in&#8221;, deemed &#8220;the weirdest workaround ever deployed&#8221; by my clients IT-administrators. If we can reach a definitive conclusion I will update this post, but after finally having a working system they are not to keen on more restarts.</p>
<p>And there seem to be some fixes to the SMB session leaks, since my client have their Terminal Server in a working state they haven&#8217;t tried them. But I think I should mention them, and if you have any experience with them let me know.</p>
<p><a href="http://support.microsoft.com/kb/2537589" target="_blank">SMB/CIFS sessions leak in Windows Vista, in Windows Server 2008, in Windows 7 and in Windows Server 2008 R2</a></p>
<p><a href="http://support.microsoft.com/kb/948572" target="_blank">A handle leak occurs in a Server Message Block (SMB) session between computers that are running Windows Vista or Windows Server 2008</a></p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2012/02/27/alfresco-cifs-windows-2008-leaking-smb-sessions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Replace Alfresco standard Flash viewer with pdf.js</title>
		<link>http://loftux.com/2012/01/08/replace-alfresco-standard-flash-viewer-with-pdf-js/</link>
		<comments>http://loftux.com/2012/01/08/replace-alfresco-standard-flash-viewer-with-pdf-js/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 17:11:27 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Preview]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=832</guid>
		<description><![CDATA[<p>Have you noticed that the flash based previews in Alfresco 4.0 looks a bit blurry? Then you are correct, it is not your vision that&#8217;s failing, they really are. This is due to change settings for pdf2swf program (that create the flash) to make it more reliable for large pdfs, and for certain pdfs it [...]]]></description>
			<content:encoded><![CDATA[<p>Have you noticed that the flash based previews in Alfresco 4.0 looks a bit blurry? Then you are correct, it is not your vision that&#8217;s failing, they really are. This is due to change settings for pdf2swf program (that create the flash) to make it more reliable for large pdfs, and for certain pdfs it could crash the jvm completely. So there was a good reason for the change. <a href="http://loftux.se/wp-content/uploads/2012/01/Blurry-flash-preview1.png"><img src="http://loftux.se/wp-content/uploads/2012/01/Blurry-flash-preview1-300x182.png" alt="" title="Blurry flash preview" width="300" height="182" class="aligncenter size-medium wp-image-835" /></a></a>The image above shows the difference between the settings. Details can be found in this issue <a href="https://issues.alfresco.com/jira/browse/ALF-10870" target="_blank">ALF-10870</a>. This issue is now closed as won&#8217;t fix, something I do not agree with. It would have been better to postpone the fix for 4.0.x (or any later version) if there is no immediate resolution, because a fix is needed, no one wants previews that makes Alfresco look like an inferior product (that it absolutely not is) on first impression.</p>
<p>But my intention here is not to whine, Alfresco has the bigger picture here, and has to set the priorities. And since this is an open source product, if you are not to happy with how something work, you can fix/enhance it. So that is what I&#8217;ve done. I&#8217;ve created an alternative viewer based on the Mozilla project <a href="https://github.com/mozilla/pdf.js" target="_blank">pdf.js</a>.</p>
<p>All documents that are shown in the flash based viewer has been transformed in the chain <code>&lt;source format&gt; - &lt;pdf&gt; - &lt;flash&gt;</code>. If we could skip that one last step, we can avoid using pdf2swf, and thus the problem of risk of jvm crash. And there would support for the same source formats as currently. But then there needs to be a way to display the pdf inline. Chrome and Safari comes with build in pdf viewer, so that could be used. And many other have an external plugin like Acrobat reader installed. That would cover many users, but ideally there would be something that can be run in the browser to show pdf. And this is what <a href="https://github.com/mozilla/pdf.js" target="_blank">pdf.js</a> does, all implemented in Javascript and using html5.</p>
<p>So the viewer I&#8217;ve implemented tries to</p>
<ul>
<li>Use pdf.js viewer for html5 compliant browser</li>
<li>If pdf.js cannot be used, try to see if pdf reader plugin is available, and display the pdf using that plugin</li>
<li>As last option, the standard Alfresco flash based viewer is used if none of the above works.</li>
</ul>
<p>The easiest way to do this was to use &lt;iframe&gt;, where the pdf.js viewer is loaded via an Alfresco surf page that implements the standard viewer almost out of the box. You can try the standard one <a href="http://mozilla.github.com/pdf.js/web/viewer.html" target="_blank">here</a>. It is very feature complete, and handles most of the pdfs I&#8217;ve tried very well.<br />
The same method, using iframe, is used to display using a pdf reader plugin, just call the pdf directly in the iframe src url.</p>
<p>This is what it looks like</p>
<p><a href="http://www.youtube.com/watch?v=V1R08Ba3uo4&#038;fmt=18">www.youtube.com/watch?v=V1R08Ba3uo4</a></p>
<p>I will release the source code shortly, needs to be cleaned up a bit. I will update here when I&#8217;m done with that.</p>
<p><strong>Update</strong><br />
The source code is checked into the Share Extras project. You can view it <a href="http://code.google.com/p/share-extras/source/browse/#svn%2Ftrunk%2FViewer%20Extension">here</a>.<br />
There is no compiled release yet, that is on purpose, it is still untested, but if you know how to check-out and compile, then I assume you understand not to rush it to use on a production server.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2012/01/08/replace-alfresco-standard-flash-viewer-with-pdf-js/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Breakfast seminar Alfresco Content Management 24 November</title>
		<link>http://loftux.com/2011/11/07/breakfast-seminar-alfresco-content-management-24-november/</link>
		<comments>http://loftux.com/2011/11/07/breakfast-seminar-alfresco-content-management-24-november/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 11:56:42 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[Activiti]]></category>
		<category><![CDATA[DevCon]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Seminar]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=818</guid>
		<description><![CDATA[<p>Redpill Linpro is hosting a breakfast seminar about Content Management with Alfresco the 24 November in Stockholm.<br /> Besides presentations about workflows with Activiti, Alfresco Mobile, and integration with CMIS, I (Peter Löfgren) will give you the latest take aways from DevCon 9-10 November.<br /> All presenations in Swedish unless otherwise noted.</p> <p>For who?<br /> [...]]]></description>
			<content:encoded><![CDATA[<p>Redpill Linpro is hosting a breakfast seminar about Content Management with Alfresco the 24 November in Stockholm.<br />
Besides presentations about workflows with Activiti, Alfresco Mobile, and integration with CMIS, I (Peter Löfgren) will give you the latest take aways from DevCon 9-10 November.<br />
All presenations in Swedish unless otherwise noted.</p>
<p><strong>For who?</strong><br />
All that have an interest in Alfresco, both technically and practically<br />
<strong>When and where?</strong><br />
24 november at Redpill Linpro Korta gatan 7, Vreten, Solna.<br />
<strong>Agenda</strong><br />
08.00 Breakfast and signup<br />
08.25 Welcome and introduction, Redpill Linpro<br />
08.30 Activiti BPM and Alfresco &#8211; Carl Nordenfelt, Redpill Linpro<br />
08.50 Questions and short break<br />
09.00 Building integrations using CMIS &#8211; Oskar Elisson, Redpill Linpro<br />
09.20 Questions and short break<br />
09.30 Alfresco Mobile (presentation in english) &#8211; John Juerss and Christer Eriksson, Alfresco<br />
09.50 Questions and Coffee break<br />
10.10 Alfresco DevCon 2011 &#8211; take away &#8211; Peter Löfgren, Loftux<br />
10.30 Question and conclusion</p>
<p><a href="http://www.redpill-linpro.se/Nyheter-events/Events/2011/Content-Management-Alfresco-i-Stockholm" target="_blank">Detailed program and signup via Redpill Linpro.</a></p>
<p>You can also go to the seminar in <a href="http://www.redpill-linpro.no/Nyheter-events/Events/2011/Content-Management-Alfresco-i-Oslo" target="_blank">Oslo November 22nd</a>, and <a href="http://www.redpill-linpro.dk/Nyheder-events/Events/2011/Content-Management-Alfresco-in-Copenhagen" target="_blank">Copenhagen November 23rd</a>. Unfortunately I cannot be present at these events, for details about these events follow the links.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2011/11/07/breakfast-seminar-alfresco-content-management-24-november/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfresco multilingual properties &#8211; feature or bug?</title>
		<link>http://loftux.com/2011/10/30/alfresco-multilingual-properties-feature-or-bug/</link>
		<comments>http://loftux.com/2011/10/30/alfresco-multilingual-properties-feature-or-bug/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 13:02:41 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[I18N]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=796</guid>
		<description><![CDATA[<p>Many of you that use Alfresco is probably not aware of that Alfresco has built in support for multilingual properties. Out of the box Alfresco use this for Title and Description, but only for those two. What this means for documents is that if you are logged into Share as a user with en_US locale [...]]]></description>
			<content:encoded><![CDATA[<p>Many of you that use Alfresco is probably not aware of that Alfresco has built in support for multilingual properties. Out of the box Alfresco use this for Title and Description, but only for those two. What this means for documents is that if you are logged into Share as a user with en_US locale preferences and create a document with title &#8220;My English Title&#8221; and description &#8220;My English description&#8221;, then a user with sv_SE (as in swedish) updates the properties to title &#8220;My Swedish Title&#8221; and description &#8220;My Swedish description&#8221;, any user with en_US will still see the original text, sv_SE user will see the &#8220;translated&#8221; Swedish text. For this to happen you do not need to have that language pack installed. To test this I recommend Firefox with the plugin Quick Locale Switcher.</p>
<p>This is a very nice feature, that just works. But there are some problems with this. First there is no indication in Share forms that this happens, there should at least be visual indication that it is. Second problem is that the title and description properties are not just used for documents, they are user for many other components in Alfresco. I have done some testing, and I have found that Site name and description, Blog posts title, Discussion topic title, Data List name and description, and Data List entry name and description will show different texts depending on locale if it has been edited with different locale. Again this only happens if edited with a different locale, probably not happening so many times that a Discussion is edited with different locales, but that Site Managers from different countries change Site title and description is not unlikely.</p>
<p>It was a client of mine that first noticed this behavior, and I filed a bug <a href="https://issues.alfresco.com/jira/browse/ALF-3756" target="_blank">ALF-3756</a> in July 2010. My initial reaction was that users should not see different things, and that is was because user user different browsers, and that this should be fixed. As it turns out, it is not because of different browsers, it is because of different locale preference set in different browsers. It was recently fixed in HEAD, so happily testing this out, nothing had changed and the behavior is the same. So i filed a regression bug <a href="https://issues.alfresco.com/jira/browse/ALF-11166" target="_blank">ALF-11166</a>, but after thinking of the multilingual behavior, it may be that it is not a bug after all, and this is why I&#8217;m writing this post.</p>
<p>I&#8217;ve thought of ways to fix this, one could be that you change the property definition of cm:title and cm:description in the data model from d:mltext to d:text. Some limited testing shows that this work, a property will stay multilingual (d:mltext) until next edit, then it is saved as d:text, and all user see the same thing regardless of locale. Changing the default model is nothing I recommend, and I only did very limited testing just to see what happened. And this is probably not the way to fix this, because it removes a nice feature. Alfresco is very locale (I18N for the hardcore) aware, you can localise almost everything, and from 4.0 property lists (constraints) can be localized. So the very fact that you can have a Site title and description in different locale is a good thing.</p>
<p>So the proper fix for this is to visually indicate what is going on in all forms and dialogs. It can be implemented in steps if not the full approach can be taken at once</p>
<ol>
<li>
Create a control with flag corresponding to the locale used, so that you visually see what locale is currently being edited.
</li>
<li>
Change the control so that you can list other values to see base language and the current values for other locales. That way you can keep track of translations and keep them in sync.
</li>
</ol>
<p>I created (or actually updated existing text controls) and then it looks like this for multilingual properties<br />
<a href="http://loftux.se/wp-content/uploads/2011/10/Multilingual-Properties.png"><img src="http://loftux.se/wp-content/uploads/2011/10/Multilingual-Properties-300x161.png" alt="" title="Multilingual Properties" width="300" height="161" class="alignleft size-medium wp-image-800" /></a><br />
Full details on how I did this is in the issue <a href="https://issues.alfresco.com/jira/browse/ALF-11166" target="_blank">ALF-11166</a>. Its a simple first step with just editing the control freemarker templates, a more complete solution would be as I outlined the possibility to list all added values for different languages. Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2011/10/30/alfresco-multilingual-properties-feature-or-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use Alfresco as a portal for web applications</title>
		<link>http://loftux.com/2011/10/26/use-alfresco-as-a-portal-for-web-applications/</link>
		<comments>http://loftux.com/2011/10/26/use-alfresco-as-a-portal-for-web-applications/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 12:53:29 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[Extension]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Portal]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[Templates]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=763</guid>
		<description><![CDATA[<p>Many of my customers has asked for a simple way to add existing web based applications to Alfresco, so that Alfresco is their main gateway to all applications. I have done this for them by customizing the <a href="http://wiki.alfresco.com/wiki/Share_Header" target="_blank">Share Header</a> to add menu links, and then by using an iframe. By using an iframe, [...]]]></description>
			<content:encoded><![CDATA[<p>Many of my customers has asked for a simple way to add existing web based applications to Alfresco, so that Alfresco is their main gateway to all applications. I have done this for them by customizing the <a href="http://wiki.alfresco.com/wiki/Share_Header" target="_blank">Share Header</a> to add menu links, and then by using an iframe. By using an iframe, you still have access to all Alfresco menus for easy navigation. Not all applications are iframe friendly, so those you can add as links that open in a separate window. And yes, putting application in an iframe is not true integration and does note make Alfresco a true portal, but for almost no cost at all it does add value.</p>
<p>This post will show you how to do this, and also take advantage of the built in templates (available from 4.0.b), and the new Surf extension mechanism.<br />
<a href="http://loftux.se/wp-content/uploads/2011/10/AppIntegrator.png"><img src="http://loftux.se/wp-content/uploads/2011/10/AppIntegrator-300x119.png" alt="" title="AppIntegrator" width="300" height="119" class="alignnone size-medium wp-image-764" /></a><br />
<span id="more-763"></span><br />
All paths I&#8217;m referring to below are class path relative, if you are editing directly you can use tomcat/shared/classes/alfresco.<br />
Start by creating a new page in site-data/pages called appintegrator.xml with content</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;page&gt;
	&lt;title&gt;Application&lt;/title&gt;
	&lt;description&gt;Application&lt;/description&gt;
	&lt;template-instance&gt;1-column&lt;/template-instance&gt;
	&lt;authentication&gt;user&lt;/authentication&gt;
	&lt;components&gt;

		&lt;!-- Top --&gt;
		&lt;component&gt;
			&lt;region-id&gt;title&lt;/region-id&gt;
			&lt;sub-components&gt;
				&lt;sub-component id=&quot;appintegratortitle&quot;&gt;
					&lt;url&gt;/components/title/simple-title&lt;/url&gt;
					&lt;properties&gt;
						&lt;title&gt;Application&lt;/title&gt;
					&lt;/properties&gt;
				&lt;/sub-component&gt;
			&lt;/sub-components&gt;
		&lt;/component&gt;

		&lt;!-- Column --&gt;
		&lt;component&gt;
			&lt;region-id&gt;column&lt;/region-id&gt;
			&lt;sub-components&gt;
				&lt;sub-component id=&quot;appintegratoriframe&quot;&gt;
					&lt;url&gt;/components/appintegrator/iframe&lt;/url&gt;
				&lt;/sub-component&gt;
			&lt;/sub-components&gt;
		&lt;/component&gt;
	&lt;/components&gt;
&lt;/page&gt;
</pre>
<p>As you can see it uses a template instance of 1-column, one of the out of the box templates available from 4.0.b so we do not need to create templates for our new page. Erik Winlöf has posted about <a href="http://blogs.alfresco.com/wp/ewinlof/2011/10/12/create-pages-in-alfresco-share-using-new-out-of-the-box-templates/" target="_blank">how to use these new templates </a> if you want to learn more.<br />
The first component in our new page is an out of the box component in Alfresco that we are just re-using to create a title bar. The next one is a new component we need to create to render the iframe. Start by creating files in site-webscripts/org/alfresco/components/appintegrator<br />
iframe.get.desc.xml</p>
<pre class="brush: xml; title: ; notranslate">
&lt;webscript&gt;
  &lt;shortname&gt;appintegratoriframe&lt;/shortname&gt;
  &lt;description&gt;Application Integrator iFrame&lt;/description&gt;
  &lt;url&gt;/components/appintegrator/iframe&lt;/url&gt;
&lt;/webscript&gt;
</pre>
<p>iframe.get.html.ftl</p>
<pre class="brush: xml; title: ; notranslate">
&lt;iframe id=&quot;${args.htmlid}-appintegrator&quot; src=&quot;${protocol}${iurl}&quot; scrolling=&quot;no&quot;
marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot;
style=&quot;overflow:visible; width:100%; height:5000px&quot;&gt;&lt;/iframe&gt;
</pre>
<p>iframe.get.js</p>
<pre class="brush: jscript; title: ; notranslate">
//The url argument is called iurl because there is a built in url object in Surf
var iurl = page.url.args.iurl !== null ? decodeURIComponent(page.url.args.iurl)
		: &quot;loftux.se&quot;;
var ssl = page.url.args.ssl !== null ? decodeURIComponent(page.url.args.ssl)
		: &quot;false&quot;;

if (ssl===&quot;true&quot;) {
	model.protocol=&quot;https://&quot;;
}else{
	model.protocol=&quot;http://&quot;;
}
model.iurl=iurl;
</pre>
<p>Restart Share, and now you should be able to navigate to <a href="http://localhost:8080/share/page/appintegrator?iurl=loftux.com&#038;ssl=false" target="_blank">http://localhost:8080/share/page/appintegrator?iurl=loftux.com&#038;ssl=false</a>. As you can see there are two arguments, iurl is the url you want the iframe to load, and ssl true/false sets the protocol to https/http respectively (so you don&#8217;t add that in iurl).<br />
Just start adding links to the Share Header, and you&#8217;ll have all your nice web apps in one convenient location.</p>
<p>But that title bar could say something more than just &#8216;Application&#8217;, like the name and a description of the application currently loaded in the iframe. Since we want to link it from the Share Header, we want to pass it as url arguments. For that we create a new title component, put it in site-webscripts/org/alfresco/components/appintegrator. It is very similar to the original one, it is just changed so that it can load arguments from the url.<br />
appintegrator-title.get.desc.xml</p>
<pre class="brush: xml; title: ; notranslate">
&lt;webscript&gt;
  &lt;shortname&gt;Simple Title&lt;/shortname&gt;
  &lt;description&gt;Simple generic title component that displays the title using the message keys passed in as url arguments&lt;/description&gt;
  &lt;url&gt;/components/appintegrator/appintegrator-title&lt;/url&gt;
&lt;/webscript&gt;
</pre>
<p>appintegrator-title.get.html.ftl</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;page-title theme-bg-color-1 theme-border-1&quot;&gt;
   &lt;h1 class=&quot;theme-color-3&quot;&gt;&lt;span&gt;&lt;#if page.url.args.title??&gt;${page.url.args.title}&lt;/#if&gt;&lt;/span&gt;
   &lt;#if page.url.args.subtitle??&gt;${page.url.args.subtitle}&lt;/#if&gt;&lt;/h1&gt;
&lt;/div&gt;
</pre>
<p>To load this new component, the &#8220;old&#8221; way of doing this would be to edit the template. But since we are using out of the box templates, we cannot change them. But for 4.0, there is a new extension mechanism, that we can use to simply replace an existing component with our own, without changing the template. For details on this, read <a href="http://blogs.alfresco.com/wp/ddraper/2011/07/22/how-to-add-content-to-an-alfresco-share-page/" target="_blank">David Drapers blog</a> (first post in a series).</p>
<p>So we in site-data/extension we add the file<br />
appintegrator.xml</p>
<pre class="brush: xml; title: ; notranslate">
&lt;extension&gt;
  &lt;modules&gt;
   &lt;module&gt;
   &lt;id&gt;Loftux AppIntegrator&lt;/id&gt;
   &lt;components&gt;
     &lt;component&gt;
	&lt;region-id&gt;title&lt;/region-id&gt;
	&lt;source-id&gt;appintegrator&lt;/source-id&gt;
	&lt;scope&gt;page&lt;/scope&gt;
	&lt;sub-components&gt;
	  &lt;!-- Remove default title --&gt;
	  &lt;sub-component id=&quot;appintegratortitle&quot;&gt;
	    &lt;evaluations&gt;
	      &lt;evaluation id=&quot;hidedefaulttitle&quot;&gt;
	        &lt;render&gt;false&lt;/render&gt;
	      &lt;/evaluation&gt;
	    &lt;/evaluations&gt;
	  &lt;/sub-component&gt;
	  &lt;!-- Add our new title --&gt;
	  &lt;sub-component id=&quot;appintegratortitlenew&quot;&gt;
	    &lt;url&gt;/components/appintegrator/appintegrator-title&lt;/url&gt;
	  &lt;/sub-component&gt;
	&lt;/sub-components&gt;
      &lt;/component&gt;
     &lt;/components&gt;
    &lt;/module&gt;
  &lt;/modules&gt;
&lt;/extension&gt;
</pre>
<p>I will not go into details on how to find region-id, source-id and component id:s, for that I recommend Davids posts. What we do here is to tell Share not to render the simple-title name appintegratortitle, and instead render our own title componet. For this to take effect, you must go to <a href="http://localhost:8080/share/page/modules/deploy" target="_blank">http://localhost:8080/share/page/modules/deploy</a> and deploy the Loftux Appintegrator module.<br />
<a href="http://loftux.se/wp-content/uploads/2011/10/Deploy-Modules.png"><img src="http://loftux.se/wp-content/uploads/2011/10/Deploy-Modules-300x142.png" alt="" title="Deploy Modules" width="300" height="142" class="alignleft size-medium wp-image-775" /></a><br />
When our extension module is deployed, we can add two new arguments to the url, title and subtitle that will display on the title bar. None of them are mandatory, just use the one you need.<br />
Your final configuration for the Share Header could look something like this (extract)</p>
<pre class="brush: xml; title: ; notranslate">
&lt;item type=&quot;container&quot; id=&quot;application&quot; icon=&quot;appintegrator.png&quot;&gt;
   &lt;container-group id=&quot;my&quot; label=&quot;Internal Applications&quot;&gt;
      &lt;item type=&quot;link&quot; id=&quot;loftuxse&quot; icon=&quot;appintegratorwindow.png&quot; label=&quot;Loftux.se&quot; description=&quot;Dokument och informationshantering&quot;&gt;&lt;![CDATA[/appintegrator?title=Loftux.se&amp;subtitle=Dokumenthantering&amp;iurl=loftux.se]]&gt;&lt;/item&gt;
      &lt;item type=&quot;link&quot; id=&quot;loftuxcom&quot; icon=&quot;appintegratorwindow.png&quot; label=&quot;Loftux.com&quot; description=&quot;Document and Information management&quot;&gt;&lt;![CDATA[/appintegrator?title=Loftux.com&amp;subtitle=Document%20management&amp;iurl=loftux.com]]&gt;&lt;/item&gt;
      &lt;item type=&quot;external-link&quot; id=&quot;devcona&quot; icon=&quot;appintegratorsplash.png&quot; label=&quot;DevCon Americas&quot; description=&quot;Alfresco DevCon Americas&quot;&gt;&lt;![CDATA[/appintegrator?title=Alfresco DevCon&amp;subtitle=Americas&amp;iurl=www.amiando.com/alfresco-devcon-san-diego-2011.html]]&gt;&lt;/item&gt;
      &lt;item type=&quot;external-link&quot; id=&quot;devcone&quot; icon=&quot;appintegratorstar.png&quot; label=&quot;DevCon EMEA APAC&quot; description=&quot;Alfresco DevCon EMEA APAC&quot;&gt;&lt;![CDATA[/appintegrator?title=Alfresco DevCon&amp;subtitle=EMEA%20APAC&amp;iurl=www.amiando.com/alfresco-devcon-london-2011.html]]&gt;&lt;/item&gt;
   &lt;/container-group&gt;
&lt;/item&gt;
</pre>
<p>This will render the menu in the first screenshot. Notice that you can have a links that open in the same window, or a new window/tab. Since applications are in an ifram, the user must have full access to them, so this approach is not suitable for an externally available Share client.</p>
<p>For this Share extension maybe it would have been easier to just create our template as input to our iframe page, and skipped using the new Surf extension. But I think it is a good example and a starting point for how it can be used.<br />
You can download full source, sample share-config and a compiled jar from here <a href='http://loftux.se/wp-content/uploads/2011/10/AppIntegrator.zip'>AppIntegrator</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2011/10/26/use-alfresco-as-a-portal-for-web-applications/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disable a page in Alfresco Share</title>
		<link>http://loftux.com/2011/06/23/disable-a-page-in-alfresco-share/</link>
		<comments>http://loftux.com/2011/06/23/disable-a-page-in-alfresco-share/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 11:22:17 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[surf]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=739</guid>
		<description><![CDATA[<p>You have successfully installed Alfresco Share and now you want to expose Share on internet so that you can collaborate with external users. But you do not want them to access certain pages, like the repository page, for whatever reason you have. First thing you do is to remove the button or menu from the [...]]]></description>
			<content:encoded><![CDATA[<p>You have successfully installed Alfresco Share and now you want to expose Share on internet so that you can collaborate with external users. But you do not want them to access certain pages, like the repository page, for whatever reason you have. First thing you do is to remove the button or menu from the toolbar, having looked at the instructions found on the wiki about <a href="http://wiki.alfresco.com/wiki/Share_Header">Share Header</a>.</p>
<p>Now that removes any links to the page, but as the experienced Alfresco user you are, you know that you still can access the page typing the complete url to the page, for repository page it is <servername>/share/page/repository. And this is something you wanted to disable.</p>
<p>It is actually very easy to, the url will still be available, but not displaying any content besides the navigation bar.<br />
<a href="http://loftux.se/wp-content/uploads/2011/06/ShareDisabledPage.png"><img src="http://loftux.se/wp-content/uploads/2011/06/ShareDisabledPage.png" alt="" title="ShareDisabledPage" width="492" class="alignnone size-full wp-image-740" /></a><br />
Start with adding in <code>tomcat/shared/classes/alfresco/web-extension</code><br />
these folders and subfolders<br />
<code>site-data/pages<br />
site-data/template-instances<br />
templates</code><br />
What you want to do is find the definition file of the page you want to disable, and copy it to site-data/pages. For the page used in this example, repository, it is <code>tomcat/webapps/share/WEB-INF/classes/alfresco/site-data/pages/repository.xm</code><br />
After copying, edit this page to be</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;page&gt;
   &lt;title&gt;Repository Browser&lt;/title&gt;
   &lt;title-id&gt;page.repository.title&lt;/title-id&gt;
   &lt;description&gt;Browse content across the whole Repository&lt;/description&gt;
   &lt;description-id&gt;page.repository.description&lt;/description-id&gt;
   &lt;template-instance&gt;disabled&lt;/template-instance&gt;
   &lt;authentication&gt;user&lt;/authentication&gt;
&lt;/page&gt;
</pre>
<p>The important change here is <code>&lt;template-instance&gt;disabled&lt;/template-instance&gt;</code>, we are telling this page to use a new template, that we now have to create.<br />
Create the file <code>site-data/template-instances/disabled.xml</code> with content</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;template-instance&gt;
   &lt;template-type&gt;disabled&lt;/template-type&gt;
&lt;/template-instance&gt;
</pre>
<p>and the the actual template file <code>site-data/templates/disabled.ftl</code> with content</p>
<pre class="brush: xml; title: ; notranslate">
&lt;#include &quot;/org/alfresco/include/alfresco-template.ftl&quot; /&gt;
&lt;@templateHeader /&gt;

&lt;@templateBody&gt;
   &lt;div id=&quot;alf-hd&quot;&gt;
      &lt;@region id=&quot;header&quot; scope=&quot;global&quot; protected=true /&gt;
   &lt;/div&gt;
&lt;hr/&gt;
This page is not available.
&lt;/@&gt;

&lt;@templateFooter&gt;
   &lt;div id=&quot;alf-ft&quot;&gt;
      &lt;@region id=&quot;footer&quot; scope=&quot;global&quot; protected=true /&gt;
   &lt;/div&gt;
&lt;/@&gt;
</pre>
<p>You can of course add what ever message you like.<br />
Then refresh your webs-scripts or restart your server, and your repository page is disabled.<br />
For any additional page you want to disable, you can just reuse the disabled template. All you have to do is the first step and copy the page definition file, and change it to reference your new template. To know what file to copy, navigate to the page you want to disable, in the url what you find after the /page/ is usually the name of the page definition file with an xml extension.</p>
<p>And of course this can be done even more advanced, like adding response status code 404, add I18N support for the message, or including component webscripts. But this will get you started.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2011/06/23/disable-a-page-in-alfresco-share/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Alfresco Team &#8211; do SMBs innovate?</title>
		<link>http://loftux.com/2011/06/21/alfresco-team-do-smbs-innovate/</link>
		<comments>http://loftux.com/2011/06/21/alfresco-team-do-smbs-innovate/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 14:46:07 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[Alfresco]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=728</guid>
		<description><![CDATA[<p>Alfresco just released Alfresco Team <a href="http://team.alfresco.com">http://team.alfresco.com</a>. It fills a gap between the unsupported Community edition and the for SMBs rather expensive fully supported Enterprise edition.<br /> It is a release with lots of new features, you can read all about them on the team site. This is instead about the limitations put into this [...]]]></description>
			<content:encoded><![CDATA[<p>Alfresco just released Alfresco Team <a href="http://team.alfresco.com">http://team.alfresco.com</a>. It fills a gap between the unsupported Community edition and the for SMBs rather expensive fully supported Enterprise edition.<br />
It is a release with lots of new features, you can read all about them on the team site. This is instead about the limitations put into this release.</p>
<p>As an open source company you always have to walk the fine line between just releasing everything for free and getting organisations to pay for your work and generate revenue. This is where Alfresco Team is important, small business customer now actually can pay for what they use, instead of just use the Community edition. But my initial reaction is that Alfresco has set the limits to tight, that it may not encourage a switch from Community to Team, and I will explain why.</p>
<p>The license is that you pay for the number of users. That is all fine, and the more users, the more you pay. But there is also a limit on the number of documents. From 10-100 users there is approximately 30000 docs, from 125-200 it is 60000. That limit should actually scale more linear, so the more users, the more documents. And it should start at a much higher number (if there should be a limit on number of documents at all). I can understand that the there is a cap so that servers do not get overloaded and generate for Alfresco costly support. But 30000 documents seems quite limited for even the smallest organisation.</p>
<p>But my biggest concern with the Alfresco Team release are the non existent possibility to customize. Jeff Potts recently published a post about <a href="http://blogs.alfresco.com/wp/with-commercial-open-source-innovation-happens-everywhere/">With Commercial Open Source Innovation happens everywhere</a>. It is all about how Forums, Open Issue tracker, Code contributions and more centered around Alfresco Community and Enterprise edition creates innovation. I mostly agree, but here is where Alfresco Team apparently do not fit. Because Alfresco has put a limit customizations <a href="http://team.alfresco.com/support/customizations">http://team.alfresco.com/support/customizations</a> you can make. To summarize, you can change css style sheets, and install dashlets, but that is pretty much it!</p>
<p>What, you cannot install a custom model with custom forms? Create a custom workflow? No, those are explicitly listed as no can do. And that is usually one of the first things you end up customizing. I guess this can be fixed by Alfresco by adding a built in content modeler and forms configurator, but still, if you can not have custom models in a content management system, why should i use Alfresco Team and not box.net or Google Apps?</p>
<p>And you are not allowed to use the repository tier, or the Repository page in share. And not do any integration work &#8220;for a custom content-centric application&#8221;. So if you are an innovative SMB, dont go for Alfresco Team, use Community, because Team edition just don&#8217;t fit with being innovative, due to limits set by Alfresco.</p>
<p>I have run my business Loftux for about a year now, and worked with about ten different clients, all of them on Community. And I have helped them create many innovative things, things that would not be allowed in Alfresco Team. My hope was that I could now convert some of the to use Team, and since they are mostly small business, Enterprise is not an option. They will now remain on Community, as long as these way to hard limitations remain. Jeff Potts explains Alfresco view in a <a href="http://ecmarchitect.com/archives/2011/06/21/1413">post</a> on why they have put these limits: &#8220;It’s really about keeping support costs down due to the lower price point&#8221;. I think there must be other ways than putting such a hard limit on how you can use the Alfresco Team edition.</p>
<p>Maybe these limits are a non-issue, that I just meet the SMBs that wants customizations, and all the rest out there run out of the box installs. And understand me correctly, this is not a post about getting things for free. I get paid by my clients for customizations, I just wish I could still do that, and my clients will pay Alfresco for support. For now, if I recommend Alfresco Team, I will turn away my own business. And to answer this post topic, SMBs do innovate.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2011/06/21/alfresco-team-do-smbs-innovate/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>CKEditor Plugin for Alfresco Share forms</title>
		<link>http://loftux.com/2011/05/11/ckeditor-plugin-for-alfresco-share-forms/</link>
		<comments>http://loftux.com/2011/05/11/ckeditor-plugin-for-alfresco-share-forms/#comments</comments>
		<pubDate>Wed, 11 May 2011 07:34:45 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[extras]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=709</guid>
		<description><![CDATA[<p><a href="http://loftux.se/wp-content/uploads/2011/05/ckeditor-edit.png"></a>Alfresco Share use as standard TinyMCE for inline editing of html files. I needed to customize the editor for a project, but the TinyMCE editor used has some specific Alfresco customizations. Instead trying to understand the Alfresco code, I started from scratch and used the CKEditor, <a href="http://ckeditor.com" target="_blank">ckeditor.com</a>.</p> <p>Functionality</p> All standard functionality in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://loftux.se/wp-content/uploads/2011/05/ckeditor-edit.png"><img class="alignleft size-medium wp-image-695" title="ckeditor-edit" src="http://loftux.se/wp-content/uploads/2011/05/ckeditor-edit-300x220.png" alt="" width="300" height="220" /></a>Alfresco Share use as standard TinyMCE for inline editing of html files. I needed to customize the editor for a project, but the TinyMCE editor used has some specific Alfresco customizations. Instead trying to understand the Alfresco code, I started from scratch and used the CKEditor, <a href="http://ckeditor.com" target="_blank">ckeditor.com</a>.</p>
<p>Functionality</p>
<ul>
<li>All standard functionality in CKEditor.</li>
<li>Loading of custom configuration files</li>
<li>Insert images directly form Alfresco Share site</li>
</ul>
<p>For form in Alfresco Share it is easy to create new controls. In this case you just tell Share form to use the new control</p>
<pre class="brush: xml; title: ; notranslate">&lt;appearance&gt;
   &lt;field id=&quot;cm:content&quot;&gt;
      &lt;control template=&quot;/org/alfresco/components/form/controls/ckeditor.ftl&quot;&gt;
         &lt;control-param name=&quot;forceEditor&quot;&gt;true&lt;/control-param&gt;
      &lt;/control&gt;
   &lt;/field&gt;
&lt;/appearance&gt;</pre>
<p>The actual control including source code can be <a href="http://code.google.com/p/share-extras/downloads/detail?name=ckeditor-form-control-0.1.jar" target="_blank">downloaded</a> from <a href="http://code.google.com/p/share-extras/wiki/CKEditorFormControl" target="_blank">Share Extras project</a>.  More on how to configure forms on <a href="http://wiki.alfresco.com/wiki/Forms" target="_top">Alfresco Wiki</a><br />
To install, copy the file ckeditor-form-control-0.1.jar to tomcat/webapps/share/WEB-INF/lib. Then change the form definitions as outlined above or copy the file <a href="http://share-extras.googlecode.com/svn/trunk/CKEditor%20Form%20Control/ckeditor-config-custom.xml.sample target="_blank">ckeditor-config-custom.xml</a> (remove .sample file ending) to tomcat/shared/classes/alfresco/web-extension and restart.</p>
<p>If you would like to use custom configuration file you can tell the control what config file to load with</p>
<pre class="brush: xml; title: ; notranslate">&lt;control-param name=&quot;settingsfile&quot;&gt;components/editors/ckeditor/my-config.js&lt;/control-param&gt;</pre>
<p>The path should start without / and point to the location where you put your file. If you create a nice config file I can include it as an option file if you send it to me. Planning to add som custom config files in the future. More on how to <a href="http://docs.cksource.com/CKEditor_3.x/Developers_Guide">configure CKEditor</a></p>
<p><a href="http://loftux.se/wp-content/uploads/2011/05/ckeditor-filebrowser.png"><img class="alignleft size-medium wp-image-704" title="ckeditor-filebrowser" src="http://loftux.se/wp-content/uploads/2011/05/ckeditor-filebrowser-300x252.png" alt="" width="300" height="252" /></a><br />
To browse for images, click &#8220;browse on server&#8221; and you will get a list of thumbnails. I based it on the Images dashlet, so of course you can click on an image to get a large preview. To select an image, click on the filename.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2011/05/11/ckeditor-plugin-for-alfresco-share-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing the invite email template in Alfresco Share</title>
		<link>http://loftux.com/2011/04/05/fixing-the-invite-email-template-in-alfresco-share/</link>
		<comments>http://loftux.com/2011/04/05/fixing-the-invite-email-template-in-alfresco-share/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 09:24:56 +0000</pubDate>
		<dc:creator>Peter Löfgren</dc:creator>
				<category><![CDATA[Alfresco @en]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Freemarker]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://loftux.se/?p=684</guid>
		<description><![CDATA[<p>In Alfresco Share you can easily invite both internal and external users to a Collaboratio site. Alfresco will create the user account with accompanying password if the user doesn&#8217;t already exist. The invite is sent as an email message to the invitees containint links to accept or reject the invite, from thereon the user can [...]]]></description>
			<content:encoded><![CDATA[<p>In Alfresco Share you can easily invite both internal and external users to a Collaboratio site. Alfresco will create the user account with accompanying password if the user doesn&#8217;t already exist. The invite is sent as an email message to the invitees containint links to accept or reject the invite, from thereon the user can start to collaborate in information in the collaboration site.</p>
<p>The template user for the invite email is found in Repository> Data Dictionary> Email Templates> invite and is named invite-email.ftl. You can find it by clicking the Repository button in Alfresco Share toolbar, and then navigate to invite-email.ftl. You can edit this file online if you want to. Simple stuff, like changing the sender organisation name, most of us can do, but it is easy to do more.</p>
<p>The confirmation link created is using the server name of the server that the user doing the invite is currently using. This is in most cases correct, but you may want to direct internal and external users to different share servers (still connecting to same repository). It may be because you need to set up different authentication methods, or you have customized share to look different depending on if the users are external or internal.<br />
<code>http://alfresco.example.com/share/page/accept-invite?inviteId=jbpm$156&#038;inviteeUserName=peter%40example.com&#038;siteShortName=examplesite&#038;inviteTicket=610b4819-0153-4406-9d85-0357e5ee65d3</code><br />
The example above shows what the link may look like, in this case the alfresco.example.com is picked up from the server the inviting user is logged into when doing the invite. But in our case we want all external users to use <nobr>alfresco-external.example.com</nobr>. The can easily be achieved using <a href="http://freemarker.sourceforge.net/">freemarker</a> code. If you never have used freemarker before don&#8217;t hesitate, if you know some html and/or javascript you will qiuckly pick up. Freemarker is also well documented.</p>
<p>This is what the template can look like, I&#8217;ve commented inline to explain.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;#assign inviterPersonRef=args[&quot;inviterPersonRef&quot;]/&gt;
&lt;#assign inviterPerson=companyhome.nodeByReference[inviterPersonRef]/&gt;
&lt;#assign inviteePersonRef=args[&quot;inviteePersonRef&quot;]/&gt;
&lt;#assign inviteePerson=companyhome.nodeByReference[inviteePersonRef]/&gt;
&lt;#-- Remove server name from the link--&gt;
&lt;#assign yesLink=args[&quot;acceptLink&quot;]?substring(args[&quot;acceptLink&quot;]?index_of(&quot;/share&quot;)) /&gt;
&lt;#assign noLink=args[&quot;rejectLink&quot;]?substring(args[&quot;rejectLink&quot;]?index_of(&quot;/share&quot;)) /&gt;
&lt;#assign userName=args[&quot;inviteeUserName&quot;]?string /&gt;
&lt;#-- Set server name depending on if user is internal or external --&gt;
&lt;#if userName?index_of(&quot;@&quot;) &amp;gt; 0 &gt;
&lt;#-- All external user has their email address as username, check for this --&gt;
    &lt;#assign serverName=&quot;http://alfresco-external.example.com&quot; /&gt;
&lt;#else&gt;
    &lt;#assign serverName=&quot;https://alfresco.example.com&quot; /&gt;
&lt;/#if&gt;

Hello ${inviteePerson.properties[&quot;cm:firstName&quot;]},

You have been invited by ${inviterPerson.properties[&quot;cm:firstName&quot;]} ${inviterPerson.properties[&quot;cm:lastName&quot;]} to join the '${args[&quot;siteName&quot;]}' site.

Your role in the site will be ${args[&quot;inviteeSiteRole&quot;]}.

To accept this invitation click the link below.
&lt;#-- Append yes link to server name (that is different if internal or external user) --&gt;
${serverName}${yesLink}

&lt;#if args[&quot;inviteeGenPassword&quot;]?exists&gt;
and enter the following information:

Username: ${args[&quot;inviteeUserName&quot;]}
Password: ${args[&quot;inviteeGenPassword&quot;]}

We strongly advise you to change your password when you log in for the first time.

&lt;/#if&gt;
If you do not want to join the site then click here:
&lt;#-- Append no link to server name --&gt;
${serverName}${noLink}

Create a bookmark after accepting for this server for use when you log in next time
${serverName} &lt;#-- This is important, manu users miss where to navigate once they have accepted --&gt;
You can create bookmarks for any place in Alfresco Share if you would like to reach you information quickly.

Regards,

${inviterPerson.properties[&quot;cm:firstName&quot;]} ${inviterPerson.properties[&quot;cm:lastName&quot;]}
Company
</pre>
<p>Note that you now can put a link to root in the Alfesco Share server. I&#8217;ve noticed that many times there are some confusion on where to navigate once the user has accepted. Users will find the invite email again, and the only clickable link in there is the invite, this results in an error since they already have accepted. Unfortunately html formatted emails are not supported by Alfresco yet, so the outgoing email will be plain text formatted.<br />
Another tip can be to to put a link it a help page in the wiki (of you help page is named Getting Started)<br />
<code>${serverName}/share/page/site/publicsitename/wiki-page?title=Getting_Started</code><br />
This must be a link to a public site so that all invited users have read access. </p>
<p>I have configured Alfesco so that external user id:s is base on their email adress. You can do this by creating a file in tomcat/shared/classes/alfresco/extension named invite-context.xml with the content</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
&lt;!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'&gt;
&lt;beans&gt;
    &lt;bean id=&quot;nameBasedUserNameGenerator&quot; class=&quot;org.alfresco.repo.security.authentication.NameBasedUserNameGenerator&quot;&gt;
            &lt;!-- name patterns available:
       		%lastName%,  lower case last name
       		%firstName%, lower case first name
       		%emailAddress% email address
           	%i% lower case first name inital
     		--&gt;
        &lt;property name=&quot;namePattern&quot;&gt;
        	&lt;value&gt;%emailAddress%&lt;/value&gt;
        &lt;/property&gt;
        &lt;property name=&quot;userNameLength&quot;&gt;
            &lt;value&gt;10&lt;/value&gt;
        &lt;/property&gt;
    &lt;/bean&gt;
&lt;/beans&gt;
</pre>
<p>You can also add fixed text, for example if you would like to have the prefix ext you can use <code><value>ext_%firstName%_%lastName%</value></code>.</p>
<p>Hope that this have given you some ideas. There is of course so much more you can do, for example add links to support, links to searches, adding a second language and more. Put some work into this template, as it often is the first thing users get in contact with when starting to user Alfresco Share. Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://loftux.com/2011/04/05/fixing-the-invite-email-template-in-alfresco-share/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

