Page 1 of 1

Best way to change the default properties of 'generic'

PostPosted: Tue Apr 26, 2011 11:35 am
by marcguay
Hi,

I'm working with a test server that does not have the user agent variable set, so when testing sites here, I'm stuck with the properties of the 'generic' device, which are set to 90px screen width, xhtml_support_level of 1, etc. What would be the best long-term solution to changing these to properties that more accurately match our "generic" mobile device? I'm looking into creating a patch file that looks something like this:

Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<wurfl_patch>
   <devices>
      <device user_agent="" fall_back="root" id="generic">
         <group id="display">
            <capability name="max_image_width" value="320"/>
         <capability name="resolution_width" value="320"/>
         </group>
      </device>
   </devices>
</wurfl_patch>

Re: Best way to change the default properties of 'generic'

PostPosted: Thu Apr 28, 2011 7:14 pm
by kamermans
This patch file should work just fine. I would give it a name like generic_override.xml and add it to the patch file directive in your TeraWurflConfig.php, then reload the WURFL and your device will be overridden.

Re: Best way to change the default properties of 'generic'

PostPosted: Fri Apr 29, 2011 9:20 am
by marcguay
Thanks again Steve.