It depends on what you want to do with it, but after taking a quick look at it, it looks like you can create a fairly simple snippet that just includes the class file. I think you may have to import the TW database file into the MODx DB first.
Create a new snippet and name it TerraWurfl. Then put the following snippet call in any document:
When you visit that page it should print a message about the user agent.
Put this code in the snippet:
<?php
//TerraWurfl demo snippet
include "path_to_terra_wurfl_class_file";
$myDevice = new tera_wurfl();
$myDevice->getDeviceCapabilitiesFromAgent($_SERVER['HTTP_USER_AGENT');
// see if this device is really a mobile browser
if($myDevice->browser_is_wap){
// check capabilities
if($myDevice->capabilities['downloadfun']['downloadfun_support']){
echo "downloadfun supported<br />";
}else{
echo "WAP is supported, downloadfun is not<br />";
}
if($myDevice->device_image != ''){
// display device image
echo '<img src="'.$myDevice->device_image.'" /><br />';
}
}
?>
Later, after you have this all working, you might want to move the code to a plugin and have it alter the page output depending on the device, but that’s generally not a job for beginners to MODx and CMS programming.