Different Skin for mobile site version

alt=
@andrusito
8 years ago
302 posts
hi,

is this possible?:

devocionmusical.com > jrNova skin
m.devocionmusical.com > Mogul skin

As i want to display the m.devocionmusical.com url inside an app. The idea is to show a very different and most optimized version of the website in an app.

Another idea would be to have an exact copy of the website devocionmusical.com in a new folder, like this:

devocionmusical.com/app > Mogul skin

And display that url inside the app. But i think it have to be a clone, because all changes, new features and all new stuff have to be reflected in both installations.

Am i dreaming or is it possible?

Thanks!
updated by @andrusito: 12/01/16 07:01:24AM
nate
@nate
8 years ago
917 posts
Interesting question. I don't think it's possible, currently. I'll look into it tho.
michael
@michael
8 years ago
7,711 posts
Its possible, but there hasn't been a simple "turn it on" method released as a module.

Ideas on how to possible ways approach this problem:
1.) There is a template function jrCore_is_mobile_device() that checks to see whether the device viewing the page is a mobile device or not, you could use that to structure the page differently for mobile vs desktop browsers.

Docs: "{if jrCore_is_mobile_device()}{/if}"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/3191/if-jrcore-is-mobile-device-if

2.) install one version of jamroom into each of the URLs so they each get their own database, then find a way to use all of the tables from the main site on the secondary site EXCEPT for the 'settings' table, so it will have its own settings.

3.) create a module that detects which URL the page is being displayed on, then use the same concept as the "Admin Skin" module to switch the active skin depending on the URL. (This is probably the first way I would try to do it, it seams the simplest.)
alt=
@andrusito
8 years ago
302 posts
Thanks both

Would you help me with solution #3 @michael?
michael
@michael
8 years ago
7,711 posts
I can help with issues you encounter here in the forum but not to a degree where I build it and you copy+paste it into a module.

Look at how the Admin Skin module works and use that as a guide.
alt=
@andrusito
8 years ago
302 posts
I don't even know where to start Michael.

I didn't say you have to do it for me, I just wanted a kick start.

Thanks anyway bro.
michael
@michael
8 years ago
7,711 posts
The place to start if you've never built a module, but want to is the aparna module. It creates a basic module to start from.

Docs: "Aparna"
https://www.jamroom.net/the-jamroom-network/documentation/modules/853/aparna

It will actually create more than you want because it has output and you dont want that, but its a place to start.

--edit--
After that, read this:

Docs: "Creating a Module"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/26/creating-a-module
updated by @michael: 08/16/16 09:17:11PM
alt=
@andrusito
8 years ago
302 posts
Well, thanks. I've installed Aparna and Admin Skin modules.

I've also check the code from Admin Skin, but i can't understand the way it works.. i don't get the "concept"..

Seems pretty simple, but i don't know how to make Aparna do what i need, as i'm not a programmer nor developer. Thanks @michael.



Anyone else could help me?

THANKS!
alt=
@andrusito
8 years ago
302 posts
Anyone?
alt=
@andrusito
8 years ago
302 posts
@michael this is my situation:

DB1 is for devocionmusical.com (an old website with many modules, users and media content)
DB2 is for devocionmusical.com/app (a new empty website)

This is what I did:

a. I've created a exact copy of DB1 and name it 'DB3'.
b. Then I used DB3 when installing devocionmusical.com/app
c. I replaced the value in 'remote_site_url' from DB3 settings table to "http://devocionmusical.com/app"

The new empty website didn't work.

So, my question are:

1. The new JR installation must be an exact copy of the old JR? I mean, with all modules, etc...
2. What do I have to edit in the DB3 settings table to make the new JR installation work?

Sorry for the mess. Hope you understand what i did.

thanks
updated by @andrusito: 08/31/16 05:16:53AM
brian
@brian
8 years ago
10,145 posts
You need to update the data/config/config.php file and make sure it has the correct MySQL database name and settings.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@andrusito
8 years ago
302 posts
Yes, it has.

Note I installed JR with that database name, so the config.php file was created during the installation with that database name.

Also, I've checked it to be sure.

Tags