31
timgno
Re: Talk of JQuery Mobile Framework For Xoops
  • 2013/3/14 20:21

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


Quote:
but when i set the theme to mtheme both smartphone browser emulator and normal pc display mtheme


It is normal, because you set this theme in admin/preferences

Quote:
In mainfile i use this

use this
if($mobile == 1)
header('Location: http://localhost/xoops255/');

Quote:
1. How do we setup our mobile site so when we use our mobile we will be redirected to mtheme and when we use normal PC we are redirected to our normal theme.


it is necessary that you fill also serves to redirect

https://xoops.org/modules/newbb/viewtopic.php?post_id=350064#forumpost350064


Quote:
how to setup the mobile site example here http://mobile.txmodxoops.org/
do we need to install another xoops? and set the theme to mtheme?


you have to create another script that can do both, with xoops 2.6.0 you will not have these problems

Quote:
2. Is it possible when in mobile, a link to display the full site (normal theme) is displayed


not now with this version

I suggest you try locally with two different installations of xoops 2.5.5

32
irmtfan
Re: Talk of JQuery Mobile Framework For Xoops
  • 2013/3/15 2:53

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


@timgno:
I think you can use preloads to redirect mobile users.
It would be better than hacking mainfile.php

use eventCoreIncludeCommonStart like this:
function eventCoreIncludeCommonStart($args)
    {
 if(
$mobile == 1) {
// add your header
}

    }



33
blackrx
Re: Talk of JQuery Mobile Framework For Xoops
  • 2013/3/18 13:42

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


@timgno

Thank you for the answer but i have decided to use another method to build a mobile version of my xoops site

https://xoops.org/modules/newbb/viewtopic.php?post_id=352322

i don't want all modules to be display in my mobile website
so what i did was to make custom php page ..will display only important info and some news title and summary (query db from news module etc)

i also made a custom mobile theme and use defacer to redirect theme for desktop/mobile

I got my redirect and View Full Site Link script here


34
timgno
Re: Talk of JQuery Mobile Framework For Xoops
  • 2013/3/18 14:36

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


@irmtfan
Thanks for the tip to your method I find it useful

@blackrx
I think at this point we should wait for the arrival of xoops 2.6.0, because to create a framework in jquery mobile is not a short time. The problem is that you have to go find all the html tags, and not just because there are ids and classes for these tags.

To replace them I using three basic functions in jquery: ReplaceWith, ReplaceAll and html, as you can see from the documentation of jquery. The scripts I have tested and worked fine, but when I inserted the modules, starting from the contact module, the script does not work anymore because we probably are not static pages and this may affect, but I'm not sure.

I hope that with bootstrap included in xoops 2.6.0 we can agglomerating also a framework with jquery mobile in a simpler way.

The biggest problem is that I did not have time to go into that, as you can see on my website, redirection works with that code I posted, but framenwork does not work as it should.

If anyone has any ideas can send them here if you like.

Login

Who's Online

213 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 213


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits