1
wishcraft
WURFL 1.28 - For XOOPS 2.4/2.5 (Mobile computing)

Resized Image
WURFL 1.28
Community Release by Chronolabs Co-Op


WURFL is a module that will allow theme designers to implement themes customised for Mobile Computing. WURFL is a XML Database that this module will import and allow for propogation of it resources on User Agent based browsing of mobile phones.

WURFL is a world leader in Mobile communication data and this module utilizes WURFL from sourceforge (see.http://wurfl.sourceforge.net).

This module will propogate data on the <{$wurfl}> smarty tag on array depths, you can set which providers you require for data to conversely populate on the source.

Taken fromhttp://wurfl.sourceforge.net/
Quote:

Welcome to the WURFL
the Wireless Universal Resource FiLe
by Luca Passani, ScientiaMobile

So... What is WURFL?
WURFL is a Device Description Repository (DDR), i.e. a software component which contains the descriptions of thousands of mobile devices. In its simplest incarnation, WURFL is an XML configuration file plus a set of programming APIs to access the data in real-time environments. The main scope of the WURFL Project is to be an independent central repository of device information, which Open-Source developers from around the globe can utilize to build their mobile web applications.

All the information listed in WURFL has been collected by ScientiaMobile and the community of WURFL users from many different countries. WURFL can be used in any application, free or commercial. In the spirit of the originators of the project, open-source developers who adopt WURFL should share device information with the rest of the community. This will help WURFL to grow better and better every day.

WURFL is deployed by companies such as Facebook and Google. Carriers around the globe deploy it in mission-critical environment with fantatistic performance and reliability. In terms of adoption, WURFL is today more popular than UAProf solutions and solutions from commercial DDR vendors.


This will allow theme designers and module writters to search for data regarding mobile computing and allow for knowledge in the theme of RSS, CSS, Display Size, Image Types, Sound Fontage, and other data such as SMS and MMS.. As well as information about CHTML or XHTML sources.

Please enjoy this module as I have enjoyed writting it.

Features:
  • Updated WURFL.XML
  • Preloader
  • Import Script


Download:http://bin.chronolabs.org.au/xoops2.3_wurfl_1.28.zip (1,101Kb)
Sourceforge:http://sourceforge.net/projects/chronolabs/files/XOOPS/Modules/wurfl/xoops2.5_wurfl_1.28.zip/download (1,101Kb)
Demo:http://xoops.demo.chronolabs.coop
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

2
wishcraft
Re: WURFL 1.28 - For XOOPS 2.4/2.5 (Mobile computing)

How to use this? Basically there is a smarty variable called <{$mobile}> which will be equal to true when a device in the WURFL database is in your website and false when it is a none WURFL Device.

When you are making a theme to work on mobile phones or mobile computing that is a One Column theme with the left and right blocks in the upper or under of the center blocks, you would use smarty code like so for your detection of a mobile devices:

//  Example - /themes/mobtheme/theme.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<
head>
    <!-- 
Assign Theme name -->
    <{
assign var=theme_name value=$xoTheme->folderName}>

    <!-- 
Title and meta -->
    <
meta http-equiv="content-language" content="<{$xoops_langcode}>" />
    <
meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
    <
title><{if $xoops_pagetitle !=''}><{$xoops_pagetitle}> - <{/if}><{$xoops_sitename}></title>
    <
meta name="robots" content="<{$xoops_meta_robots}>" />
    <
meta name="keywords" content="<{$xoops_meta_keywords}>" />
    <
meta name="description" content="<{$xoops_meta_description}>" />
    <
meta name="rating" content="<{$xoops_meta_rating}>" />
    <
meta name="author" content="<{$xoops_meta_author}>" />
    <
meta name="copyright" content="<{$xoops_meta_copyright}>" />
    <
meta name="generator" content="XOOPS" />

    <!-- 
Rss -->
    <
link rel="alternate" type="application/rss+xml" title="" href="<{xoAppUrl backend.php}>" />

    <!-- 
Favicon -->
    <
link rel="shortcut icon" type="image/ico" href="<{xoImgUrl icons/favicon.ico}>" />
    <
link rel="icon" type="image/png" href="<{xoImgUrl icons/favicon.png}>" />

    <!-- 
Sheet Css -->
    <
link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="<{xoAppUrl xoops.css}>" />
    <
link rel="stylesheet" type="text/css" media="all" title="Style sheet" href="<{xoImgUrl style.css}>" />
    <!--[if 
lte IE 8]>
        <
link rel="stylesheet" href="<{xoImgUrl styleIE8.css}>" type="text/css" />
    <![endif]-->

    <!-- 
customized header contents -->
    <{
$xoops_module_header}>
</
head>
<
body id="<{$xoops_dirname}>" class="<{$xoops_langcode}>">
<{if 
$mobile}>
//Start of mobile Theme
<!-- Start Header -->
<
table cellspacing="0">
    <
tr id="header">
        <
td id="headerlogo"><a href="<{xoAppUrl /}>" title="<{$xoops_sitename}>"><img src="<{xoImgUrl xoops-logo.png}>" alt="<{$xoops_sitename}>" /></a></td>
        <
td id="headerbanner"><{$xoops_banner}></td>
    </
tr>
    <
tr>
        <
td id="headerbar" colspan="2">&nbsp;</td>
    </
tr>
</
table>
<!-- 
End header -->

<
table cellspacing="0">
    <
tr>
        <!-- 
Start left blocks loop -->
        <{if 
$xoops_showlblock}>
            <
td id="leftcolumn">
            <{foreach 
item=block from=$xoBlocks.canvas_left}>
                <{
includeq file="$theme_name/theme_blockleft.html"}>
            <{/foreach}>
            </
td>
        <{/if}>
        <!-- 
End left blocks loop -->
    </
tr>
    <
tr>
        <
td id="centercolumn">
            <!-- 
Display center blocks if any -->
            <{if 
$xoBlocks.page_topleft or $xoBlocks.page_topcenter or $xoBlocks.page_topright}>
                <
table cellspacing="0">
                    <
tr>
                        <
td id="centerCcolumn" colspan="2">
                        <!-- 
Start center-center blocks loop -->
                        <{foreach 
item=block from=$xoBlocks.page_topcenter}>
                            <{
includeq file="$theme_name/theme_blockcenter_c.html"}>
                        <{/foreach}>
                        <!-- 
End center-center blocks loop -->
                        </
td>
                    </
tr>
                    <
tr>
                        <
td id="centerLcolumn">
                        <!-- 
Start center-left blocks loop -->
                        <{foreach 
item=block from=$xoBlocks.page_topleft}>
                            <{
includeq file="$theme_name/theme_blockcenter_l.html"}>
                        <{/foreach}>
                        <!-- 
End center-left blocks loop -->
                        </
td>
                        <
td id="centerRcolumn">
                        <!-- 
Start center-right blocks loop -->
                        <{foreach 
item=block from=$xoBlocks.page_topright}>
                            <{
includeq file="$theme_name/theme_blockcenter_r.html"}>
                        <{/foreach}>
                        <!-- 
End center-right blocks loop -->
                        </
td>
                    </
tr>
                </
table>
            <{/if}>
            <!-- 
End center top blocks loop -->

            <!-- 
Start content module page -->
            <{if 
$xoops_contents && ($xoops_contents != ' ') }><div id="content"><{$xoops_contents}></div><{/if}>
            <!-- 
End content module -->

            <!-- 
Start center bottom blocks loop -->
            <{if 
$xoBlocks.page_bottomleft or $xoBlocks.page_bottomright or $xoBlocks.page_bottomcenter}>
                <
table cellspacing="0">
                    <{if 
$xoBlocks.page_bottomcenter}>
                        <
tr>
                            <
td id="bottomCcolumn" colspan="2">
                            <{foreach 
from=$xoBlocks.page_bottomcenter item=block}>
                                <{include 
file="$theme_name/theme_blockcenter_c.html"}>
                            <{/foreach}>
                            </
td>
                        </
tr>
                    <{/if}>

                    <{if 
$xoBlocks.page_bottomleft or $xoBlocks.page_bottomright}>
                        <
tr>
                            <
td id="bottomLcolumn">
                            <{foreach 
from=$xoBlocks.page_bottomleft item=block}>
                                <{include 
file="$theme_name/theme_blockcenter_l.html"}>
                            <{/foreach}>
                            </
td>

                            <
td id="bottomRcolumn">
                            <{foreach 
from=$xoBlocks.page_bottomright item=block}>
                                <{include 
file="$theme_name/theme_blockcenter_r.html"}>
                            <{/foreach}>
                            </
td>
                        </
tr>
                    <{/if}>
                </
table>
            <{/if}>
            <!-- 
End center bottom blocks loop -->
        </
td>
    </
tr>
    <
tr>
        <!-- 
Start right blocks loop -->
        <{if 
$xoops_showrblock}>
            <
td id="rightcolumn">
            <{foreach 
item=block from=$xoBlocks.canvas_right}>
                <{
includeq file="$theme_name/theme_blockright.html"}>
            <{/foreach}>
            </
td>
        <{/if}>
        <!-- 
End right blocks loop -->
    </
tr>
</
table>
//End of mobile Theme
<{else}>
//Start of standard screen theme
<!-- Start Header -->
<
table cellspacing="0">
    <
tr id="header">
        <
td id="headerlogo"><a href="<{xoAppUrl /}>" title="<{$xoops_sitename}>"><img src="<{xoImgUrl xoops-logo.png}>" alt="<{$xoops_sitename}>" /></a></td>
        <
td id="headerbanner"><{$xoops_banner}></td>
    </
tr>
    <
tr>
        <
td id="headerbar" colspan="2">&nbsp;</td>
    </
tr>
</
table>
<!-- 
End header -->

<
table cellspacing="0">
    <
tr>
        <!-- 
Start left blocks loop -->
        <{if 
$xoops_showlblock}>
            <
td id="leftcolumn">
            <{foreach 
item=block from=$xoBlocks.canvas_left}>
                <{
includeq file="$theme_name/theme_blockleft.html"}>
            <{/foreach}>
            </
td>
        <{/if}>
        <!-- 
End left blocks loop -->

        <
td id="centercolumn">
            <!-- 
Display center blocks if any -->
            <{if 
$xoBlocks.page_topleft or $xoBlocks.page_topcenter or $xoBlocks.page_topright}>
                <
table cellspacing="0">
                    <
tr>
                        <
td id="centerCcolumn" colspan="2">
                        <!-- 
Start center-center blocks loop -->
                        <{foreach 
item=block from=$xoBlocks.page_topcenter}>
                            <{
includeq file="$theme_name/theme_blockcenter_c.html"}>
                        <{/foreach}>
                        <!-- 
End center-center blocks loop -->
                        </
td>
                    </
tr>
                    <
tr>
                        <
td id="centerLcolumn">
                        <!-- 
Start center-left blocks loop -->
                        <{foreach 
item=block from=$xoBlocks.page_topleft}>
                            <{
includeq file="$theme_name/theme_blockcenter_l.html"}>
                        <{/foreach}>
                        <!-- 
End center-left blocks loop -->
                        </
td>
                        <
td id="centerRcolumn">
                        <!-- 
Start center-right blocks loop -->
                        <{foreach 
item=block from=$xoBlocks.page_topright}>
                            <{
includeq file="$theme_name/theme_blockcenter_r.html"}>
                        <{/foreach}>
                        <!-- 
End center-right blocks loop -->
                        </
td>
                    </
tr>
                </
table>
            <{/if}>
            <!-- 
End center top blocks loop -->

            <!-- 
Start content module page -->
            <{if 
$xoops_contents && ($xoops_contents != ' ') }><div id="content"><{$xoops_contents}></div><{/if}>
            <!-- 
End content module -->

            <!-- 
Start center bottom blocks loop -->
            <{if 
$xoBlocks.page_bottomleft or $xoBlocks.page_bottomright or $xoBlocks.page_bottomcenter}>
                <
table cellspacing="0">
                    <{if 
$xoBlocks.page_bottomcenter}>
                        <
tr>
                            <
td id="bottomCcolumn" colspan="2">
                            <{foreach 
from=$xoBlocks.page_bottomcenter item=block}>
                                <{include 
file="$theme_name/theme_blockcenter_c.html"}>
                            <{/foreach}>
                            </
td>
                        </
tr>
                    <{/if}>

                    <{if 
$xoBlocks.page_bottomleft or $xoBlocks.page_bottomright}>
                        <
tr>
                            <
td id="bottomLcolumn">
                            <{foreach 
from=$xoBlocks.page_bottomleft item=block}>
                                <{include 
file="$theme_name/theme_blockcenter_l.html"}>
                            <{/foreach}>
                            </
td>

                            <
td id="bottomRcolumn">
                            <{foreach 
from=$xoBlocks.page_bottomright item=block}>
                                <{include 
file="$theme_name/theme_blockcenter_r.html"}>
                            <{/foreach}>
                            </
td>
                        </
tr>
                    <{/if}>
                </
table>
            <{/if}>
            <!-- 
End center bottom blocks loop -->
        </
td>

        <!-- 
Start right blocks loop -->
        <{if 
$xoops_showrblock}>
            <
td id="rightcolumn">
            <{foreach 
item=block from=$xoBlocks.canvas_right}>
                <{
includeq file="$theme_name/theme_blockright.html"}>
            <{/foreach}>
            </
td>
        <{/if}>
        <!-- 
End right blocks loop -->
    </
tr>
</
table>
//End of standard screen theme
<{/if}>
<!-- 
Start footer -->
<
table cellspacing="0">
<
tr id="footerbar">
    <
td><{$xoops_footer}></td>
</
tr>
</
table>
<!-- 
End footer -->
<!--{
xo-logger-output}-->
</
body>
</
html>
Resized Image
www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

Login

Who's Online

88 user(s) are online (65 user(s) are browsing Support Forums)


Members: 0


Guests: 88


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits