Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
1) I copy this module to module folder.
2) Add dependencies libraries and context module.
3) Download the latest library mobiledetect.net and copy it to sites/all/libraries/Mobile_Detect
4) I add
include DRUPAL_ROOT . '/sites/all/modules/context_mobile_detect/settings.inc'
in my settings.php
5) I switched On this module.
I have not seen the new context (Mobile Device & Mobile Device Type) in panel and anywhere :(
How I can hide my minipanel using this module?
Comment | File | Size | Author |
---|---|---|---|
#3 | how_this_module_works-2735107-3.patch | 837 bytes | sriharsha.uppuluri |
Comments
Comment #2
pvasili CreditAttribution: pvasili commentedFatal error: Call to undefined function module_exists() in ..\sites\all\modules\context_mobile_detect\context_mobile_detect.module on line 92
at /admin/modules :( :( :(
Comment #3
sriharsha.uppuluri CreditAttribution: sriharsha.uppuluri at Azri Solutions commentedmodule_exists is a core function. I have added the patch check it once
Comment #4
asPagurus CreditAttribution: asPagurus commentedI have the same problem
In block:
if (module_exists('libraries')) {
$library_path = '/' . libraries_get_path('Mobile_Detect');
}
else {
$library_path = MOBILE_DETECT_LIBRARY_PATH;
}
variable_set('context_mobile_detect_library_path', $library_path);
first blank screen I've got in "module_exists('libraries')"
second (if I commented that) - in variable_set - when drupal try to db_merge
I have thoughts about it but I haven't enough expierence for this.
Than I commented all that block and place only
$library_path = MOBILE_DETECT_LIBRARY_PATH;
instead.
All is working.
Yes, Mobile_Detect library I place to standart folder. But it gives the oportunity of module working.
UPDATE: Sorry. All of this I need to get context in panels with https://www.drupal.org/project/context_mobile_detect/issues/1798112#comm...
And after my changes context in panels works. But in blocks I don't see context tab
Context UI works. Though in Administration/Structure/Context I can configure needed conditions and reactions
Comment #5
apaderno