News
Alfresco Share Web Quick Start WYSIWYG File Browser WCM - 3.4 YUI
Written by Ian Norton - 05 April 2011
The Alfresco Share WYSIWYG file browser is a small module built to add a file browser to the standard Alfresco Share editing window.

The module is intended for a Web Quick Start site that I am working on, I've only had the chance to test it in Share so far, hopefully AWE will tested and implemented by the end of the week.
The AMP for the alfresco repository adds a new webscript that outputs a directory structure as a JSON representation, Share is then able to use this and feeds it into YUI with uses YUI treeview to display the list back in a hierarchical list.
Applying the AMP files
Download both the Alfresco Repo AMP (alfresco-sharefilebrowser-service.amp (3.35 kB)) and the Alfresco Share AMP (share-filebrowser.amp (12.52 kB)), place the amps in the amps/ and amps_share/ directories respectively, run individually using the module management tool:
java -jar bin/alfresco-mmt.jar install amps/alfresco-sharefilebrowser-service.amp tomcat/webapps/alfresco.war -verbose -force
java -jar bin/alfresco-mmt.jar install amps_share/share-filebrowser.amp tomcat/webapps/share.war -verbose -force
Modify the 'share-config-custom.xml' file, this is found either in tomcat/shared/classes/alfresco/web-extension or tomcat/webapps/share/WEB-INF/classes/alfresco/web-extension/ you will need to dependencies for the javascript file needed for the extension as well as specific parameters for the editor. For convenience I've grouped these changes into one file that you can download (share-config-custom.xml (10.38 kB))
Delete the exploded alfresco and share directories from the webapps folder and restart alfresco, when you reload Share you should have a small icon by the 'image URL' text input box which launches the file browser seen below:

Known Issues:
- The file browser's not particularly well integrated into Share, it's essentially it's own HTML page which renders an un-ordered list and uses YUI treeview to format it, i'd like to revise this to run from a share modal pop-up when i've got the time.
- Not tested in AWE, I intend to look at this in the next week or so.
- The resulting hyperlink to a page / document / image uses the "/share/proxy/alfresco/api/node/content/workspace/SpacesStore/cd631807-b3b0-468c-9196-3fa8bb3b1b5f/test.jpg", this obviously doesn't match the URL structure in quickstart
Files:
Alfresco AMP (alfresco-sharefilebrowser-service.amp (3.35 kB))
Share AMP (share-filebrowser.amp (12.52 kB))
Share Config XML (share-config-custom.xml (10.38 kB))
Work in progress: HTML5 Geo location extension for Joomla
Written by Ian Norton - 27 July 2010
As the internet moves from desks and laps into peoples hands in the form of mobile phones, I've began to think of the opportunities that this change in usage habits is bringing about. We currently search for information on the basis of it's title, date or a category within websites, with HTML 5, we're able to detect a users location quite accurately using geo location and serve up content based on their position. Suddenly rather than struggling to find a restaurant nearby as Google's offering us search results from around the world, we're able to refine our search to just our immediate surroundings.
How could this be useful for CMS?
Any content management system would quickly be capable of offering up geo-sensitive information to a user if the longitude and latitude of an article are entered when saving an item. We can take it another step and start publishing the collected data in RDF format to allow search engines and other sites to make use of the data, enabling more geo sensitive devices to find content that's relevant to them.
How does it work?
Wifi hotspots tend to be tied to specific locations, more so when there's a collection of several, Google and SkyHook have been capturing this data for the last few years and are now able to calculate your location based on your surrounding wifi networks. If wifi's not available, then fallbacks may be used:
- The last known location of a device is saved locally
- The surrounding mobile network mast identifiers
- A devices GPS can provide a very accurate location but requires a lot more power and rarely works indoors.
Pitfalls and problems
Obtaining a users geographic position from a device is currently very hit and miss on the desktop, firstly, when connected to ethernet I got nothing returned using any browser. In testing I found that Firefox (3.6.8 OSX) was flaky when returning my position, the best it got was 50 metres away (brilliant), the worst was 100 miles away in London, and it also thought I was at my old house that I moved from 4 weeks ago, whilst these issues are annoying they are manageable. All data returned by the HTML 5 geo web service contains an accuracy paramater, if the data's not accurate we could simply ignore it. Others who tested a demo page reported similar findings, both Firefox and Safari were slow at times to return location data, making the user think they'd stalled.
Mobile wins each time
Testing on my iPhone and iPad (wifi model) I got pretty accurate results, within 5 metres on my iPhone and 30 metres on the iPad. The iPhone is assisted by having GSM, UMTS and GPS radios that it can use as either fallbacks or in the case of GPS, get a very accurate reading. The iPad gave identical results as desktop Safari (as expected) It seems that with only the local wifi networks to rely on results can be a little off - with a mobile device there's far more fallbacks when data looks a little odd.
Handle errors and offer alternatives
It's important to offer an alternative to people who can't or won't provide their location data, this can be in the form of a post code look up, or by dropping a pin into a map and doing a search around that area.
Next..
I'm hoping to have a demo of the Joomla extension ready in the next week and aim to make it available on the Joomla Extension Directory.
Joomla component published - FAQ's
Written by Ian Norton - 20 July 2010
Cognition FAQ is deisgned to be a lightweight FAQ component for people looking for a simple solution for entering and viewing FAQs.
This is the first Joomla! component released by Cognition initiallt to test the waters before releasing some more advanced mods and components later on.
Any feedback would be greatly appreciated - please contact us here
- Link directly to FAQ page from Joomla! menu.
- View all FAQs on one page.
- Simple, clean WYSIWYG editor for questions and answers.
- Toggle FAQs published / unpublished.
- Simple and lightweight - no fancy Javascript frameworks here.
- Joomla 1.5 native.
Cognition FAQs v1.0.1 (16.58 kB)
Drupal Wysiwyg inline editor and easy image uploader
Written by Administrator - 18 June 2010
You'll probably have spotted the lack of a WYSIWYG (what you see is what you get) editor in the default install. This can be fixed quickly with the Wysiwyg module which offers you options to download and install several different inline editors.
TinyMCE seems to be the current leader of the crop and certain offers a lot in terms of functionality and familiarity, it's by far the most popular plugin editor out there at the moment.
Once you've got TinyMCE up and running, download IMCE and the IMCE wysiwyg bridge. Once installed and setup you'll get a new button on the image dialog box, clicking this brings up a 'Browse Files' dialog, you;ll be able to browse the folders of your website for images and also upload new ones directly to the server, removing the need for an FTP client.