On 9 Mar 2008, at 21:12, Florian Effenberger wrote:

Hi,

Are you able to do changes to the download pages?

can you give me the exact URL that needs to be changed?

http://download.openoffice.org/ part of the new auto os detection.



The following OSes are currently available:
macosxintel
macosxppc
There never has been an os macwjre available through the bouncer and I doubt there ever will be.

So, where is macwjre linked?


Looking at the source code it appears to be the getPlatform() function in the javascript that needs to be updated. Hrm, looking further into the code it appears that there has been a wrong assumption made, in that every platform has a jre. It also hard codes in the fact that there are no regional Englishes. It's time that there was some regional language teams for the regional Englishes. The other page http://download.openoffice.org/other.html#en-US still goes to the mac port page.

<p class="nonscreen"><a name="content">start:</a></p>


<div class="optionset">

<script type="text/javascript">
<!--
document.write( "<div class=\"optionitem\" id=\"optionitem1\" onclick=\"openItem('optionitem1','" + getLink( VERSION ) + "');return false;\">" );
  if ( hasBouncerLink() ) {
    document.write( "<h2><a href='"
      + getLink( VERSION ) + "'"
      + ">Download OpenOffice.org</a></h2>"
+ "<p class=\"footer\">Click to start downloading OpenOffice.org " + VERSION + " for " + getPlatform() + ", (" + getLanguage() + " version)</p>" );
  } else {
    document.write( "<h2><a href='"
      + getLink( VERSION ) + "'"
      + ">Download OpenOffice.org</a></h2>"
+ "<p class=\"footer\">OpenOffice.org " + VERSION + " for " + getPlatform() + ", " + getLanguage() + "</p>" );
  }
  document.write( "</div>" );
document.write( "<div class=\"optionitem\" id=\"optionitemother\" onClicks=\"openItem('optionitemother','other.html#" + getLanguageISO() + "');return false;\">" ); document.write( "<a title='get other laguages and platforms to download' href='other.html#" + getLanguageISO() + "'>Get more platforms and languages</a>," ); document.write( " <a title='Order CD-ROM' href='http://distribution.openoffice.org/cdrom/index.html#cdrom' >order CD-ROM</a> or" ); document.write( " <a title='P2P downloads' href='http://distribution.openoffice.org/p2p/' >P2P downloads</a>" );
  document.write( "</div>" );
  //-->
  </script>
  <noscript>
    <div class="optionitem" id="optionitem1">
    <h2>Download OpenOffice.org</h2>

    You need Javascript enabled to take full advantage of this download
section for various mirror sites. You don't seem to have it enabled. Please use our <a href="other.html">get more platforms and languages</a>.
    </div>
  </noscript>

In http://download.openoffice.org/download2.js

The function getPlatformForBouncer need the 3 if's changed to return the following values:

} else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "Intel" ) != -1 ) {
                        return "macosxintel";
} else if ( navigator.platform.indexOf( "Mac" ) != -1 && navigator.platform.indexOf( "PPC" ) != -1 ) {
                        return "macosxppc";
                } else if ( navigator.platform.indexOf( "Mac" ) != -1 ) {
                        return "macosxintel"; // This is the most common so 
lets guess
                } else


Unfortunately this code will require more work as it appears to assume that platform has a jre!!!!! As per this function:
/*
 * get flag for bouncer link
 * depends on array-list
 */
function getLink( version ) {
        var a = getArray();

        if ( a[3] == 'y' ) {
                // use OSUOSL-bouncer link
return "http://openoffice.bouncer.osuosl.org/?product=OpenOffice.org&os= " + getPlatformForBouncer() + "wjre&lang=" + getLanguageISO() + "&version=" + version;
        } else {
                // use direct link
                return a[2];
        }
}


Shaun


Reply via email to