Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

MetaMod for Mobile Device + Logged In/Out + PC/Laptop

MetaMod for Mobile Device + Logged In/Out + PC/Laptop

Joomla 1.5.22
MetaMod 2.6 (Free)
Everything is working.

Searched combination of keywords and was hard to find a related topic. Probably nobody asked this before.

My goal is to know recipe is for (MetaMod):

Show A, if user is logged out and using a Mobile Device.
Show B, if user is logged out and using Desktop/Laptop.

Show C, if user is logged in and using a Mobile Device.
Show D, if user is logged in and using Desktop/Laptop.

Same for IE and Firefox too.

------------------------------------------------------
Code I am using is:

if ( MM_NOT_LOGGED_IN and $core_genius->check( "browser_type = IE" ) ) return 129;
else return 99;
if ( MM_LOGGED_IN and $core_genius->check( "browser_type = IE" ) ) return 129;
else return 126;

Aabaas
Guest
useravatar
Offline
Administrator has disabled public posting

Re: MetaMod for Mobile Device + Logged In/Out + PC/Laptop

Bearing in mind that JomGenius does not have full mobile device detection (just android, ipad, iphone, ipod), I think I'd structure it like this:

$is_mobile = $core_genius->check( "browser_type = ipod, iphone, ipad, android" );
$is_ie = $core_genius->check( "browser_type = ie" );
$is_ff = $core_genius->check( "browser_type = firefox" );

if ( MM_NOT_LOGGED_IN ) {
  if ( $is_mobile ) return AAA;
  if ( $is_ie ) return BBB;
  if ( $is_ff ) return CCC;
  return DDD; // any other device, for non-logged in (incl googlebot etc)
}
// from here on we know they are logged in:
if ( $is_mobile ) return EEE;
if ( $is_ie ) return FFF;
if ( $is_ff ) return GGG;
return HHH; // any other device, for logged-in users


Replace AAA-HHH with the relevant module ids that you want to use for those devices.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Re: MetaMod for Mobile Device + Logged In/Out + PC/Laptop

Thank you!

Wow! This is one of the coolest modules for Joomla! And it is in my favorites list!

I will certainly update the module to pro for more features soon.

Great job, Stephen.

Aabaas
Guest
useravatar
Offline
Administrator has disabled public posting

Re: MetaMod for Mobile Device + Logged In/Out + PC/Laptop

That's why I like being able to configure MetaMod in PHP: it's relatively easy to structure any sort of rules like this and combine different conditions alone or in combination with others.

smile

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1685
Total Polls:
6
Total Posts:
5912
Total Posts Today:
4
User Info:
 
Total Users:
11504
Newest User:
toko solo
Members Online:
0
Guests Online:
70

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked