View Single Post
  #2  
Old 02-17-2014, 02:01 PM
richy96's Avatar
richy96 richy96 is offline
 
Join Date: Apr 2008
Location: England
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

5. Creating the mobile site layout
------------------------------------------

OK we now have the basic tools in place. We have two styles, and as we select each style we automatically select the CMPS layout defined in either admincp or smadmincp

Here are a few things I learned while designing a mobile layout....

Change all the absolute pixel widths to percentages

Add a meta tag like this to your mobile style headinclude

<meta name="viewport" content="width=device-width; initial-scale=1.0">

This will force the pages to fit the width of the mobile device in both portrait and landscape orientations

Use the CMPS in smadmincp to create a single column mobile layout. You can have modules that are present on only one version of your site, or on both but in different locations

In your mobile style options get rid of most of the 'padding' as youy only have a llimited width on the screen that you can use

Instead of dsiplaying avatars in postibts use the thumbnails instead - they look better on mobile devices

Create a simple navigation system with buttons taking your forwards and backwards through site pages, rather than having a navigation bar. Keep the navigation consistent on all pages. For example I have buttons that have actions specific to a page in bold and buttons for general navigation in normal type.

Use CSS as much as you can to create buttons etc - it keeps the bandwidth down

Strip out unneccesary stuff to reduce bandwidth and 'clutter'

6. Templates
----------------

Now it is just a matter of going through all the templates in your mobile style and editing them to suit your single 'narrow' column layout. This is time consuming but not dificult as it is generally a matter of removing parts of the template you don't need for your mobile version. Try to keep things simple on your mobile site, for instance have only one post editor rather than quick reply and advanced

You can edit the templates in your mobile style to your hearts content without affecting your main site. Remember that phrases are global to both styles - so create new phrases as required for your mobile site and name them mobile_foo etc so you know which style they relate to

So thats about it really - not a full tutorial but a good starting point at least

I'll post up a few screen grabs so you can see my site in both classic and mobile style

enjoy.
Rich
Attached Files
File Type: txt vba.txt (2.6 KB, 1 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01337 seconds
  • Memory Usage 1,783KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete