Index: trunk/wap/hawhaw/hawhaw.inc |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | // HAWHAW: HTML and WML hybrid adapted webserver |
5 | 5 | // PHP class library |
6 | 6 | // Copyright (C) 2008 Norbert Huffschmid |
7 | | -// Last modified: 14. May 2008 |
| 7 | +// Last modified: 14. June 2008 |
8 | 8 | // |
9 | 9 | // This library is free software; you can redistribute it and/or modify it under the |
10 | 10 | // terms of the GNU Library General Public License as published by the Free Software |
— | — | @@ -21,13 +21,10 @@ |
22 | 22 | // For further information about this library and its license terms please visit: |
23 | 23 | // http://www.hawhaw.de/ |
24 | 24 | // |
25 | | -// changes against V5.18: |
26 | | -// improved browser detection for: |
27 | | -// - PalmOS |
28 | | -// - Minimo |
29 | | -// - PIE |
30 | | -// - Blackberry |
31 | | -// - Nintendo DS |
| 25 | +// changes against V5.19: |
| 26 | +// - added support of Amazon Kindle device |
| 27 | +// - disabling of simulator supported |
| 28 | +// - improved detection of desktop browsers |
32 | 29 | |
33 | 30 | ################################### |
34 | 31 | # BEGIN OF CONFIGURATION PART # |
— | — | @@ -48,7 +45,7 @@ |
49 | 46 | ################################### |
50 | 47 | |
51 | 48 | // miscellaneous constants |
52 | | -define("HAW_HAW_VERSION", "HAWHAW V5.19B"); |
| 49 | +define("HAW_HAW_VERSION", "HAWHAW V5.20B"); |
53 | 50 | define("HAW_COPYRIGHT", "(C) Norbert Huffschmid"); |
54 | 51 | if (defined("HAW_TERA_WURFL_PATH")) |
55 | 52 | define("HAW_VERSION", HAW_HAW_VERSION . "/Tera-WURFL"); |
— | — | @@ -97,7 +94,8 @@ |
98 | 95 | define("HAW_RAW", 16); |
99 | 96 | define("HAW_RULE", 17); |
100 | 97 | define("HAW_VOICERECORDER", 18); |
101 | | -define("HAW_USERDEFINED", 19); |
| 98 | +define("HAW_USERDEFINED", 19); // synonym for HAW_PLUGIN (deprecated) |
| 99 | +define("HAW_PLUGIN", 19); |
102 | 100 | |
103 | 101 | // constants for page setup |
104 | 102 | define("HAW_ALIGN_LEFT", 1); |
— | — | @@ -162,6 +160,12 @@ |
163 | 161 | define("HAW_DISP_VLINKCOLOR", "#006633"); // lighter green |
164 | 162 | define("HAW_DISP_FACE", "Arial,Times"); |
165 | 163 | |
| 164 | +// constants for simulator handling |
| 165 | +define("HAW_SIM_NONE", 0); // no simulator at all |
| 166 | +define("HAW_SIM_CLASSIC", 1); // classic hawhaw simulator style |
| 167 | +define("HAW_SIM_SKIN", 2); // skin-based (phone-) simulator |
| 168 | + |
| 169 | + |
166 | 170 | function HAW_specchar($input, $deck) |
167 | 171 | { |
168 | 172 | // convert special characters |
— | — | @@ -559,18 +563,21 @@ |
560 | 564 | var $number_of_top_banners = 0; |
561 | 565 | var $bottom_banners; |
562 | 566 | var $number_of_bottom_banners = 0; |
563 | | - var $display_banners = true; |
| 567 | + var $display_banners = false; |
| 568 | + var $link_brackets = true; |
564 | 569 | var $waphome; |
565 | 570 | var $hdmlcardset; |
566 | 571 | |
567 | 572 | // browser dependent properties |
568 | | - var $pureHTML = false; // Big-screen-HTML-code ("simulator", causes trouble with unrecognized devices) |
| 573 | + var $desktopBrowser = false; // non-mobile browser |
| 574 | + var $pureHTML; // deprecated synonym for $desktopBrowser (keep for compatibilty reasons) |
569 | 575 | var $PDAstyle = false; // PDA browsers needs special HTML code |
570 | 576 | var $iModestyle = false; // cHTML too |
571 | 577 | var $upbrowser = false; // UP browser |
572 | 578 | var $owgui_1_3 = false; // Openwave GUI Extensions for WML 1.3 |
573 | 579 | var $MMLstyle = false; // Mobile Markup Language |
574 | 580 | var $lynx = false; // Lynx text browser |
| 581 | + var $iPhoneAlike = false; // iPhone, iPod Touch etc. |
575 | 582 | var $xhtml = false; // XHTML MP (mobile profile) |
576 | 583 | var $gif_enabled = false; // browser can not deal with GIF images |
577 | 584 | var $submitViaLink = false; // use link instead of <do> |
— | — | @@ -582,8 +589,8 @@ |
583 | 590 | var $hawoutput = ""; // no forced output |
584 | 591 | |
585 | 592 | // device simulator properies |
586 | | - var $use_simulator = false; // decide whether default simulator device is to be used |
587 | | - var $skin = ""; // contains css url, where skinning is defined |
| 593 | + var $use_simulator = HAW_SIM_CLASSIC; // decide whether default simulator device is to be used |
| 594 | + var $skin = ""; // contains css url, where skinning is defined |
588 | 595 | |
589 | 596 | // character set properties |
590 | 597 | var $charset = "iso-8859-1"; // default charset |
— | — | @@ -786,6 +793,16 @@ |
787 | 794 | } |
788 | 795 | } |
789 | 796 | |
| 797 | + $this->pureHTML = &$this->desktopBrowser; // synonyms for non-mobile browsers |
| 798 | + |
| 799 | + if (strstr(strtolower($HTTP_USER_AGENT), "lynx")) |
| 800 | + $this->lynx = true; |
| 801 | + |
| 802 | + if (strstr($HTTP_USER_AGENT, "(iPhone") || |
| 803 | + strstr($HTTP_USER_AGENT, "(iPod") || |
| 804 | + strstr($HTTP_USER_AGENT, "(Aspen Simulator")) |
| 805 | + $this->iPhoneAlike = true; |
| 806 | + |
790 | 807 | if (defined("HAW_TERA_WURFL_PATH") && !$forced_output) |
791 | 808 | { |
792 | 809 | $this->determine_capabilities_terawurfl(); |
— | — | @@ -936,17 +953,17 @@ |
937 | 954 | |
938 | 955 | |
939 | 956 | /** |
940 | | - Adds some user-defined HAWHAW object to HAW_deck.<br> |
941 | | - @param udef Some user-defined object. |
| 957 | + Adds some HAWHAW plugin to HAW_deck.<br> |
| 958 | + @param plugin Some user-defined plugin object. |
942 | 959 | |
943 | 960 | <pre> |
944 | | - A user-defined HAWHAW class definition should look like this: |
| 961 | + A HAWHAW plugin class definition should look like this: |
945 | 962 | |
946 | | - class HAW_foo // some class name of your choice |
| 963 | + class HAW_plugin_foo // some class name of your choice |
947 | 964 | { |
948 | 965 | var $bar; // some class variable declarations of your choice |
949 | 966 | |
950 | | - function HAW_foo(...) |
| 967 | + function HAW_plugin_foo(...) |
951 | 968 | { |
952 | 969 | # some constructor code (if required) |
953 | 970 | } |
— | — | @@ -959,7 +976,7 @@ |
960 | 977 | # this member function is called by HAWHAW and MUST NOT be changed! |
961 | 978 | function get_elementtype() |
962 | 979 | { |
963 | | - return HAW_USERDEFINED; |
| 980 | + return HAW_PLUGIN; |
964 | 981 | } |
965 | 982 | |
966 | 983 | function create($deck) |
— | — | @@ -972,28 +989,37 @@ |
973 | 990 | |
974 | 991 | Usage: ... |
975 | 992 | require_once("hawhaw.inc); |
976 | | - require_once("HAW_foo.php"); |
| 993 | + require_once("HAW_plugin_foo.php"); |
977 | 994 | ... |
978 | | - $myText = new HAW_text("Classic text"); |
979 | | - $myDeck->add_text($myText); |
980 | | - $myClass = new HAW_foo("Cool output"); |
| 995 | + $myClass = new HAW_plugin_foo("Cool output"); |
981 | 996 | $myClass->set_coolstuff($ringtone, $sms, $userlocation); |
982 | | - $myDeck->add_userdefined($myClass); |
| 997 | + $myDeck->add_plugin($myClass); |
983 | 998 | ... |
984 | 999 | </pre> |
985 | 1000 | */ |
986 | | - function add_userdefined($udef) |
| 1001 | + function add_plugin($plugin) |
987 | 1002 | { |
988 | | - if (!is_object($udef)) |
989 | | - die("invalid argument in add_userdefined()"); |
| 1003 | + if (!is_object($plugin)) |
| 1004 | + die("invalid argument in add_plugin()"); |
990 | 1005 | |
991 | | - $this->element[$this->number_of_elements] = $udef; |
| 1006 | + $this->element[$this->number_of_elements] = $plugin; |
992 | 1007 | |
993 | 1008 | $this->number_of_elements++; |
994 | 1009 | } |
995 | 1010 | |
996 | 1011 | |
997 | 1012 | /** |
| 1013 | + Adds some user-defined HAWHAW object to HAW_deck.<br> |
| 1014 | + @param udef Some user-defined object. |
| 1015 | + @deprecated use HAW_deck::add_plugin() instead |
| 1016 | + */ |
| 1017 | + function add_userdefined($udef) |
| 1018 | + { |
| 1019 | + $this->add_plugin($udef); |
| 1020 | + } |
| 1021 | + |
| 1022 | + |
| 1023 | + /** |
998 | 1024 | Adds a HAW_banner object to HAW_deck. <br> |
999 | 1025 | Note: Has no effect on WML/handheld pages. |
1000 | 1026 | @param banner Some HAW_banner object. |
— | — | @@ -1403,20 +1429,39 @@ |
1404 | 1430 | |
1405 | 1431 | |
1406 | 1432 | /** |
1407 | | - Activates the device simulator on bigscreen browsers. <br> |
1408 | | - Note: If no skin is specified, the HAWHAW default skin is used. |
| 1433 | + Activates or deactivated the device simulator on bigscreen browsers. <br> |
| 1434 | + Note: If no sim parameter is provided, the HAWHAW default skin is used. |
1409 | 1435 | HAWHAW output can be displayed in any kind of user-defined skin. |
1410 | 1436 | See <a href="http://skin.hawhaw.de/skin.css" target="_blank"> |
1411 | 1437 | CSS file</a> of the HAWHAW default skin for more info. |
1412 | | - @param skin URL of CSS file, where skin is defined (optional) |
| 1438 | + @param sim HAW_SIM_NONE | HAW_SIM_CLASSIC | URL of CSS file, where skin is defined (optional) |
1413 | 1439 | */ |
1414 | | - function use_simulator($skin="http://skin.hawhaw.de/skin.css") |
| 1440 | + function use_simulator($sim="http://skin.hawhaw.de/skin.css") |
1415 | 1441 | { |
1416 | | - $this->use_simulator = true; |
1417 | | - $this->skin = $skin; |
| 1442 | + if ($sim === HAW_SIM_NONE) |
| 1443 | + $this->use_simulator = HAW_SIM_NONE; |
| 1444 | + else if ($sim === HAW_SIM_CLASSIC) |
| 1445 | + $this->use_simulator = HAW_SIM_CLASSIC; |
| 1446 | + else if (is_string($sim)) |
| 1447 | + { |
| 1448 | + $this->use_simulator = HAW_SIM_SKIN; |
| 1449 | + $this->skin = $sim; |
| 1450 | + } |
| 1451 | + else |
| 1452 | + die("invalid argument in use_simulator()"); |
1418 | 1453 | } |
| 1454 | + |
1419 | 1455 | |
| 1456 | + /** |
| 1457 | + Defines whether links are shown within square brackets or not. |
| 1458 | + @param flag true (default) | false |
| 1459 | + */ |
| 1460 | + function use_link_brackets($flag) |
| 1461 | + { |
| 1462 | + $this->link_brackets = $flag; |
| 1463 | + } |
1420 | 1464 | |
| 1465 | + |
1421 | 1466 | /** |
1422 | 1467 | Sets deck-related text to be spoken by voice browsers. <br> |
1423 | 1468 | @param text Some introducing text that will be spoken before any other dialog or |
— | — | @@ -1757,9 +1802,9 @@ |
1758 | 1803 | $bodystyle = "text-align: center; "; |
1759 | 1804 | $css_style = ""; |
1760 | 1805 | |
1761 | | - if ($this->pureHTML || $this->PDAstyle || $this->xhtml) |
| 1806 | + if ($this->desktopBrowser || $this->PDAstyle || $this->xhtml) |
1762 | 1807 | { |
1763 | | - if ($this->pureHTML) |
| 1808 | + if ($this->desktopBrowser) |
1764 | 1809 | { |
1765 | 1810 | // big-screen browser |
1766 | 1811 | |
— | — | @@ -1849,7 +1894,7 @@ |
1850 | 1895 | |
1851 | 1896 | printf("<title>%s</title>\n", HAW_specchar($this->title, $this)); |
1852 | 1897 | |
1853 | | - if ($this->pureHTML && $this->use_simulator && $this->css_enabled) |
| 1898 | + if ($this->desktopBrowser && ($this->use_simulator == HAW_SIM_SKIN) && $this->css_enabled) |
1854 | 1899 | // use HAWHAW default- or user-defined skin |
1855 | 1900 | printf("<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" $endtag\n", $this->skin); |
1856 | 1901 | |
— | — | @@ -1880,18 +1925,18 @@ |
1881 | 1926 | } |
1882 | 1927 | } |
1883 | 1928 | |
1884 | | - if ($this->pureHTML) |
| 1929 | + if ($this->desktopBrowser) |
1885 | 1930 | { |
1886 | | - if ($this->css_enabled && $this->use_simulator) |
| 1931 | + if ($this->css_enabled && ($this->use_simulator == HAW_SIM_SKIN)) |
1887 | 1932 | { |
1888 | | - // use simulator design |
| 1933 | + // use skin design |
1889 | 1934 | echo "<div id=\"skin\">\n"; |
1890 | 1935 | echo "<div id=\"display\">\n"; |
1891 | 1936 | } |
1892 | | - else |
| 1937 | + else if ($this->use_simulator == HAW_SIM_CLASSIC) |
1893 | 1938 | { |
1894 | 1939 | // use classic HAWHAW design |
1895 | | - printf("<div style=\"background-color: %s; background-image: url(%s); border: %dpx solid #aaa; padding: 8px; width: %s; height: %s; margin: 0px auto; overflow: auto;\">\n", |
| 1940 | + printf("<div id=\"classic\" style=\"background-color: %s; background-image: url(%s); border: %dpx solid #aaa; padding: 8px; width: %s; height: %s; margin: 0px auto; overflow: auto;\">\n", |
1896 | 1941 | $this->disp_bgcolor, $this->disp_background, $this->border, $this->width, $this->height); |
1897 | 1942 | } |
1898 | 1943 | } |
— | — | @@ -2134,9 +2179,9 @@ |
2135 | 2180 | if ($this->ml == HAW_HTML) |
2136 | 2181 | { |
2137 | 2182 | if ($this->css_enabled) |
2138 | | - printf("<div style=\"%s\">\n", $divstyle); |
| 2183 | + printf("<div id=\"canvas\" style=\"%s\">\n", $divstyle); |
2139 | 2184 | else |
2140 | | - printf("<div align=\"%s\">\n", $this->alignment); |
| 2185 | + printf("<div id=\"canvas\" align=\"%s\">\n", $this->alignment); |
2141 | 2186 | } |
2142 | 2187 | elseif ($this->ml == HAW_WML) |
2143 | 2188 | printf("<p align=\"%s\">\n", $this->alignment); |
— | — | @@ -2155,7 +2200,7 @@ |
2156 | 2201 | case HAW_PHONE: |
2157 | 2202 | case HAW_LINKSET: |
2158 | 2203 | case HAW_RAW: |
2159 | | - case HAW_USERDEFINED: |
| 2204 | + case HAW_PLUGIN: |
2160 | 2205 | case HAW_RULE: |
2161 | 2206 | case HAW_VOICERECORDER: |
2162 | 2207 | { |
— | — | @@ -2189,17 +2234,22 @@ |
2190 | 2235 | if (!$this->css_enabled && $this->fontstyle_attrbs) |
2191 | 2236 | echo "</font>\n"; |
2192 | 2237 | |
2193 | | - if ($this->pureHTML) |
| 2238 | + if ($this->desktopBrowser) |
2194 | 2239 | { |
2195 | | - if ($this->css_enabled && $this->use_simulator) |
2196 | | - // terminate display div |
| 2240 | + if ($this->css_enabled && ($this->use_simulator == HAW_SIM_SKIN)) |
| 2241 | + { |
| 2242 | + // terminate display divs |
2197 | 2243 | echo "</div>\n"; |
| 2244 | + echo "</div>\n"; |
| 2245 | + } |
| 2246 | + |
| 2247 | + if ($this->use_simulator == HAW_SIM_CLASSIC) |
| 2248 | + echo "</div>\n"; // terminate classic div |
2198 | 2249 | |
2199 | | - echo "</div>\n"; // terminate skin/classic div |
2200 | | - |
2201 | 2250 | if (!$this->lynx) |
2202 | 2251 | { |
2203 | | - $default_text = "Powered by HAWHAW (C)"; |
| 2252 | + $signature = ""; |
| 2253 | + $default_text = "Powered by HAWHAW (C)"; |
2204 | 2254 | if ($haw_license_holder && $haw_signature) |
2205 | 2255 | { |
2206 | 2256 | if ($haw_signature == 1) |
— | — | @@ -2215,7 +2265,13 @@ |
2216 | 2266 | $signature = sprintf("<a href=\"http://info.hawhaw.de/index.htm?host=%s\" target=\"_blank\"><small>%s</small></a>\n", |
2217 | 2267 | $this->waphome, $default_text); |
2218 | 2268 | |
2219 | | - echo $signature; |
| 2269 | + if ($signature && ($this->use_simulator == HAW_SIM_NONE)) |
| 2270 | + { |
| 2271 | + echo "<hr width=\"150px\"/>\n"; // seperate content from signature |
| 2272 | + printf("<span style=\"font-size:8pt;\">%s</span>\n", $signature); |
| 2273 | + } |
| 2274 | + else |
| 2275 | + echo $signature; |
2220 | 2276 | } |
2221 | 2277 | } |
2222 | 2278 | |
— | — | @@ -2369,8 +2425,6 @@ |
2370 | 2426 | // let's be dotmobi compliant ... |
2371 | 2427 | $this->ml = HAW_HTML; |
2372 | 2428 | $this->xhtml = true; |
2373 | | - $this->pureHTML = false; |
2374 | | - $this->display_banners = false; |
2375 | 2429 | $this->gif_enabled = true; |
2376 | 2430 | $this->css_enabled = true; |
2377 | 2431 | } |
— | — | @@ -2379,22 +2433,32 @@ |
2380 | 2434 | } |
2381 | 2435 | } |
2382 | 2436 | |
| 2437 | + // guess some non-mobile browsers |
| 2438 | + if (strstr($HTTP_USER_AGENT, "MSIE") || // can be WIN CE! |
| 2439 | + strstr($HTTP_USER_AGENT, "Firefox") || |
| 2440 | + strstr($HTTP_USER_AGENT, "Macintosh") || // Safari desktop browser |
| 2441 | + strstr($HTTP_USER_AGENT, "Iceweasel") || |
| 2442 | + strstr($HTTP_USER_AGENT, "Konqueror") || |
| 2443 | + strstr($HTTP_USER_AGENT, "Opera")) // can be Opera Mini! |
| 2444 | + { |
| 2445 | + $this->desktopBrowser = true; |
| 2446 | + $this->display_banners = true; |
| 2447 | + } |
| 2448 | + |
2383 | 2449 | if (strstr($acc_low, "vnd.wap.xhtml") || |
2384 | 2450 | strstr($ua_low, "opera mini") || |
2385 | 2451 | strstr($ua_low, "google wireless transcoder") || |
2386 | 2452 | (strstr($ua_low, "symbianos") && strstr($acc_low, "xhtml+xml")) || |
2387 | | - strstr($HTTP_USER_AGENT, "(iPhone") || |
2388 | | - strstr($HTTP_USER_AGENT, "(iPod") || |
2389 | | - strstr($HTTP_USER_AGENT, "(Aspen Simulator") || |
| 2453 | + ($this->iPhoneAlike == true) || |
2390 | 2454 | strstr($HTTP_USER_AGENT, "(Linux; U; Android") || |
2391 | 2455 | strstr($HTTP_USER_AGENT, "Kindle/")) |
2392 | 2456 | { |
2393 | 2457 | // XHTML device detected |
2394 | 2458 | $this->xhtml = true; |
2395 | | - $this->pureHTML = false; |
2396 | | - $this->display_banners = false; |
2397 | 2459 | $this->gif_enabled = true; |
2398 | 2460 | $this->css_enabled = true; |
| 2461 | + $this->desktopBrowser = false; |
| 2462 | + $this->display_banners = false; |
2399 | 2463 | } |
2400 | 2464 | elseif ( strstr($ua_low, "avantgo") || |
2401 | 2465 | strstr($ua_low, "reqwirelessweb") || |
— | — | @@ -2413,7 +2477,7 @@ |
2414 | 2478 | { |
2415 | 2479 | // PDA browser detected (or poor old Netscape 4.7x which messes with CSS) |
2416 | 2480 | $this->PDAstyle = true; |
2417 | | - $this->pureHTML = false; |
| 2481 | + $this->desktopBrowser = false; |
2418 | 2482 | $this->display_banners = false; |
2419 | 2483 | } |
2420 | 2484 | elseif (strstr($ua_low, "docomo") || |
— | — | @@ -2422,23 +2486,21 @@ |
2423 | 2487 | { |
2424 | 2488 | // i-mode browser detected |
2425 | 2489 | $this->iModestyle = true; |
2426 | | - $this->pureHTML = false; |
| 2490 | + $this->desktopBrowser = false; |
2427 | 2491 | $this->display_banners = false; |
2428 | 2492 | } |
2429 | 2493 | elseif (strstr($ua_low, "j-")) |
2430 | 2494 | { |
2431 | 2495 | // MML browser detected |
2432 | 2496 | $this->MMLstyle = true; |
2433 | | - $this->pureHTML = false; |
| 2497 | + $this->desktopBrowser = false; |
2434 | 2498 | $this->display_banners = false; |
2435 | 2499 | } |
2436 | | - elseif (strstr($ua_low, "lynx")) |
| 2500 | + elseif ($this->lynx == true) |
2437 | 2501 | { |
2438 | | - // text browser detected |
2439 | | - $this->lynx = true; |
| 2502 | + // lynx text browser |
2440 | 2503 | $this->css_enabled = true; // enabled in the meaning of silently discarding it ... |
2441 | | - $this->pureHTML = true; |
2442 | | - $this->display_banners = false; |
| 2504 | + $this->desktopBrowser = true; |
2443 | 2505 | $this->xhtmlmp_preferred_mime_type = "text/html"; |
2444 | 2506 | } |
2445 | 2507 | |
— | — | @@ -2461,9 +2523,7 @@ |
2462 | 2524 | $this->submitViaLink = true; // with some WAP devices it's quite difficult to submit WML forms |
2463 | 2525 | |
2464 | 2526 | // set alternative mime-type for some XHTML Mobile Profile devices |
2465 | | - if (strstr($HTTP_USER_AGENT, "(iPhone") || |
2466 | | - strstr($HTTP_USER_AGENT, "(iPod") || |
2467 | | - strstr($HTTP_USER_AGENT, "(Aspen Simulator")) |
| 2527 | + if ($this->iPhoneAlike == true) |
2468 | 2528 | $this->xhtmlmp_preferred_mime_type = "text/html"; |
2469 | 2529 | } |
2470 | 2530 | |
— | — | @@ -2486,7 +2546,7 @@ |
2487 | 2547 | { |
2488 | 2548 | // wireless device |
2489 | 2549 | |
2490 | | - $this->pureHTML = false; |
| 2550 | + $this->desktopBrowser = false; |
2491 | 2551 | $this->display_banners = false; |
2492 | 2552 | |
2493 | 2553 | if ($cap['markup']['xhtml_support_level'] >= 1) |
— | — | @@ -2549,7 +2609,7 @@ |
2550 | 2610 | else |
2551 | 2611 | { |
2552 | 2612 | // Tera-WURFL was not able to identify device |
2553 | | - $this->pureHTML = false; |
| 2613 | + $this->desktopBrowser = false; |
2554 | 2614 | $this->display_banners = false; |
2555 | 2615 | $this->ml = HAW_HTML; |
2556 | 2616 | $this->xhtml = true; |
— | — | @@ -2802,22 +2862,33 @@ |
2803 | 2863 | |
2804 | 2864 | |
2805 | 2865 | /** |
2806 | | - Adds some user-defined HAWHAW object to HAW_form |
2807 | | - @param udef Some user-defined object. |
2808 | | - @see HAW_deck::add_userdefined() |
| 2866 | + Adds some HAWHAW plugin object to HAW_form |
| 2867 | + @param plugin Some user-defined plugin object. |
| 2868 | + @see HAW_deck::add_plugin() |
2809 | 2869 | */ |
2810 | | - function add_userdefined($udef) |
| 2870 | + function add_plugin($plugin) |
2811 | 2871 | { |
2812 | | - if (!is_object($udef)) |
2813 | | - die("invalid argument in add_userdefined()"); |
| 2872 | + if (!is_object($plugin)) |
| 2873 | + die("invalid argument in add_plugin()"); |
2814 | 2874 | |
2815 | | - $this->element[$this->number_of_elements] = $udef; |
| 2875 | + $this->element[$this->number_of_elements] = $plugin; |
2816 | 2876 | |
2817 | 2877 | $this->number_of_elements++; |
2818 | 2878 | } |
2819 | 2879 | |
2820 | 2880 | |
2821 | 2881 | /** |
| 2882 | + Adds some user-defined HAWHAW object to HAW_form |
| 2883 | + @param udef Some user-defined object. |
| 2884 | + @deprecated use HAW_form::add_plugin() instead |
| 2885 | + */ |
| 2886 | + function add_userdefined($udef) |
| 2887 | + { |
| 2888 | + $this->add_plugin($udef); |
| 2889 | + } |
| 2890 | + |
| 2891 | + |
| 2892 | + /** |
2822 | 2893 | Adds a HAW_rule object to HAW_form. |
2823 | 2894 | @param rule Some HAW_rule object. |
2824 | 2895 | @see HAW_rule |
— | — | @@ -2940,7 +3011,7 @@ |
2941 | 3012 | printf("<form action=\"%s\"%s>\n", $this->url, $method); |
2942 | 3013 | |
2943 | 3014 | if ($deck->xhtml) |
2944 | | - echo "<div>\n"; // needed for validation |
| 3015 | + echo "<div id=\"hawform\">\n"; // needed for validation |
2945 | 3016 | } |
2946 | 3017 | // not necessary in WML, HDML and VoiceXML! |
2947 | 3018 | |
— | — | @@ -2976,7 +3047,7 @@ |
2977 | 3048 | case HAW_HIDDEN: |
2978 | 3049 | case HAW_RAW: |
2979 | 3050 | case HAW_RULE: |
2980 | | - case HAW_USERDEFINED: |
| 3051 | + case HAW_PLUGIN: |
2981 | 3052 | { |
2982 | 3053 | $form_element->create($deck); |
2983 | 3054 | break; |
— | — | @@ -3148,7 +3219,8 @@ |
3149 | 3220 | { |
3150 | 3221 | // HDML |
3151 | 3222 | |
3152 | | - $deck->hdmlcardset->add_display_content("<" . $deck->alignment . ">\n"); |
| 3223 | + if ($deck->alignment != "left") |
| 3224 | + $deck->hdmlcardset->add_display_content("<" . $deck->alignment . ">\n"); |
3153 | 3225 | |
3154 | 3226 | // print text |
3155 | 3227 | if ($this->text) |
— | — | @@ -3183,14 +3255,15 @@ |
3184 | 3256 | $this->boxcolor = "#000000"; // default: on black background |
3185 | 3257 | |
3186 | 3258 | if ($deck->css_enabled) |
3187 | | - printf("<div style=\"background-color:%s; margin:0px;\">\n", $this->boxcolor); |
| 3259 | + printf("<div id=\"hawtextbox\" style=\"background-color:%s; margin:0px;\">\n", |
| 3260 | + $this->boxcolor); |
3188 | 3261 | else |
3189 | 3262 | { |
3190 | 3263 | printf("<table border=\"0\" bgcolor=\"%s\" width=\"100%%\"><tr><td><font%s>\n", |
3191 | 3264 | $this->boxcolor, $deck->fontstyle_attrbs); |
3192 | 3265 | |
3193 | 3266 | // align text in (table-)box |
3194 | | - printf("<div align=\"%s\">\n", $deck->alignment); |
| 3267 | + printf("<div id=\"hawtextbox\" align=\"%s\">\n", $deck->alignment); |
3195 | 3268 | } |
3196 | 3269 | |
3197 | 3270 | // decrement line breaks because div/table already causes 1 br |
— | — | @@ -3480,7 +3553,8 @@ |
3481 | 3554 | { |
3482 | 3555 | // HDML |
3483 | 3556 | |
3484 | | - $deck->hdmlcardset->add_display_content("<" . $deck->alignment . ">\n"); |
| 3557 | + if ($deck->alignment != "left") |
| 3558 | + $deck->hdmlcardset->add_display_content("<" . $deck->alignment . ">\n"); |
3485 | 3559 | |
3486 | 3560 | if ($this->localsrc) |
3487 | 3561 | $icon = sprintf(" icon=\"%s\"", $this->localsrc); |
— | — | @@ -3527,9 +3601,14 @@ |
3528 | 3602 | else |
3529 | 3603 | { |
3530 | 3604 | // use HTML bitmap |
| 3605 | + |
| 3606 | + if ($deck->css_enabled) |
| 3607 | + $style = " style=\"vertical-align:middle; border-style:none\""; |
| 3608 | + else |
| 3609 | + $style = " align=\"middle\" border=\"0\""; |
3531 | 3610 | |
3532 | | - printf("<img src=\"%s\" alt=\"%s\"%s />\n", |
3533 | | - $this->src_html, HAW_specchar($this->alt, $deck), $size); |
| 3611 | + printf("<img src=\"%s\" alt=\"%s\"%s%s />", |
| 3612 | + $this->src_html, HAW_specchar($this->alt, $deck), $size, $style); |
3534 | 3613 | } |
3535 | 3614 | |
3536 | 3615 | // evaluate HTML break instruction |
— | — | @@ -4175,7 +4254,7 @@ |
4176 | 4255 | } |
4177 | 4256 | |
4178 | 4257 | // create HTML input |
4179 | | - if ($deck->xhtml || $deck->pureHTML) |
| 4258 | + if ($deck->xhtml || $deck->desktopBrowser) |
4180 | 4259 | { |
4181 | 4260 | printf("<label for=\"%s\">%s</label>\n", |
4182 | 4261 | $this->name, HAW_specchar($this->label, $deck)); |
— | — | @@ -4208,7 +4287,8 @@ |
4209 | 4288 | if ($this->type == HAW_INPUT_PASSWORD) |
4210 | 4289 | $options .= " NOECHO=\"true\""; |
4211 | 4290 | |
4212 | | - $display_content = "<" . $deck->alignment . ">\n"; |
| 4291 | + if ($deck->alignment != "left") |
| 4292 | + $display_content = "<" . $deck->alignment . ">\n"; |
4213 | 4293 | |
4214 | 4294 | $display_content .= HAW_specchar($this->label, $deck); |
4215 | 4295 | $display_content .= "\n"; |
— | — | @@ -4410,7 +4490,8 @@ |
4411 | 4491 | |
4412 | 4492 | $options = " key=\"$this->name\""; |
4413 | 4493 | |
4414 | | - $display_content = "<" . $deck->alignment . ">\n"; |
| 4494 | + if ($deck->alignment != "left") |
| 4495 | + $display_content = "<" . $deck->alignment . ">\n"; |
4415 | 4496 | |
4416 | 4497 | $display_content .= HAW_specchar($this->label, $deck); |
4417 | 4498 | $display_content .= "\n"; |
— | — | @@ -4470,7 +4551,7 @@ |
4471 | 4552 | { |
4472 | 4553 | $this->name = $name; |
4473 | 4554 | $this->type = $type; |
4474 | | - $this->value = false; |
| 4555 | + $this->value = ""; |
4475 | 4556 | $this->number_of_options = 0; |
4476 | 4557 | $this->voice_text = HAW_VOICE_ENUMERATE; |
4477 | 4558 | $this->voice_audio_src = ""; |
— | — | @@ -4494,7 +4575,8 @@ |
4495 | 4576 | |
4496 | 4577 | $this->options[$this->number_of_options]["label"] = $label; |
4497 | 4578 | $this->options[$this->number_of_options]["value"] = $value; |
4498 | | - |
| 4579 | + $this->options[$this->number_of_options]["is_selected"] = $is_selected; |
| 4580 | + |
4499 | 4581 | if ((strlen($this->value) == 0) || ($is_selected == HAW_SELECTED)) |
4500 | 4582 | $this->value = $value; |
4501 | 4583 | |
— | — | @@ -4590,7 +4672,7 @@ |
4591 | 4673 | { |
4592 | 4674 | // create HTML select |
4593 | 4675 | |
4594 | | - if ($deck->xhtml || $deck->pureHTML) |
| 4676 | + if ($deck->xhtml || $deck->desktopBrowser) |
4595 | 4677 | { |
4596 | 4678 | // dummy label for select element (needed for Bobby approval) |
4597 | 4679 | // object to be enhanced in future versions ... |
— | — | @@ -4602,7 +4684,7 @@ |
4603 | 4685 | |
4604 | 4686 | for ($i=0; $i < $this->number_of_options; $i++) |
4605 | 4687 | { |
4606 | | - if ($this->options[$i]["value"] == $this->value) |
| 4688 | + if ($this->options[$i]["is_selected"] == HAW_SELECTED) |
4607 | 4689 | $state = " selected=\"selected\""; |
4608 | 4690 | else |
4609 | 4691 | $state = ""; |
— | — | @@ -4765,7 +4847,8 @@ |
4766 | 4848 | |
4767 | 4849 | $this->buttons[$this->number_of_buttons]["label"] = $label; |
4768 | 4850 | $this->buttons[$this->number_of_buttons]["value"] = $value; |
4769 | | - |
| 4851 | + $this->buttons[$this->number_of_buttons]["is_checked"] = $is_checked; |
| 4852 | + |
4770 | 4853 | if ((strlen($this->value) == 0) || ($is_checked == HAW_CHECKED)) |
4771 | 4854 | $this->value = $value; |
4772 | 4855 | |
— | — | @@ -4863,12 +4946,12 @@ |
4864 | 4947 | |
4865 | 4948 | while (list($key, $val) = each($this->buttons)) |
4866 | 4949 | { |
4867 | | - if ($val["value"] == $this->value) |
| 4950 | + if ($val["is_checked"] == HAW_CHECKED) |
4868 | 4951 | $state = "checked=\"checked\""; |
4869 | 4952 | else |
4870 | 4953 | $state = ""; |
4871 | 4954 | |
4872 | | - if ($deck->xhtml || $deck->pureHTML) |
| 4955 | + if ($deck->xhtml || $deck->desktopBrowser) |
4873 | 4956 | { |
4874 | 4957 | printf("<input type=\"radio\" name=\"%s\" id=\"%s\" %s value=\"%s\" />", |
4875 | 4958 | $this->name, $this->name . $key, $state, $val["value"]); |
— | — | @@ -5120,7 +5203,7 @@ |
5121 | 5204 | |
5122 | 5205 | $state = ($this->is_checked() ? "checked=\"checked\"" : ""); |
5123 | 5206 | |
5124 | | - if ($deck->xhtml || $deck->pureHTML) |
| 5207 | + if ($deck->xhtml || $deck->desktopBrowser) |
5125 | 5208 | { |
5126 | 5209 | printf("<input type=\"checkbox\" name=\"%s\" id=\"%s\" %s value=\"%s\" />", |
5127 | 5210 | $this->name, $this->name, $state, $this->value); |
— | — | @@ -5467,6 +5550,7 @@ |
5468 | 5551 | var $title; |
5469 | 5552 | var $accesskey; // "1", "2", ... "0", "*", "#" |
5470 | 5553 | var $css_class; |
| 5554 | + var $image; |
5471 | 5555 | var $br; |
5472 | 5556 | var $voice_text; |
5473 | 5557 | var $voice_audio_src; |
— | — | @@ -5490,6 +5574,7 @@ |
5491 | 5575 | $this->accesskey = HAW_NO_ACCESSKEY; // no accesskey assigned |
5492 | 5576 | // can be assigned later e.g. from HAW_linkset object if required |
5493 | 5577 | $this->css_class = ""; |
| 5578 | + $this->image = false; |
5494 | 5579 | $this->br = 1; // default: 1 line break after text |
5495 | 5580 | $this->voice_text = $label; |
5496 | 5581 | $this->voice_audio_src = ""; |
— | — | @@ -5498,6 +5583,16 @@ |
5499 | 5584 | } |
5500 | 5585 | |
5501 | 5586 | /** |
| 5587 | + Adds an image that is to be displayed on the left side of the link. |
| 5588 | + @param image HAW_image object that contains the image/icon |
| 5589 | + @see HAW_image |
| 5590 | + */ |
| 5591 | + function add_image($image) |
| 5592 | + { |
| 5593 | + $this->image = $image; |
| 5594 | + } |
| 5595 | + |
| 5596 | + /** |
5502 | 5597 | Sets a css class for this object in a (X)HTML page. |
5503 | 5598 | @param css_class CSS class to be defined in the deck's central CSS file |
5504 | 5599 | */ |
— | — | @@ -5619,7 +5714,7 @@ |
5620 | 5715 | |
5621 | 5716 | $title_option = ""; |
5622 | 5717 | |
5623 | | - if ($this->title && ($deck->xhtml || $deck->lynx || $deck->pureHTML)) |
| 5718 | + if ($this->title && ($deck->xhtml || $deck->lynx || $deck->desktopBrowser)) |
5624 | 5719 | $title_option = sprintf(" title=\"%s\"", HAW_specchar($this->title, $deck)); |
5625 | 5720 | |
5626 | 5721 | $accesskey_option = ""; |
— | — | @@ -5641,10 +5736,23 @@ |
5642 | 5737 | printf("<span class=\"%s\">\n", $this->css_class); |
5643 | 5738 | } |
5644 | 5739 | |
5645 | | - printf("[<a href=\"%s\"%s%s>%s</a>]%s\n", |
5646 | | - HAW_specchar($this->url, $deck), $title_option, $accesskey_option, |
5647 | | - HAW_specchar($this->label, $deck), $br); |
| 5740 | + if ($deck->link_brackets == true) |
| 5741 | + echo "["; |
| 5742 | + |
| 5743 | + printf("<a href=\"%s\"%s%s>", |
| 5744 | + HAW_specchar($this->url, $deck), $title_option, $accesskey_option); |
5648 | 5745 | |
| 5746 | + if (is_object($this->image)) |
| 5747 | + // image available for this link, let it create itself |
| 5748 | + $this->image->create($deck); |
| 5749 | + |
| 5750 | + printf("%s</a>", HAW_specchar($this->label, $deck)); |
| 5751 | + |
| 5752 | + if ($deck->link_brackets == true) |
| 5753 | + echo "]"; |
| 5754 | + |
| 5755 | + printf("%s\n", $br); |
| 5756 | + |
5649 | 5757 | if ($deck->css_enabled && $this->css_class) |
5650 | 5758 | { |
5651 | 5759 | echo "</span>\n"; |
— | — | @@ -5666,9 +5774,13 @@ |
5667 | 5775 | for ($i=0; $i < $this->br; $i++) |
5668 | 5776 | $br .= "<br/>"; |
5669 | 5777 | |
5670 | | - printf("<a%s href=\"%s\">%s</a>%s\n", |
5671 | | - $title_option, HAW_specchar($this->url, $deck), |
5672 | | - HAW_specchar($this->label, $deck), $br); |
| 5778 | + printf("<a%s href=\"%s\">", $title_option, HAW_specchar($this->url, $deck)); |
| 5779 | + |
| 5780 | + if (is_object($this->image)) |
| 5781 | + // image available for this link, let it create itself |
| 5782 | + $this->image->create($deck); |
| 5783 | + |
| 5784 | + printf("%s</a>%s\n", HAW_specchar($this->label, $deck), $br); |
5673 | 5785 | } |
5674 | 5786 | |
5675 | 5787 | elseif ($deck->ml == HAW_HDML) |
— | — | @@ -5690,6 +5802,10 @@ |
5691 | 5803 | $br = ""; |
5692 | 5804 | for ($i=0; $i < $this->br; $i++) |
5693 | 5805 | $br .= "<br>"; |
| 5806 | + |
| 5807 | + if (is_object($this->image) && (strlen($this->label) == 0)) |
| 5808 | + // workaround for (non-displayable) images and non-existing labels |
| 5809 | + $this->label = $this->image->alt; |
5694 | 5810 | |
5695 | 5811 | $content = sprintf("<a task=\"go\" dest=\"%s\"%s%s>%s</a>%s\n", |
5696 | 5812 | HAW_specchar($this->url, $deck), |
— | — | @@ -5782,6 +5898,7 @@ |
5783 | 5899 | var $isPOTS; // Plain Old Telephony System |
5784 | 5900 | var $title; |
5785 | 5901 | var $accesskey; // "1", "2", ... "0", "*", "#" |
| 5902 | + var $image; |
5786 | 5903 | var $br; |
5787 | 5904 | var $voice_text; |
5788 | 5905 | var $voice_audio_src; |
— | — | @@ -5812,6 +5929,7 @@ |
5813 | 5930 | |
5814 | 5931 | $this->title = $title; |
5815 | 5932 | $this->accesskey = HAW_NO_ACCESSKEY; |
| 5933 | + $this->image = false; |
5816 | 5934 | $this->br = 1; // default: 1 line break |
5817 | 5935 | $this->voice_text = $destination; |
5818 | 5936 | $this->voice_audio_src = ""; |
— | — | @@ -5820,6 +5938,16 @@ |
5821 | 5939 | } |
5822 | 5940 | |
5823 | 5941 | /** |
| 5942 | + Adds an image that is to be displayed on the left side of the phone link. |
| 5943 | + @param image HAW_image object that contains the image/icon |
| 5944 | + @see HAW_image |
| 5945 | + */ |
| 5946 | + function add_image($image) |
| 5947 | + { |
| 5948 | + $this->image = $image; |
| 5949 | + } |
| 5950 | + |
| 5951 | + /** |
5824 | 5952 | Sets the number of line breaks (CRLF) after phone link. (default: 1) |
5825 | 5953 | @param br Some number of line breaks. |
5826 | 5954 | */ |
— | — | @@ -5908,13 +6036,13 @@ |
5909 | 6037 | else |
5910 | 6038 | $dest = $this->destination; |
5911 | 6039 | } |
5912 | | - elseif ($deck->MMLstyle) { |
| 6040 | + elseif ($deck->MMLstyle || $deck->iPhoneAlike) { |
5913 | 6041 | if ($this->isPOTS) |
5914 | 6042 | $dest = "tel:" . $this->destination; |
5915 | 6043 | else |
5916 | 6044 | $dest = $this->destination; |
5917 | 6045 | } |
5918 | | - elseif ($deck->pureHTML) { |
| 6046 | + elseif ($deck->desktopBrowser) { |
5919 | 6047 | if ($this->isPOTS) |
5920 | 6048 | $dest = "callto:" . $this->destination; |
5921 | 6049 | else |
— | — | @@ -5929,8 +6057,22 @@ |
5930 | 6058 | $dest = $this->destination; |
5931 | 6059 | } |
5932 | 6060 | |
5933 | | - printf("[<a href=\"%s\"%s>%s</a>]%s\n", |
5934 | | - $dest, $title_option, HAW_specchar($this->label, $deck), $br); |
| 6061 | + if ($deck->link_brackets == true) |
| 6062 | + echo "["; |
| 6063 | + |
| 6064 | + printf("<a href=\"%s\"%s>", $dest, $title_option); |
| 6065 | + |
| 6066 | + if (is_object($this->image)) |
| 6067 | + // image available for this link, let it create itself |
| 6068 | + $this->image->create($deck); |
| 6069 | + |
| 6070 | + printf("%s</a>", HAW_specchar($this->label, $deck)); |
| 6071 | + |
| 6072 | + if ($deck->link_brackets == true) |
| 6073 | + echo "]"; |
| 6074 | + |
| 6075 | + printf("%s\n", $br); |
| 6076 | + |
5935 | 6077 | } |
5936 | 6078 | elseif ($deck->ml == HAW_WML) |
5937 | 6079 | { |
— | — | @@ -5951,8 +6093,13 @@ |
5952 | 6094 | else |
5953 | 6095 | $dest = $this->destination; |
5954 | 6096 | |
5955 | | - printf("<a href=\"%s\"%s>%s</a>%s\n", $dest, $title_option, |
5956 | | - HAW_specchar($this->label, $deck), $br); |
| 6097 | + printf("<a href=\"%s\"%s>", $dest, $title_option); |
| 6098 | + |
| 6099 | + if (is_object($this->image)) |
| 6100 | + // image available for this link, let it create itself |
| 6101 | + $this->image->create($deck); |
| 6102 | + |
| 6103 | + printf("%s</a>%s\n", HAW_specchar($this->label, $deck), $br); |
5957 | 6104 | } |
5958 | 6105 | elseif ($deck->ml == HAW_HDML) |
5959 | 6106 | { |
— | — | @@ -6179,7 +6326,7 @@ |
6180 | 6327 | { |
6181 | 6328 | // create links inside a frame |
6182 | 6329 | |
6183 | | - echo "<div style=\"padding: 5px;\">\n"; |
| 6330 | + echo "<div id=\"hawlinkset\" style=\"padding: 5px;\">\n"; |
6184 | 6331 | |
6185 | 6332 | if ($deck->lynx) |
6186 | 6333 | { |
— | — | @@ -6282,7 +6429,7 @@ |
6283 | 6430 | $pageContent = new HAW_text("Here comes some content ..."); |
6284 | 6431 | $myPage->add_text($pageContent); |
6285 | 6432 | $myHtmlCode = "<p>Here comes an adblock for html devices ...</p>"; |
6286 | | - $myAdBlock = new HAW_raw(HAW_HTML, $myHtmlCode); |
| 6433 | + $myAdblock = new HAW_raw(HAW_HTML, $myHtmlCode); |
6287 | 6434 | $myPage->add_raw($myAdblock); |
6288 | 6435 | $myPage->create_page(); |
6289 | 6436 | </pre> |
— | — | @@ -6478,7 +6625,8 @@ |
6479 | 6626 | // HDML devices doesn't understand <hr> |
6480 | 6627 | // ==> draw some number of hyphens to create a rule |
6481 | 6628 | |
6482 | | - $deck->hdmlcardset->add_display_content("<" . $deck->alignment . ">\n"); |
| 6629 | + if ($deck->alignment != "left") |
| 6630 | + $deck->hdmlcardset->add_display_content("<" . $deck->alignment . ">\n"); |
6483 | 6631 | |
6484 | 6632 | $deck->hdmlcardset->add_display_content("----------\n<br>\n"); |
6485 | 6633 | } |
Index: trunk/wap/hawpedia.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | $deck->set_width(HAWIKI_DISP_WIDTH); |
33 | 33 | $deck->set_height(HAWIKI_DISP_HEIGHT); |
34 | 34 | $deck->set_disp_bgcolor(HAWIKI_DISP_BGCOLOR); |
35 | | -// $deck->use_simulator(HAWIKI_SKIN); |
| 35 | + $deck->use_simulator(HAWIKI_SKIN); |
36 | 36 | } |
37 | 37 | |
38 | 38 | function hawpedia_error($error_msg) |
Index: trunk/wap/transcode.php |
— | — | @@ -55,6 +55,7 @@ |
56 | 56 | $wikitext = remove_controls($wikitext); |
57 | 57 | |
58 | 58 | // replace html entities |
| 59 | +$wikitext = str_replace(" ", " ", $wikitext); // shows '?' on Safari/iPhone |
59 | 60 | // throws warning PHP4: http://bugs.php.net/bug.php?id=25670 |
60 | 61 | $wikitext = @html_entity_decode($wikitext, ENT_QUOTES, 'UTF-8'); |
61 | 62 | |
Index: trunk/wap/hawiki/hawiki_cfg.inc |
— | — | @@ -12,6 +12,6 @@ |
13 | 13 | define("HAWIKI_DATETIME_SHORT", "d/m/Y [H:i]"); // for modifications see PHP function date() |
14 | 14 | define("HAWIKI_DATETIME_LONG", "l, F jS Y, g:i A"); |
15 | 15 | define("HAWIKI_EXTLINK_ICON", "images/external_link"); // must exist as .gif and .wbmp version |
16 | | -define("HAWIKI_SKIN", "hawhaw/skin/hawpedia_phone/skin.css"); // comment out to disable skin |
| 16 | +define("HAWIKI_SKIN", HAW_SIM_NONE); // do NOT use any simulator |
17 | 17 | |
18 | 18 | ?> |
Index: trunk/wap/hawiki/hawiki.inc |
— | — | @@ -140,8 +140,8 @@ |
141 | 141 | $this->deck->set_height(HAWIKI_DISP_HEIGHT); |
142 | 142 | $this->deck->set_disp_bgcolor(HAWIKI_DISP_BGCOLOR); |
143 | 143 | |
144 | | - //if (defined('HAWIKI_SKIN')) |
145 | | - // $this->deck->use_simulator(HAWIKI_SKIN); |
| 144 | + if (defined('HAWIKI_SKIN')) |
| 145 | + $this->deck->use_simulator(HAWIKI_SKIN); |
146 | 146 | |
147 | 147 | if (isset($lang) && (strlen($lang) == 2)) |
148 | 148 | { |