Thread: Westminster New

Results 1 to 10 of 1865

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,303
    Plugin Contributions
    1

    Default Re: Westminster New

    Out of the two I've decided to go with this template, the home page slider better suits my needs.

    I've noticed in the readme for both templates that - includes/init_includes/config.display_mode.php - is stated to be in the package, although it's not.

    No doubt a typo.

    Thank you for providing this template Anne, I'm implementing it in a heavily modded and customised site, it'll be a challenge but is seriously needed as 40% of this sites' traffic is mobile/tablet based, as no doubt is the case of most sites these days.

  2. #2
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,928
    Plugin Contributions
    45

    Default Re: Westminster New

    Quote Originally Posted by simon1066 View Post
    Out of the two I've decided to go with this template, the home page slider better suits my needs.

    I've noticed in the readme for both templates that - includes/init_includes/config.display_mode.php - is stated to be in the package, although it's not.

    No doubt a typo.

    Thank you for providing this template Anne, I'm implementing it in a heavily modded and customised site, it'll be a challenge but is seriously needed as 40% of this sites' traffic is mobile/tablet based, as no doubt is the case of most sites these days.
    I am happy that you like the template ;)

    The file is in files/includes/init_includes/init_display_mode.php in the zip file that I have uploaded.


    Thanks,

    Anne

  3. #3
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,303
    Plugin Contributions
    1

    Default Re: Westminster New

    Quote Originally Posted by picaflor-azul View Post

    The file is in files/includes/init_includes/init_display_mode.php in the zip file that I have uploaded.

    Anne
    Yes, I thought that was the case.

  4. #4
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Westminster New

    Slight alignment issue. I don't think size matters but this was a 7" touch device. I will try using a real phone later.

    I stopped testing using Android tablets due to the menu issue.

    FWIW: 11% of our site traffic stats is from Android devices.

    ==========================================
    This is a phone.
    Your UA is Mozilla/5.0 (Linux; Android 4.2.2; DX752 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.170 Mobile Safari/537.36

    Attachment 14080
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  5. #5
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,928
    Plugin Contributions
    45

    Default Re: Westminster New

    Quote Originally Posted by RixStix View Post
    Slight alignment issue. I don't think size matters but this was a 7" touch device. I will try using a real phone later.

    I stopped testing using Android tablets due to the menu issue.

    FWIW: 11% of our site traffic stats is from Android devices.

    ==========================================
    This is a phone.
    Your UA is Mozilla/5.0 (Linux; Android 4.2.2; DX752 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.170 Mobile Safari/537.36

    Attachment 14080
    I just corrected the php mobile detect script on the demo. Give it another try and let me know if it looks different.



    Thanks,

    Anne
    Last edited by picaflor-azul; 18 May 2014 at 03:18 PM.

  6. #6
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: Westminster New

    Here it is. Yes, there is some difference. Screengrab from phone.

    The 7" has now decided to be difficult with screengrabs.

    Attachment 14081Attachment 14082
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  7. #7
    Join Date
    Apr 2014
    Posts
    154
    Plugin Contributions
    0

    Default Re: Westminster New

    Quote Originally Posted by RixStix View Post
    Here it is. Yes, there is some difference. Screengrab from phone.

    The 7" has now decided to be difficult with screengrabs.

    Attachment 14081Attachment 14082
    I suggest you stop editing the css files and layout until you get the full fix for the mobile detect. There are 2 issues which 1 was partially fixed in the winchester template by rbarour. Basically, the fix was to include the 2.0 workaround to call the correct css files. However, the code fix did NOT attempt to change ALL instances where specific device files are called. And this is where your issue comes in as the tpl header file is the same one called for mobile, tablet and desktop. But if you look in the common folder, you will see that the 2.1 code has specific headers for each device.

    So the same logic has to be implemented, BUT it depends on whether you are using the switches on the templates. If you do NOT use the switches to change views, then you can use this code:

    In tpl_main_page.php, find:

    PHP Code:
          if($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile'){ 


        require(
    $template->get_template_dir('tpl_header_mobile.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_header_mobile.php');

          } else { 

        require(
    $template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_header.php'); 
    change to:

    PHP Code:
          if($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile'){ 


        require(
    $template->get_template_dir('tpl_header_mobile.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_header_mobile.php');

          } else { 

        require(
    $template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_header.php'); 
    A note on this is that is the tpl_header_tablet is not being called in the code. I don't know whether it was done on purpose by Anne. But if the tpl_header_tablet is suppose to be called for tablets then you can use this code:

    PHP Code:
          if($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile'){ 

        require(
    $template->get_template_dir('tpl_header_mobile.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_header_mobile.php');

          } else if (
    $detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){

    require(
    $template->get_template_dir('tpl_header_tablet.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_header_tablet.php');

         } else {
        require(
    $template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_header.php');

          } 
    ?> 
    If you are using the switches, then follow the posts I wrote in the winchester as you will have to add the session to each if statement. Also, you may have to modify other files if you are using the mobile detect code to call certain files.

 

 

Similar Threads

  1. v155 Getting ajax error in v155 with v154 Westminster template
    By godt in forum General Questions
    Replies: 3
    Last Post: 11 Jul 2016, 12:41 AM
  2. v155 Getting ajax error in v155 with v154 Westminster template
    By MCS_Computers in forum General Questions
    Replies: 10
    Last Post: 21 Mar 2016, 03:58 PM
  3. v154 Modifying Top Menu - Westminster New
    By chelseaneedshelp in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 27 Mar 2015, 04:28 PM
  4. Westminster New doesn't work on mobile phone
    By Pompidompie in forum Addon Templates
    Replies: 3
    Last Post: 26 Mar 2015, 10:34 PM
  5. v151 westminster new Share and Connect
    By Larry0652 in forum Addon Templates
    Replies: 8
    Last Post: 24 Oct 2014, 03:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg