function mobile_tools_block_message in Mobile Tools 6
Same name and namespace in other branches
- 6.3 mobile_tools.module \mobile_tools_block_message()
- 7.3 mobile_tools.module \mobile_tools_block_message()
- 7.2 mobile_tools.module \mobile_tools_block_message()
Helper function returning the configurable message for the notification
1 call to mobile_tools_block_message()
- mobile_tools_block in ./
mobile_tools.module - Implementation of hook_block() Provides the blocks that can be used to show a message to the user to go to the mobile or desktop version.
File
- ./
mobile_tools.module, line 111 - Mobile Tools provides a range of functionality assisting in creating a mobile Drupal site . this functionality contains:
Code
function mobile_tools_block_message() {
$device = mobile_tools_get_device();
$site = mobile_tools_is_mobile_site();
if (variable_get('mobile_tools_mobile_url', '') != variable_get('mobile_tools_desktop_url', '')) {
if ($site == 'mobile') {
return variable_get('mobile_notification', MOBILE_NOTIFICATION);
}
else {
return variable_get('desktop_notification', DESKTOP_NOTIFICATION);
}
}
else {
if ($device['type'] == 'mobile') {
return variable_get('mobile_notification', MOBILE_NOTIFICATION);
}
else {
return variable_get('desktop_notification', DESKTOP_NOTIFICATION);
}
}
}