2012年11月29日 星期四

5 mobile solutions about Joomla templates and plug-ins


Mobile solutions for your Joomla websites
Mobile solutions for Joomla websites
In the mobile age which we are living in, more and more users access websites via smart mobile devices such as the iPhone, Android-based or Windows-based mobiles. It brings a new challenge to website developers - Providing the look-and-feel of a mobile device's user interface effectively.
Joomla CMS is not an exception. Joomla developers provide some mobile solutions for your websites. Take the phone out of your pocket and check out yours website with the mobile Joomla products below.

A general review

A mobile's screen is smaller than a computer's screen. That is, on a mobile, only the main content should be displayed. You can create a website layout for mobiles by using plug-ins or templates.
I picked the most popular Joomla templates and plug-ins mobile devices and tested them out on the iPhone and iPad:
Product name
Joomla version
Mobile support
PROs
CONs
PLUG-INS
1.5, 1.7, 2.5
- iPhone
- Android
- Blackberry
- Nokia
- All other phones
- Free
- Quite comprehensive settings
- Four 3rd-party extensions supported.
- Support various mobile phone types
- Sophisticated settings
- Limited mobile themes
1.5, 1.7
- iPhone
- Easy to use
- No support for other mobile phone types
- Still buggy
TEMPLATES
Templates based on Gantry framework
1.5, 1.7, 2.5
- iPhone
- Android
- Comprehensive settings
- No support for other mobile phone types
- No additional 3rd-party extensions support
Templates based on JSN Framework
1.5, 1.7, 2.5
- iPhone
- Android
- Mobiles based on Windows OS
- Easy to use
- Fast
- No additional 3rd-party extensions support
Templates based on Warp Framework
1.5, 1.7
- iPhone
- Android
- Easy to use
- Fast & smooth
- No support for other mobile phone types
- Limited module positions

Detailed reviews

Joomla Plug-ins

Mobile Joomla

Mobile Joomla plug-in
Front-end and Back-end of Mobile Joomla
If you ask about mobile solutions on forums, Mobile Joomla might be one of the first plug-ins recommendations. In general, Mobile Joomla is quite flexible to customize the mobile website as you wish.
This plug-in permits you to present your website on various mobile device types: iPhone, Android, Blackberry, Nokia and other phones. You can customize the mobile layout with 9 module positions; custom templates, menu and homepage for each device category. You don't need to worry about images presentation since it allows you choose to remove or re-size images on the mobile as well. Beside this, it comes with 4 additional extensions: Remove Support Ads, Youtube Mobile, Login Mobile and Google Analytics Mobile.
However, personally, I think that it is quite complex to use. There are too many parameters to set up; and, many parameter names are not self-explanatory.
Download (Registration required) - Documentation

J Admin Mobile

Joomla mobile solutions: J Admin mobile plug-in
J Admin Mobile shows the content on your website
If you have to edit content on your website from your iPhone, you may consider choosing J Admin Mobile (JAM). It allows you to manage some core sections such as Articles, Sections, Categories, etc in the back-end of site remotely.
There are 2 editions of J Admin Mobile:
  • Free Edition: You can use it on only one website. You get full permissions in the Articles section, but just get the view permission in the other sections. Besides this, there is an advertisement displayed on your website.
  • Premium Edition: You can use it on unlimited websites. You get full permissions in all sections that J Admin Mobile supports and there is no advertisement displayed on your website.
J Admin Mobile sounds promising. So I took a test of its Free Edition first. However, it is just suitable with simple work, not serious work. In the Articles section, there is no the built-in Tiny MCE editor and you need to edit the article in the html code. You will be limited if you want to edit the all of the content. Moreover, I couldn't re-size images to insert them into an article.
Download / Buy (an iTunes account is required) - Documentation

Joomla Templates

Some Joomla templates come with built-in versions for mobile devices. The settings can be configured in the back-end of the templates.

Templates based on RT Gantry framework

Joomla mobile solutions: Gantr framework templates
The mobile version and PC version of RT Gantry framework
If you have used Joomla, Rockettheme is definitely not an unfamiliar provider to you. This is a leading vendor with nice templates and extensions.
You won't be disappointed with the mobile version of their templates which are based on the RT Gantry framework. It is quite flexible since it allows you to organize your content in 7 module positions and customize 9 menu animations. You can also set Scalable content to enabled or disabled to allow your users to zoom your content. Big images will be automatically re-sized to suit your website.
Last but not least, detailed on-site guidelines can help you use it easily.

Templates based on JSN framework

Joomla mobile solutions: JSN framework templates
The mobile version and PC version of JSN framework
Simple, easy to use, and highly effective are the criteria which Joomlashine used to create their Joomla templates on PC, and it is also true of the mobile version. Compact and lightweight, with a fast loading speed - it has an original look like the desktop version.
9 module positions allow you to display the main content quite comfortably. All child menu items are presented as a tree in a collapsible panel. And you can still keep your favorite features such as rich icons and icon on menus in this version.
You don't need to recreate or copy modules and menus with JSN Tendo. You just need to configure (map) the modules from their regular positions to mobile positions. As a result, the template will be displayed as you wish on mobile.

Templates based on Warp framework

Joomla mobile solutions: Warp framework templates
The mobile version and PC version of Warp framework
Using templates based on Warp Framework is a comfortable experience. It is clean and neat with 5 available positions which help readers focus on the main content. Besides this, a drop down menu, a search and a login section are grouped in the toolbar in the top right. To guarantee fast and smooth animations of the layout, JavaScript effects are eliminated.
There are no complex settings with the mobile version of Warp Framework. It is very easy to understand and easy to configure the mobile version with 8 parameters in the back-end. And you don't need to worry about its quality -it is stable.

In conclusion

Template support for mobile devices is still not so popular. Besides the mobile solutions mentioned above, you can also use the plugin Auto Template Switcher or other Joomla templates such as the JA T3 framework based templates of Joomlart, the Morph framework based templates of JoomlaJunkie, the Zen Grid 2 based templates ofJoomlabamboo, etc.

Responsive Web Design


Designing for many devices

Research into mobile device use on the Web shows a large gap between supply and demand. More consumers use a mobile phone than a computer to access the Web. At the same time, only nine percent of websites are actually completely mobile compatible.
Largely this is due to complexity. Designing for desktop alone is complex. When you include mobile it becomes exceedingly complex. There are many factors to take into account:
  • The number of Web enabled devices on the market increases.
  • Different devices have different capabilities.
  • Smartphone models are upgraded rapidly but older phones still need support.
  • Old browsers in corporate environments don't support recent functionality.
  • Compared to fixed data connections, mobile networks tend to be slower and often have a measurably higher latency. This can lead to long retrieval times, especially for lengthy content and navigation between pages.
  • Mobile users have different interests to users on fixed or desktop devices.
  • Mobile users have to pay for bandwidth.
Year 2011 was commonly recognized as the year of mobile commerce in Web design circles. The rapid and extensive adoption of mobile devices to access the Web really hit the mainstream. This forced the design community to come up with better ways to build websites.

Origins of Responsive Web Design

Much debate followed about best practices for designing mobile websites. Ethan Marcotte proposed that addressing browser capability, screen sizes and orientations by creating flexible, fluid and adaptive websites was the answer. This approach, known as Responsive Web Design, seemed to overcome most challenges in most circumstances.
Today, RWD is considered a best practice. Google and Bing endorse it and Google uses it on their own pages. W3C opposes the idea of creating separate mobile and desktop versions and advocates that any web page should have one set of HTML available at one URL, implicitly endorsing RWD. New articles in support of Responsive Web Design appear on the Web daily. One commentator describes it as the "new black".

Benefits

Responsive Web Design offers the following benefits:
  • You can start from an existing desktop website and adapt what already works rather than start from scratch.
  • The need to maintain multiple sites is eliminated. This can be a dramatic cost-saver.
  • All renditions of the site are available at the same URL. This is good for search engine optimization.

How Magnolia CMS uses Responsive Web Design

Magnolia CMS implements the principles of RWD in the Standard Templating Kit. Web pages rendered with the system are compliant with HTML5 and CSS3. Content is abstracted from presentation and fed from a single back-end. You can serve multiple devices without unnecessary replication.
A website built with the STK uses a flexible grid. For desktops browsers, the design adapts dynamically to the viewport. Below is the Standard Article page from the demo-project sample website at screen widths of 1200, 1024 and 768 pixels. Note how the extras and promos areas float from the top right to the bottom. This is an example of reorganizing page elements to fit the viewport.
The same reorganization takes place when the site is viewed on a smartphone. Content that does not work well on the small screen or is not of interest to smartphone users is either left out or reformatted. An iPhone user sees a minimized, modified version of the site.
Here are the two layouts side by side. Note how the navigation is pushed down in the smartphone layout, giving preference to the main area which typically has the most important content such as the story of a news item. This has the benefit that the important content is displayed "above the fold". The phone user can see it in the first screenful without having to scroll. The promos area is left out altogether in the smartphone variation. The red line is an approximate viewport size.
Tip
If you don't have a smartphone at hand, you can view the smartphone variation on a desktop browser by adding the mgnlChannel=smartphone attribute to the URL:http://demopublic.magnolia-cms.com/demo-project/about/subsection-articles/article.html?mgnlChannel=smartphone

Technology

Responsive Web Design relies on three technical ingredients to detect the requesting device's capabilities and adapt the design accordingly:
  • CSS media queries detect the type of device and the viewport size.
  • Flexible grids allow page elements to float, reformat and reorganize depending on the viewport size.
  • New variations of images are generated on-demand to fit in the available space.
These mechanisms implement the basic tenet behind Responsive Web Design: that it is better to design one website that adapts to the ever-increasing number of devices than to create many disconnected designs. Each device is treated as a facet of the same experience.

CSS media queries

CSS media queries is an extension to CSS3 that allows you to control how page elements are rendered on different devices. Media queries are always used in conjunction with media types. The media type identifies the device. The media query is a logical expression that evaluates to either true or false.
Here is an example of a media query:
only screen and (min-width: 1200px)
The query targets the media type screen which is intended for desktop browsers. The expression evaluates to true if the website is viewed with a browser where the viewport size is very large, 1200px wide or more. When true, a style sheet that optimizes the experience for a wide, cinematic screen is applied.
In Magnolia CMS, media queries are configured in a theme. The media attribute contains the media query and the link attribute the style sheet that is applied when the expression evaluates to true. Here is an example from the pop theme. Pop includes several style sheets. The wide sheet that is expanded in the screenshot show the media query and a link to the associated style sheetwide.css. Note how the link property contains just a reference to the style sheet. The actual sheet is stored in the resources workspace. You can edit it in Templating Kit > Resources.
Magnolia CMS ships with a basic collection of style sheets targeted at different media types:
  • styles is the basic style sheet that optimizes the experience for desktop browsers
  • print is intended for printed documents and the print preview mode.
  • wide is for wide screens. It displays the promos area since there is more screen real estate.
  • small is for narrow screens. The main area displays two columns of teasers instead of three.
  • ie6 is a specialized CSS only used for Internet Explorer 6.
  • ieStyles includes styles for IE7 and IE8, applied with a conditional comment.
  • mobile is for smartphones and other handheld devices, see also Device Detection
