... Elxis version 2009.2 codename Electra is out, download it from Elxis Download Center (EDC) ...

Eforum Mobile hook

From Elxis Official Documentation

Jump to: navigation, search
This page is part of the eForum online user guide.

eForum is a free forum component for Elxis CMS developed by Ioannis Sannos (Is Open Source).
You will find all articles of this manual inside the Eforum category.
License Creative Commons 3.0. Share Alike. Copyright (c) 2008-2010 Is Open Source. All rights reserved.


The mobile hook is an init hook for eForum that displays a mobile friendly version of eForum to iphone, ipod, ipad, black berry and android devices. Support for more devices is easy to be added if someone wants to develop it further. The mobile hook will automatically detect those portable devices and display a iphone style version of eForum instead of the full one. The user can switch back to the full version of eForum if he wishes to.


Installation

To install the mobile hook for eForum just upload its files inside the init hook folder of the eForum component: components/com_eforum/hooks/init/
After doing that you will have a file structure like this:
components/com_eforum/hooks/init/mobile/
components/com_eforum/hooks/init/mobile.php

Make sure init hooks and hooks in general are enabled in eForum configuration.


Configure devices

By default the Mobile hook detects iphone and ipod only as I have tested the hook only for these devices. To change the settings open the following file:

components/com_eforum/hooks/init/mobile.php

and locate the code block bellow

$devices = array(
     'iphone' => array('detect' => true, 'pattern' => 'iphone'),
     'ipod' => array('detect' => true, 'pattern' => 'ipod'),
     'ipad' => array('detect' => false, 'pattern' => 'ipad'),
     'android' => array('detect' => false, 'pattern' => 'android'),
     'blackberry' => array('detect' => false, 'pattern' => 'blackberry')
);

Change the detect option to false to disable a device or to true to enable it.


Functionality

The mobile hook provides a version of eForum with limited functionality. You can login as a user, browse boards and topics but you can not write anything. If you click on the Normal style link at the bottom of the page you can switch to the full version of eForum. This setting is being saved in a session. If you wish to return back to the mobile version you should add this to the URL: efnormal=0

Switch to the mobile compatible version of eForum:

http://www.mysite.com/eforum/?efnormal=0

Switch to the full version of eForum:

http://www.mysite.com/eforum/?efnormal=1

Image:Eforum_iphone.jpg

Read also: eForum Hooks

Personal tools