Mobile Device Detection
This is an open discussion with 84 replies, filed under Extensions.
Search
cheers :) glad it solved part of the issue. Hopefully there's not too much to fix with the preference page.
Ok,
one step away of a 100% working extension.
The li
elemt should be inserted into the input field on click, which works up to sym2.4 and I don't know where in the api to look for what could have changed:
// Redirect Devices: $label = Widget::Label(__('Redirect Devices')); $label->appendChild(Widget::Input( 'settings[' . self::CONF . '][' . self::CONF_DEVICES . ']', General::Sanitize( $conf->get(self::CONF_DEVICES, self::CONF) ) )); $group->appendChild($label); $list = new XMLElement('ul'); $list->setAttribute('class', 'tags'); foreach (MobileDetector::devices() as $type => $device) { $item = new XMLElement('li', $type); $list->appendChild($item); } $group->appendChild($list);
Also I had to use the infinit loop fix described in an earlier post as the current/newer code hasn't worked. Everything else seems to work now...
Have to create a git account and do a pull request as soon as it's all done!
$list->setAttribute('data-interactive', 'data-interactive');
That should do it :)
Thank you! :)
Create an account or sign in to comment.
I have to withdraw my last comment!
Replacing
grab
withexecute
solves the datasource problem. There are still minor issues at the preference page but I'll get that sortet out. Thanks!