In addition to the basic set, you can create your own stylesheets. Define matching media queries if you need to render content for other types of devices such as Web-enabled TVs.
Magnolia CMS uses conditional comments to overcome the limitations of legacy browsers. The ie6 and iestyles configuration nodes have an additional attribute conditionalComment that contains a statement that is interpreted by Microsoft Internet Explorer. Magnolia CMS uses them to provide and hide code to and from Internet Explorer.
In the page HTML, the media query and the style sheet link are rendered as a link element inside the head.
<head>
   <link rel="stylesheet" type="text/css" 
      href="/demo-project/resources/templating-kit/themes/pop/css/wide.css" 
      media="only screen and (min-width: 1200px)">
</head>
Typically you will find several link elements like this on the page. The style sheets are loaded incrementally. The basic styles sheet contains a lot of style information that is used on all devices and viewports. The more specific sheets loaded later such as wide define only additions and exceptions.
Here is the viewport comparison again, this time with the style sheet name included.
Note
The mobile media query is used when the default site is rendered on a desktop browser. It is a kind of fallback. Magnolia CMS has a more advanced mechanism for tailoring the mobile experience. The Device Detection module and the channels functionality allow you to format existing content but also target unique content to mobile users. The smartphone variation uses its own theme, pop-mobile, with the media property set simply to screen. The pop-mobile theme is loaded when the User-Agent header identifies the requesting device as a smartphone.

How To Backup And Restore MySQL Database On Fedora16, Centos And Redhat


The mysqldump client is a backup program originally written by Igor Romanenko. It can be used to dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). The dump typically contains SQL statements to create the table, populate it, or both. However, mysqldump can also be used to generate files in CSV, other delimited text, or XML format.
 Mysql-server info
Source RPM  : mysql-5.5.20-1.fc16.src.rpm
 Build Date  : Fri 27 Jan 2012 09:17:21 AM CET
 Build Host  : x86-04.phx2.fedoraproject.org
 Relocations : (not relocatable)
 Packager    : Fedora Project
 Vendor      : Fedora Project
 URL         : http://www.mysql.com
 Summary     : The MySQL server and related files

1- Start  mysql  server

[pirat9@Fedora16 ~]$ sudo service mysqld   start
Connect  to the  Server   with
[pirat9@Fedora16 ~]$ mysql -u root -p
Output
 Enter password:
 Welcome to the MySQL monitor.  Commands end with ; or g.
 Your MySQL connection id is 2
 Server version: 5.5.20 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
 affiliates. Other names may be trademarks of their respective
 owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>

2- Create new database

In my case i created a new database called unixmen
mysql> create database unixmen;
Query OK, 1 row affected (0.00 sec)
-Show databases with
mysql> show databases;
 +--------------------+
 | Database           |
 +--------------------+
 | information_schema |
 | mysql              |
 | performance_schema |
 | test               |
 | test1              |
 | unixmen            |
 +--------------------+
 6 rows in set (0.00 sec)
mysql>

3- Backup  mysql database

Backup MySQL database to <databasebackupfiles>.sql
<databasename> = Target existing database name
<databasebackupfiles> = Preferred backed up file name
# mysqldump -u root -p <databasename> > <databasebackupfiles>.sql
 Enter password: <Type your mysql password and press enter
i will back up the database named <unixmen> to mylbackup file. This will taking backed up all the tables including the data :
# mysqldump -u root -p unixmen > backup.sql
 Enter password:
 View the content on mysqlbackup.sql
more mysqlbackup.sql

4- Restore MySQL database

To restore the backed up database named “mbackup.sql” to new database named “new” as below :
# mysql -u root -p <mysqlpassword> <databasename> < <databasebackupfiles>.sql
<mysqlpassword> = MySQL password
<databasename> = Database name that will be restore
<databasebackupfiles> = Backed up database file, normally .sql file
Create the new database mysqlnew :
mysql> CREATE DATABASE mysqlnew;
 Query OK, 1 row affected (0.01 sec)
As example, i will restore the mysqlbackup.sql backed up file to database named “new” :
# mysql -u root -p password new < mysqlbackup.sql
or
mysql -u root -p new < mysqlbackup.sql