Mod Name: ISO and German Date Format 1.0<br />
Description: Admins can switch to ISO (YYYY-MM-DD hh:mm) or German (DD.MM.YYYY hh:mm) date format<br />
Working under: at least 5.4.1 and 6.1.1 <br />
Any pre-requisites: none<br />
Author(s): nòóx (Hannes Schmiderer)<br />
Credits: Rick, for the code, which made it so easy to add it ;-)<br />
Demo: www.dh-rangers.com (currently 5.4.1) and
www.nooxnet.com/ubbthreads.php (6.1.1) <br />
Files Altered:<br />- theme.inc.php (optionally)<br />- ubbt.inc.php<br />- admin/edittheme.php<br />
Database Altered: no<br />
New Files: none<br />
Any other info:<br />I think this should be included in some further release. The standardized ISO date format is interesting for multilingual boards. And there are some German boards where the other date formats do not really fit.<br /><br />theme.inc.php (end of file)<pre><font class="small">code:</font><hr><br /><br />// Which Time format to use<br />// short1 = 'MM/DD/YY 10:19 AM';<br />// short2 = 'DD/MM/YY 10:19 AM';<br />// short3 = 'YY/MM/DD 10:19 AM';<br />// short4 = 'YYYY/MM/DD 22:43';<br />// german = 'DD.MM.YYYY 22:43';<br />// iso = 'YYYY-MM-DD 22:43';</pre><hr><br /><br />ubbt.inc.php (function convert_time)<pre><font class="small">code:</font><hr><br />look for:<br /> function convert_time($time="",$offset="") {<br />add:<br /> elseif ($theme['timeformat'] == "iso") {<br /> $time = date("Y-m-d H:i", $time);<br /> }<br /> elseif ($theme['timeformat'] == "german") {<br /> $time = date("d.m.Y H:i", $time);<br /> }</pre><hr><br /><br />admin/edittheme.php<pre><font class="small">code:</font><hr><br />look for:<br /> if ($theme[timeformat] == "long")<br />add:<br /> elseif ($theme[timeformat] == "iso") {<br /> $mod_iso = "SELECTED";<br /> }<br /> elseif ($theme[timeformat] == "german") {<br /> $mod_german = "SELECTED";<br /> }<br /></pre><hr><br /><pre><font class="small">code:</font><hr><br />look for:<br /> <select name=timeformat class=formboxes><br />add:<br /> <option value=\"iso\" $mod_iso>YYYY-MM-DD 22:19<br /> <option value=\"german\" $mod_german>DD.MM.YYYY 22:19</pre><hr><br /><br />