Clear4Amiga or Clear code for Amiga is plugin intended to clear HTML code generated with Joomla!, to strip codes not compatible with HTML 3.2 or HTML 4.0.
Plugin will clear code only for selected Web browsers so data will be altered only for e.g. older or mobile browsers.
In combination with compatible template same site and same articles can be CSS formated for modern browsers and converted to HTML 3 for ancient browsers.

Plugin sould work with Joomla! 2.5.x (1.6, 1.7), up to version 3.x.
This system plugin should be last in the list so it can filter final HTML codes.


Clear for Amiga

Settings have one text field and several radio buttons.

Clear for Amiga

In text field strings, or substrings of HTTP user agents should be written each in own row.
For example

Amiga-AWeb
IBrowse
AmigaVoyager

will filter page only if request is send from selected browser.

For HTTP user agent strings look at:
http://www.useragentstring.com/pages/Browserlist/
http://www.siteware.ch/webresources/useragents/db.html
http://www.zytrax.com/tech/web/browser_ids.htm


Replace accent chars will replace some UTF8 chars with similar ASCII char
(À, Á, Â, Ã -> A,  Č, Ć -> C,...)

Delete script tags will remove all <script> .. </script> parts from code.

Delete style tags will remove all <style> .. </style> parts from code.

Delete object tags will remove all <object> .. </object> parts from code.

Delete applet tags will remove all <applet> .. </applet> parts from code.

Delete meta tags will remove all <meta> .. </meta> parts from code.

Delete link tags will remove all <link> .. </link> parts from code.

Strip empty lines will remove all empty lines.

Delete inline styles will remove all inline style parts from other tags (style=" .. ").

Delete cdata will remove all <![CDATA[ .. ]]> parts from code.
Pay extra attention to this one! Sometimes it will delete <!DOCTYPE.

Delete other is for future cleanings (and may do nothing right now).


Template used with this plugin can look like this:

<?php if(!(strpos($_SERVER["HTTP_USER_AGENT"],'Amiga')===false)) {
  $amiga_os=true;
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ...
<html lang="en">

...

</html>

<?php
 }
else
 {
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitio...
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang=...
<head>

...
 



If value of HTTP_USER_AGENT contains 'Amiga' then first html code will be shown.
If not then other template will be used.
And then with plugin strip all unwanted codes (scripts, styles...)
Resulting page will be matching for web browser.