Any ideas when you think this will be ported to d7? Can't wait to start using d7 for mobile :)

Comments

devildogmrk’s picture

Issue tags: -#D7 +Admin Module, +drupal 7, +Mobile Module

I too am awaiting a Drupal 7 version of this module. Mobile Tools claims it has a D7 verson but does not seem to work without this module. So is there an expected date for a D7 version of this component?

Duck Whistle’s picture

subscribed
This link may help. I'm going to give it a try.
http://fangel.github.com/mobile-detection-varnish-drupal/

danielm’s picture

subscribe

tharpa.osang’s picture

subscribe

mraichelson’s picture

subscribe

Argus’s picture

subscribe

hendrakieran’s picture

+1

mgifford’s picture

Has anyone tried running this through the coder module? I haven't looked to see how big/complicated the code base is.

http://drupal.org/project/browscap & http://drupal.org/project/mobile_tools have a D7 versions.

johnalbin’s picture

WURFL seems to be a really powerful tool.

If we can leverage the context this library provides, it will simplify Drupal's ability to provide performant experiences for all users on any device.

i.e. subscribe

chiebert’s picture

+1 on the port to D7

rich.yumul’s picture

StatusFileSize
new7.32 KB

Here's an initial patch for a D7 version.

There wasn't too much to it other than fixing some theming issues and switching it to use drupal_set_message versus a theming layer callback.

I also added a check in the wurfl_boot() hook implementation to bump up the PHP's max_execution_time when it initially builds the cache.

HTH!
Rich

erynn’s picture

StatusFileSize
new22.49 KB

Here is the next patch. I ran this though coder and got most of the errors. The ones that are left are minor except in wurfl.admin.inc and they are about variables not being fully sanitized. Some of the minor errors I believe are being caused by a bug in coder (they deal with spacing issues).
I did these fixes after applying the patch above to the master git version.

erynn’s picture

Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new21.29 KB

Here is a better patch. My last one had a couple of mistakes as I got a bit too excited with coder and changed something I shouldn't have. Anyway, I have Wurfl up and running for a local install of D7. The Wurfl test page shows browser switching when I change my user agent to IPhone and my pages switch when I change the user agent using the firefox addon. Make sure you install the lastest WURFL api and have it installed properly or you will get an error stating that requesthttpdevice is calling on a non object and stuff along those lines.

johnalbin’s picture

oh, you guys sneaked some patches into this queue. Awesome!

I should have posted this a bit earlier, but I didn't have any working code at the time.

I have a proposal to replace the existing WURFL API that this module uses with an updated API that was just relicensed to be GPL-compatible this week.

#1183246: Replace WURFL PHP API with database-edition WURFL API

If we went forward with that proposal, then I'd need to merge my work with the WURFL module and your patches. :-)

mgifford’s picture

I like the idea of the database version a lot! Hopefully that addresses some of the performance issues.

joekrukosky’s picture

subscribe

rich.yumul’s picture

Very cool. The way it makes it's own file-based hash always made me wonder about that. Ping me if I can help out.

johnalbin’s picture

Version: 6.x-1.0 » 6.x-1.x-dev

Tom, the maintainer, has asked if I'd like to be co-maintainer of this module #1183246: Replace WURFL PHP API with database-edition WURFL API. I've haven't gotten the privileges yet, but assuming I do, here's the plan.

I'm interested in redoing the module using a different API and I'm not sure how long it will take me to complete. But I don't want to leave all of you in the lurch.

How about I work in the 7.x-2.x branch on my re-working of the API and we commit these patches to a new 7.x-1.x branch? That way you can get a D7 version of the module sooner without having to wait on me. Sound good?

In the mean time, I've committed the above patches to my sandbox: http://drupal.org/sandbox/johnalbin/1168218 I haven't tested the work though, so I can't confirm it works. :-)

johnalbin’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

As soon as drupal.org's packaging scripts finish running (they run every 12 hours), we'll have a shiny new 7.x-1.x-dev release of WURFL available.

Just to reiterate, I have NOT tested the release. I'm relying on everyone in this issue to test and provide patches for it. I won't be actively working on this branch, but I will gladly commit any work you contribute. :-)

mgifford’s picture

Thanks John. So you'll be working on the 7.x-2.x-dev release that is all DB oriented, right?

gmak’s picture

Category: feature » bug

I've just installed 7.x-1.x-dev and it is throwing PHP syntax errors on lines 21, 41 and 46 (or thereabout).

These are all related to drupal_set_message commands like:

drupal_set_message( t('The WURFL configuration file (wurfl-config.xml) cannot be found in !library/resources. Read the INSTALL.txt file for instructions.', array('!library' => $library), 'error');

If you count the open and close parentheses in the above you'll see that there are 3 'open', but only 2 'closed'. So, I thought that adding a 'closed' parenthesis would do the trick, but that's not it (or it goes somewhere I'm missing).

The only way I could see to get things working was to use:

drupal_set_message( t('The WURFL configuration file (wurfl-config.xml) cannot be found in $library/resources. Read the INSTALL.txt file for instructions.'), 'error');

gmak’s picture

Actually, it does work to add the ")" to the end. I missed one. So, the lines should be:

line 21:
drupal_set_message(t('The WURFL library is successfully installed in !library', array('!library' => $library)));

line 41:
drupal_set_message( t('The WURFL configuration file (wurfl-config.xml) cannot be found in !library/resources. Read the INSTALL.txt file for instructions.', array('!library' => $library), 'error'));

line 45:
drupal_set_message(t('The WURFL library is successfully installed in !library/resources/wurfl-config.xml', array('!library' => $library)));

I think that's all of them.

rwohleb’s picture

subscribe

rwohleb’s picture

I'm not seeing a D7 dev build. Are people just pulling from the git branch for testing at the moment?

spacereactor’s picture

#24 see http://drupal.org/node/432696/release there is wurfl 7.x-2.x-dev

johnalbin’s picture

I've updated the project page so that it includes the 7.x-1.x-dev release in the downloads list.

I've also committed gmak's changes in #22. So, hopefully, no more PHP parse errors when the 7.x-1.x-dev is re-rolled sometime in the next 12 hours.

johnalbin’s picture

Don't use the 7.x-2.x-dev branch! It's doesn't work yet.

Argus’s picture

Title: Drupal 7 Version » WURFL Drupal 7 Version

lucor’s picture

Version: 7.x-1.x-dev » 7.x-3.x-dev
Assigned: Unassigned » lucor
Issue summary: View changes
Status: Needs review » Closed (fixed)

The version 7.x-3.0-alpha1 has been released.