Labels

accessibility (2) ADF (1) archiver (3) cmu (1) contributor (13) cookie (1) DAM (3) date (3) download (3) dynamic list (4) ephox (5) fatwire (1) fck (1) filters (1) folders (4) headers (2) IBR (3) ImageAlchemy (3) java (4) javascript (2) layout/template (4) link (6) locale (2) multilingual (1) rendition (3) replicator (4) rules (1) schema (1) search (11) sites (1) sitestudio (24) ssp/sspu (5) SSUrlFieldName (2) stellent (4) timezone (1) urm (1) weblogic (1) workflow (2)

Thursday, 26 August 2010

Contribution Folders explained - in portuguese!

Andre has written a post similar to mine that explains how Contribution Folders work. Funny how people still seem to misunderstand the concept. Oh yeah, his post is in Portuguese (use the Google translate thingy.)

His post: http://andrealmar.wordpress.com/2010/08/24/contribution-folders-use-com-moderacao/
My post: http://webmonkeymagic.blogspot.com/2010/01/contribution-folders-same-same-but.html

It's important to note that they are virtual folders, so they may look like folders on your desktop but they work a bit differently. Also you are crazy to use them on a consumption website... lol I can say that because I worked on a site that did just that (it probably still does) and it made sense at the time but I wouldn't do it like that again.

I was recently asked in a series of emails to figure out how to display the user's folders as a site map. I tried valiantly to explain that a site map on a website is unrelated to contribution folders... they insisted they understood but wanted the solution anyway. Funny stuff.

Monday, 14 June 2010

Secrets of wcmFragment

The wcmFragment tag that came with SiteStudio10gR4 was a great new way to reference fragments. The big improvement with this tag is that the fragment no longer needs to leave any XML code in your pages. Here's an example of how to use it:
[!--$wcmFragment("myID","myContentId","myFragment",
     "mySnippet","myParameter=value")--]
However I've noticed a few documentation oddities regarding wcmFragment that were worth clarifying...

Wednesday, 9 June 2010

UCM 11g - out now!

Oracle finally released the new and improved UCM 11g! Yeah, I'm a bit slow on the announcement but that's because Australia was in bed last night when it was released. You can download it here but crikey, it's a big download! Looks like the WCM and just about everything else is bundled inside. Full documentation here.

From what I've seen there's no new killer features, all the work is under the hood. Faster checkins, better performance, login/logout authentication, integration with WebLogic. The downside is that all the performance improvements mean more grunt is needed from your hardware, but it hardly used much anyway.

I've already commented on the WCM improvements in my previous post but apparently the ability to drop SiteStudio editbale content into any non-SiteStudio website is a big ticket item (they're touting JDeveloper as their IDE of choice.) Also, DAM functionality is improved to better support flash objects, PSD files and selecting image renditions (previously renditions required a custom component to select them, I guess it's been rolled into the system.) The Desktop Integration Suite features are upgraded, good for users who rely on Contribution Folders.

Fortunately they've provided some info on how to upgrade from 10g so the question is, how long before we're all using 11g?

*** UPDATE: There does not appear to be a way to use UCM 11g without using WebLogic. This contradicts pre-release reports that said WebLogic was not compulsory. You should read this to understand it.

Monday, 24 May 2010

SiteStudio 11g preview

I've stumbled across the documentation for SiteStudio 11g on the Oracle website.

The documentation is more extensive than previous versions. It includes previously undocumented configuration flags, idoc script extensions and services, and custom element form APIs. Some nice gems in there.

It looks like the 10gR4 format for region definitions has become the standard, the 10gR3 and earlier versions are considered "legacy" format. Unfortunately 11g does not look like it will support other scripting languages, rumoured to include PHP, and the pre-existing support of ASP & JSP is still restricted to legacy sites.

In fact, it just looks like the very latest 10gR4 rebranded. But is this a good thing or bad thing? Content Server 11g will require WebLogic and other new infrastructure bits so maybe minimal tinkering to websites is a good idea for now. My favourite gripe, the LinkWizard has not been touched but at least the Contribution Window has dumped the tiny floppy disk icon for a big "Save" button.

The big change is the improved SSPU. Now called "Site Studio Publisher" it is a Content Server component and it can be accessed directly from the Content Server menus. It finally provides the ability to crawl and publish a specific page on demand, rather than the whole site - which contributors can do themselves, right from the page! It has a typical Content Server interface and can support specified custom querystrings in page URLs. It still supports post-crawl filters and post-publish triggers, but best of all, it appears to be compatible with 10gR3.

The SiteStudio documentation can be accessed here:
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e10615/toc.htm

Saturday, 20 February 2010

Comparing Dates and Time Zones

Date and time calculations are a bit tricky in UCM. Unlike regular numbers, dates and times cannot be calculated or compared to one another directly.

Comparing numbers is easy, consider this example:
<$if 6 gt 5$>
This code is always true!
<$endif$>
Dates and times cannot be compared this way unless they are converted to numbers, using toInteger(). Unfortunately there is no way to turn that number back into a date, so it's not too useful. A better way to manipulate timestamps without converting them is to simply "parse" them, using the parseDate() function.
<$myBirthday = "5/3/77"$>
<$if parseDate(myBirthday) gt parseDate("18/09/1970")$>
I was born after Hendrix died, on <$myBirthday$>!
<$endif$>
Parsing a date depends on the format of the timestamp. There are many different formats for timestamps so you'll need to figure out which ones are used by your UCM installation. The system locale decides how to format and recognise timestamps. For example, the UK locale uses dates in d/M/yy format, whereas the US locale is M/d/y. The system locale and timezone are chosen when UCM is first installed. Users can choose to use their own locale and change the way dates and languages are displayed just for them. UCM will recalculate timestamps and present the correct timezone for the user's locale whenever they look at a date, but continue to store dates according to the system locale. Any dates that are entered need to follow the (user) locale's recognised date formats, which may or may not include seconds, military hours and so on. The system locale can be changed on reboot using the SystemProperties utility; the user local is easily switched from the Content Server "My Profile" page.

Apart from simple date/time comparisions, UCM can also do a great job at converting a given timestamp to the current timezone, adding daylight saving as required for us. You will need to tell it what timezone you are converting from by manually adding the timezone and then explaining the format of the timestamp. Use zz to indicate a timezone code. For example, let's convert the new year's countdown in New York to my local time (Sydney) and see when they'll join in on our party.
<$parseDateWithPattern("1/1/11 America/New_York",
"d/M/y zz")$>
Unfortunately there doesn't seem to be a built-in way of converting the local timestamp to a specified timezone. I get around this by calculating the difference between a date in local time and the same date specified as another timezone, then adding that difference to my local time. For example, when we're doing the new year's countdown in Australia, how far behind will the UK be?
<$newYearUK = parseDate("1/1/2011")
+ toInteger(parseDate("1/1/2011"))
- toInteger(parseDateWithPattern("1/1/2011 Europe/London",
"d/M/yy zz"))$>
One of the quirks I've observed with handling date objects is that errors are not reported in the server output log. Your code simply keeps going like nothing happened! This makes problems difficult to trace and you'll get unexpected results. It's a good idea to print out your timestamps as you manipulate them so you can see where any problems are.

**** UPDATE ****
Alec Kloss sent me an email with the following tip:
"...you should be able to go to any Content Server generated page and append
&UserTimeZone=America/Chicago
to the end of the URL and... that will change the timezone of all displayed times accordingly."
Nice one!