1
blackrx
Using multilanguage tags in Mobile Version ?
  • 2013/3/17 15:08

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


I would to make a mobile version of my XOOPS site

It will be different from the Full Site Version

It will be more simple

so far i have made several html page like : About Us, Services, Etc

and it have its own design and i put it in XOOPs root


The problem is

i want to use multilingual tag in the mobile version ..i know i can use the language tags i if i use this custom page code


include("../mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");

$meta_keywords "";
$meta_description "";
$pagetitle "";

if(isset(
$xoTheme) && is_object($xoTheme)) {
    
$xoTheme->addMeta'meta''keywords'$meta_keywords);
    
$xoTheme->addMeta'meta''description'$meta_description);
} else {    
// Compatibility for old Xoops versions
    
$xoopsTpl->assign('xoops_meta_keywords'$meta_keywords);
    
$xoopsTpl->assign('xoops_meta_description'$meta_description);
}

$xoopsTpl->assign('xoops_pagetitle'$pagetitle);

//this will only work if your theme is using this smarty variables
$xoopsTpl->assign'xoops_showlblock'0); //set to 0 to hide left blocks
$xoopsTpl->assign'xoops_showrblock'0); //set to 0 to hide right blocks
$xoopsTpl->assign'xoops_showcblock'1); //set to 0 to hide center blocks
?>

html

include(XOOPS_ROOT_PATH."/footer.php");
?>



but if i use the custom page code above it will use my xoops theme design

i don't want the mobile site to have same theme with my full xoops site

how do i use my own design for the mobile website..

Full site - using my xoops theme
Mobile site - my own design without following the xoops theme






2
Mamba
Re: Using multilanguage tags in Mobile Version ?
  • 2013/3/17 15:38

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Would Defacer help with that?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
blackrx
Re: Using multilanguage tags in Mobile Version ?
  • 2013/3/18 9:41

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


TQ

i have converted my html page to xoops custom page php and i use the dummy module to put my page and rename the module as mymobile..multilanguage is working

I'm testing defacer in localhost ..i want to have two themes

I have set theme in General Preference to Theme A

and in defacer

in page manager i use this url http://localhost/new/modules/mymobile/index.php
in theme manager i set so the url above will use Theme B....

Save DEFACER setting

but when clear xoops cache and browser cookies

all pages and modules use Theme B

i only need modules/mymobile/ use theme B and the rest use theme A

Defacer version 1 (RC)
XOOPS 2.5.5
PHP 5.3.1
MYSQL 5.1.41

4
blackrx
Re: Using multilanguage tags in Mobile Version ?
  • 2013/3/18 13:36

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


nevermind: solved... Defacer is great..Thanks to Trabis

should just leave the URL as *

btw anyone who interested

im using this redirect mobile device to mobile website script from here
http://www.webdeveloper.com/forum/showthread.php?241503-After-Mobile-Redirect-View-Full-Site-link&p=1148741#post1148741

function is_mobile(){
    
$regex_match="/(nokia|iphone|android|motorola|^mot-|softbank|foma|docomo|kddi|up.browser|up.link|";
    
$regex_match.="htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|";
    
$regex_match.="blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|";    
    
$regex_match.="symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte-|longcos|pantech|gionee|^sie-|portalmmm|";
    
$regex_match.="jigs browser|hiptop|^ucweb|^benq|haier|^lct|operas*mobi|opera*mini|320x320|240x320|176x220";
    
$regex_match.=")/i";        
    return isset(
$_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']) or preg_match($regex_matchstrtolower($_SERVER['HTTP_USER_AGENT']));
}

switch(
$_GET['mode'])
    {
case 
'mobile':
    
$mode "mobile";
    break;
case 
'desktop':
    
$mode "desktop";
    break;
default:
    
$mode is_mobile() ? "mobile" "desktop";
    break;
    }

if (
$mode == "mobile")
    {
    
header ("Location: http://mobile.mainsite.com/");
    return;
    }
?>


and this to View Full site link
<a href="http://www.mainsite.com/?mode=desktop">Full Sitea>

Login

Who's Online

324 user(s) are online (202 user(s) are browsing Support Forums)


Members: 0


Guests: 324


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