Elxis CMS Forum

Support => General => Topic started by: sophocles on December 20, 2011, 13:11:43

Title: Content for mobile devices
Post by: sophocles on December 20, 2011, 13:11:43
Hi,

I have been making some tests in order to be able to have a different user interface when someone connects through a mobile device.
The only topics that had some early discussions on the matter are:
https://forum.elxis.org/index.php?topic=4151.0 (https://forum.elxis.org/index.php?topic=4151.0) and https://forum.elxis.org/index.php?topic=6477.0 (https://forum.elxis.org/index.php?topic=6477.0), but these discussions seems that they didn't reach any point.

Redirection works fine - script recognizes the mobile devices (this has been tested through opera mobile emulator and safari using the User Agent) when you redirect to another sub-domain, where the real issue there is how to extract data from the database of elxis, since there are real security issues as i presume., as well as when you redirect to the same domain. (After trying dozens of scripts, the only one working fine was the one at http://detectmobilebrowsers.mobi/ (http://detectmobilebrowsers.mobi/))

The real issue though is that i didn't manage to succeed the last step of redirection within the same domain, in a mobile.php file in the active template folder, or even to redirect it in another template within the same domain.

In both cases, I always get the message that "Direct access t this location is not allowed". (the same message also comes when i try to retrieve data from the sub-domain, using the "elxLoadModule" within a php tag).

How can i prevent this message from coming up?

Are there any general guidelines?

Thanks.
 

 
Title: Re: Content for mobile devices
Post by: datahell on December 20, 2011, 13:36:12
You must first load Elxis in that php file before trying to load a module or any other elxis file.
Title: Re: Content for mobile devices
Post by: sophocles on December 20, 2011, 13:56:53
How do i achieve that? Didn't find any topic.
Title: Re: Content for mobile devices
Post by: datahell on December 20, 2011, 18:59:43
Elxis is normally loaded in index.php and index2.php. To load it in an other file requires to do something like what is inside the index2.php file, but not exactly.
If it is not absolutely necessary don't do it, it requires skills and some advanced knowledge of elxis cms in order to do it properly and safe.
Examples on how elxis is loaded in a third file can be seen in this folder: administrator/popups/ but for the admin area, loading elxis for frontend is not the same! Also the code differs depending on what we want to do.
Title: Re: Content for mobile devices
Post by: sophocles on December 20, 2011, 19:22:23
OK. Now you've got me. I have minimum skills, so i will not try to use the redirection in a page in the same domain/template.

How about loading elxis content in a sub-domain tha will have jquery mobile as the basic interface?
I have managed to load categories and titles of the content, but i'm trying to load the content itself and i find it a bit tricky.
Does this require advanced skills also, or it could be done with minima php/mysql knowledge?

Also, Nautilus will include components like joomla mobile or the preferable jquery mobile? It will be worth waiting for, before diving into deep black waters  :-\