Loading

Author Topic: osc-mobile plugin  (Read 1780 times)

garciademarina

  • Administrator
  • Sr. Member
  • *****
  • Posts: 330
    • OSClass
    • Email
Re: osc-mobile plugin
« Reply #30 on: January 16, 2012, 01:50:19 pm »
@RajaSekar, you have show_switch(); function, by default switch link only is visible when client is a mobile device, do you want a switch link always ?
Carlos García de Marina
carlos@osclass.org
Twitter: @osclass
http://www.osclass.org/

OSClass - Open Source Classifieds

RajaSekar

  • Hero Member
  • *****
  • Posts: 613
    • Email
Re: osc-mobile plugin
« Reply #31 on: January 16, 2012, 02:17:02 pm »

@garciademarina

yes i want to  show a switch link always

garciademarina

  • Administrator
  • Sr. Member
  • *****
  • Posts: 330
    • OSClass
    • Email
Re: osc-mobile plugin
« Reply #32 on: January 16, 2012, 03:15:27 pm »
Hi @RajaSekar,
You need to modify the plugin:

 modify this lines:

ROOT/index.php
 
l.46 aprox.
Cookie::newInstance()->pop('osc-mobile-desktop', 'mobile') ; // remove
Cookie::newInstance()->push('osc-mobile-desktop', 'mobile') ; // add
Cookie::newInstance()->set() ;
...

l.61 aprox.
if ( $userAgent->is_mobile() && $desktopVersion != 'desktop') {  // remove
if ( $userAgent->is_mobile() && $desktopVersion != 'desktop' || $desktopVersion == 'mobile' ) { // add
....

 adding this function:

  function show_switch_always()
  {
            $url = osc_base_url(true).'?desktop=mobile';
            echo '<a href="'.$url.'" data-role="none" class="ui-link">'. __('Switch to Mobile version','mobile').'</a>';     
  }


then add the call function where you want usually at footer.php.

Regards.
Carlos García de Marina
carlos@osclass.org
Twitter: @osclass
http://www.osclass.org/

OSClass - Open Source Classifieds

RajaSekar

  • Hero Member
  • *****
  • Posts: 613
    • Email
Re: osc-mobile plugin
« Reply #33 on: January 16, 2012, 05:34:21 pm »

@garciademarina

Thanks for your code but it's not working it shows blank page after clicking link on desktop version

aduganda.info

  • Jr. Member
  • **
  • Posts: 92
  • aduganda.info
    • FREELANCE MEDIA Business Directory| Domain Registration| Website Designing| Web-Hosting
    • Email
Re: osc-mobile plugin
« Reply #34 on: January 16, 2012, 07:12:45 pm »
where exactly coz in the index.php there are no such lines
Visit my Website and see the wonders of OSCLASS:
http://aduganda.info

garciademarina

  • Administrator
  • Sr. Member
  • *****
  • Posts: 330
    • OSClass
    • Email
Re: osc-mobile plugin
« Reply #35 on: January 16, 2012, 07:24:59 pm »
Carlos García de Marina
carlos@osclass.org
Twitter: @osclass
http://www.osclass.org/

OSClass - Open Source Classifieds

RajaSekar

  • Hero Member
  • *****
  • Posts: 613
    • Email
Re: osc-mobile plugin
« Reply #36 on: January 17, 2012, 09:19:55 pm »

@garciademarina

here is my index.php

is there anything i messed up?

check my index.php

garciademarina

  • Administrator
  • Sr. Member
  • *****
  • Posts: 330
    • OSClass
    • Email
Re: osc-mobile plugin
« Reply #37 on: January 18, 2012, 12:19:18 pm »
Hi @RajaSekar, I can switch without problems, I'm using osclass 2.3.5 and modern theme.

What theme are you using ?

Can you check your error_log ? maybe we can clarify something. ( Debug PHP errors )

Regards


Carlos García de Marina
carlos@osclass.org
Twitter: @osclass
http://www.osclass.org/

OSClass - Open Source Classifieds

RajaSekar

  • Hero Member
  • *****
  • Posts: 613
    • Email
Re: osc-mobile plugin
« Reply #38 on: January 18, 2012, 09:08:17 pm »

thanks

I'm using OSClass 2.2.3 and modern theme.

i will try in newer version

Alexandr

  • Newbie
  • *
  • Posts: 49
Re: osc-mobile plugin
« Reply #39 on: January 26, 2012, 04:33:26 pm »
Hi
Russian translation.

garciademarina

  • Administrator
  • Sr. Member
  • *****
  • Posts: 330
    • OSClass
    • Email
Re: osc-mobile plugin
« Reply #40 on: January 26, 2012, 07:57:23 pm »
Hi @Alexandr,

Thanks for the translation, I will upload the translation to our backoffice translator tool and update the plugin with russian language.

Regards
Carlos García de Marina
carlos@osclass.org
Twitter: @osclass
http://www.osclass.org/

OSClass - Open Source Classifieds

BuySellAndSwap

  • Full Member
  • ***
  • Posts: 229
    • Buy Sell And Swap For Free
    • Email
Re: osc-mobile plugin
« Reply #41 on: January 28, 2012, 12:56:47 am »
Hi

when i goto my website www.BuySellAndSwap.co.uk on my iPhone 4s it just shows a blank page... i have not modified anything please can anyone help?

Thank you
Get a domain name at great price at www.owna.eu
I highly reccomend osclass, I use it for my sites:
www.buysellandswap.co.uk www.hunt4it.co.uk www.sellrent.co.uk

tej33

  • Newbie
  • *
  • Posts: 5
  • Tej
    • Adviteernu Netherland
    • Email
Re: osc-mobile plugin
« Reply #42 on: January 28, 2012, 11:51:51 pm »
I have same prob with my site www.adviteernu.nl when I try on my smart phone. I haven't any changes as well..


simplewebconsult

  • Premium
  • Newbie
  • *****
  • Posts: 25
Re: osc-mobile plugin
« Reply #43 on: January 29, 2012, 12:29:02 am »
I try it a friend iphone and it did the same thing. Went a blank page. I had him refresh and everything started working fine.

But this might not be good for a new visitor looking for information, and its blank.

garciademarina

  • Administrator
  • Sr. Member
  • *****
  • Posts: 330
    • OSClass
    • Email
Re: osc-mobile plugin
« Reply #44 on: January 30, 2012, 11:38:44 am »
Hi, @tej33, @hunt4it, @simplewebconsult, I think there is some problem with another component, in my installation I don't have this problems.
Please anyone can activate the php debug and database debug, for try to clarify the issue?

Can follow this instructions: http://wiki.osclass.org/Debug_PHP_errors & http://wiki.osclass.org/Debug_SQL_queries

thanks
Carlos García de Marina
carlos@osclass.org
Twitter: @osclass
http://www.osclass.org/

OSClass - Open Source Classifieds