Welcome, Guest
Username Password: Remember me

How to check if mobile joomla is working for jomsocial template
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: How to check if mobile joomla is working for jomsocial template

How to check if mobile joomla is working for jomsocial template 14 years, 3 months ago #83

  • alterna
  • OFFLINE
  • Fresh Boarder
  • Posts: 16
  • Karma: 0
Could you tell me how to check if mobile joomla is active using the bot ?

Jomsocial is able to check whether the user agent is iphone to switch template but this is not good

I would prefer it to check if mobile joomla is active in order to switch to iphone template

Any idea how to get this ?

For now the test of jomsocial is:
if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod'))

I would like to change this for a test of mobilejoomla activated but did not get the right function through the mobilebot

with the old pdabot, that was easy, just checking if it was false or true

How to check if mobile joomla is working for jomsocial template 14 years, 3 months ago #1097

You could load Safari as your browser. The Developer Menu has the option to change to different USER AGENTS, and you can also edit C:Program FilesSafariSafari.resourcesUserAgents.plist to add User agents. I know this is possible on a mac but I do not know the location of the useragent file. This is how I developer my iPhone Web Apps and it works well.

How to check if mobile joomla is working for jomsocial template 14 years, 3 months ago #1104

  • alterna
  • OFFLINE
  • Fresh Boarder
  • Posts: 16
  • Karma: 0
Well of course I know how to use safari with the developper menu

My question was: what kind of test could I make in PHP in order to check that mobile bot is active in the page that is loaded ! in order for jomsocial to activate its iphone template automatically if the mobile bot has detected a mobile user !

for now the test is : if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod'))
which is not good as it stops iphone users to switch the the regular template, so I try to find a solution to change this test in order to include mobile bot checking

How to check if mobile joomla is working for jomsocial template 14 years, 3 months ago #1106

I guess I totally missed your question and don't understand what you are trying to do. C'est la vie.

How to check if mobile joomla is working for jomsocial template 14 years, 3 months ago #1107

  • alterna
  • OFFLINE
  • Fresh Boarder
  • Posts: 16
  • Karma: 0
ok sorry, let me try in my poor french

Jomsocial has an inside php test to check if the useragent is an iphone/ipod and I want to change this php test to something testing if mobilejoomla has switched the user to a mobile template instead of the regular template.

this way jomsocial would run the iphone template ONLY if mobile joomla is active with a mobile template, if not, jomsocial would use the regular template

is this better formulated ?

How to check if mobile joomla is working for jomsocial template 14 years, 3 months ago #1108

Ah I think I see it now.
so if user on mobile switched to regular, then joomsocial should show regular as well?
I do not know enough about Joomla and its components to help you. I am having a ton of fun testing this mobile template and getting my site up and running and ironing out the bugs. Good luck.

Re: How to check if mobile joomla is working for jomsocial template 12 years, 10 months ago #4577

  • grvulture
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
You need to replace the JomSocial condition with:
 
if (defined('_MJ'))


This way, JomSocial will only change when MobileJoomla is active.

  • Page:
  • 1
Time to create page: 0.12 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.