Sunday, 17 January 2016
  7 Replies
  1.2K Visits
0
Votes
Undo
I would like to keep smartphone mode on, but I would not like it to be activated for tablets because month cell mode will not show with it on, on tablets. So I want smartphone mode to just show on phones or anything under 600px in width, if that easier. How can I do this? I've exhausted trying. Thanks!
9 years ago
·
#163386
0
Votes
Undo
Hello,

The cell mode does show it just depends on how you use your tablet. Assuming you are talking about an iPad you need to click and hold to view the box. It's the way Apple handles 'tooltips'.

We use the Joomla! isMobile method to determine if on a smart device.

You can hack the core.. in:

/components/com_jevents/jevents.php

See:


$isMobile = $browser->isMobile();
// Joomla isMobile method doesn't identify all android phones
if (!$isMobile && isset($_SERVER['HTTP_USER_AGENT']))
{
if (stripos($_SERVER['HTTP_USER_AGENT'], 'android') > 0 || stripos($_SERVER['HTTP_USER_AGENT'], 'blackberry') > 0)
{
$isMobile = true;
}
else if (stripos($_SERVER['HTTP_USER_AGENT'], 'iphone') > 0 || stripos($_SERVER['HTTP_USER_AGENT'], 'ipod') > 0)
{
$isMobile = true;
}
}


You can then use a force to isMobile = false on detection of an iPad for instance.

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

9 years ago
·
#163387
0
Votes
Undo
Thanks for the reply! Unfortunately that breaks the program on mobile. I only want it to NOT use smartphone mode for android TABLETS. It can use smartphone mode for android PHONES. In that case, what would I edit to accomplish this?
9 years ago
·
#163388
0
Votes
Undo
Hello,

As stated you can configure it for ipad only. But this is a hack.

I would personally suggest looking at the responsive design layouts like flatplus you can then use custom media queries then to adjust it as needed.

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

9 years ago
·
#163389
0
Votes
Undo
I have to use extplus though which is responsive but on a smartphone, all the events disappear. Could you use this code instead so it can identify tablets? The problem with the code in jevents now is there are hundreds of millions of android tablets out there and your calendar thinks they are all a smartphone. http://mobiledetect.net/ is what I saw that could fix that. Thanks!
9 years ago
·
#163390
0
Votes
Undo
Google really messed up with Android by not insisting devices/browser tell the server what they are in a consistent manner.

I was looking at this issue last week and have come up with an alternative approach. I'll be releasing the latest version of JEvents and the club layouts tomorrow so you can see it in action.

Basically what is will do is for iphones, ipods and android devices the iconic layout would use a list view instead of the normal calendar view. i.e. it would look a bit like http://www.jeventsdemo.net/date-range on these devices instead of the monthly tabular calendar

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

9 years ago
·
#163391
0
Votes
Undo
Yeah they've made it harder than it has to be. Here is something i Just tried that worked for my situation. I'm no coder and I was just playing around with it, but I got the ipad and android tablet to show the month cell view and the phones to show the list view:

if (!$isMobile && isset($_SERVER['HTTP_USER_AGENT']))
{
if (stripos($_SERVER['HTTP_USER_AGENT'], 'android') > 0 && stripos($_SERVER['HTTP_USER_AGENT'], 'mobile') > 0)
{
$isMobile = true;
}
else if (stripos($_SERVER['HTTP_USER_AGENT'], 'iphone') > 0 || stripos($_SERVER['HTTP_USER_AGENT'], 'ipod') > 0)
{
$isMobile = true;
}
}


I don't know if this works across the board but it SEEMED to work for me right this moment.
9 years ago
·
#163392
0
Votes
Undo
Thank you for sharing!!
  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.