solved i need a new module (user agents)

alt=
@hamadqr
6 years ago
28 posts
hi JR's developers.
I need a help with a new module (user agents)
This module helping us to know if the user using the mobile , the module going to tell the site to use the template for mobiles, or if the user using the PC he get by default the template for the PC users.
I hope you can understand it.
example:
if user_agents is {sw_for_android} use sw_mobile_template>


--
Kind regards, Hamad.

updated by @hamadqr: 02/04/19 05:11:22AM
paul
@paul
6 years ago
4,330 posts
There are functions you can use in your templates to do this already - The are jrCore_is_mobile_device() and jrCore_is_tablet_device()

For instance -

{if jrCore_is_mobile_device()}
    Template code for mobile devices here
{else}
    Template code for other devices here
{/if}

hth


--
Paul Asher - JR Developer and System Import Specialist
alt=
@hamadqr
6 years ago
28 posts
hi paul, I know these functions,
but i need custom user agent like this:
{if jrCore_is_shareworld_for_android()}
Template code for share world here
{else}


--
Kind regards, Hamad.
paul
@paul
6 years ago
4,330 posts
I don't know what 'shareworld_for_android' is or what parameters might be received when it is accessing a Jamroom site.
Do you have any 'technical/programming' information on it?


--
Paul Asher - JR Developer and System Import Specialist
brian
@brian
6 years ago
10,148 posts
hamadqr:
hi paul, I know these functions,
but i need custom user agent like this:
{if jrCore_is_shareworld_for_android()}
Template code for share world here
{else}

This would be a custom template function that would need to be part of a custom module you create:

https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide

You will want to go over that to see how to create your own custom module with custom smarty template functions.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags