Hi Samuel, *,

2010/12/6 Samuel Gómez <fuljen...@gmail.com>:
> On Mon, Dec 6, 2010 at 9:13 PM, Christian Lohmaier
> <lohmaier+ooofut...@googlemail.com> wrote:
>> 2010/12/6 Samuel Gómez <fuljen...@gmail.com>:
>>> On Mon, Dec 6, 2010 at 5:24 PM, Carlos Jenkins <hastciber...@gmail.com> 
>>> wrote:
>> [...]
> Whether is
> http://pumbaa.ooodev.org:7780/home/download-and-sub/
> the source or the target of the changes,

Both. pumbaa.ooodev.org:7780 is the staging area for modifcations of
the CMS - stuff in the core will be changed/modified there before
they're pushed to the git repo and before those changes end up on
test.libreoffice.org.

So when the detection doesn't work for some browser/OS, please change
the JS used by the above page, I'll then update it on pumbaa and later
then on the test.libreoffice.org site.

> I advance that I'm not yet
> familiarized with that code. I see it auto-detects things client-side
> but I've not been able to locate the magic yet.

Well - it is basic javascript (the detection, the modification of the
controls also makes use of jquery).

>> I'll commit it to the git repo at https://github.com/tdf/cms-code
>> later today and also push it  to the live site.

The changes are pushed:

Code that creates the data for further processing by the template (i.e
code that parses the rsync output):
https://github.com/tdf/cms-code/blob/master/mysite/code/DownloadPage.php

The javascript that is used for OS/language detection and handles the
interaction (expanding/collapsing the full list below the convenience
dropdowns, handles the BT toggle):
https://github.com/tdf/cms-code/blob/master/mysite/javascript/download.js

The actual template that assembles the page:
https://github.com/tdf/cms-themes/blob/master/tdf/templates/Layout/DownloadPage.ss

note the <% cached "rsync", RsyncRefresh %> .... <% end_cached %>
block - stuff therein is only evaluated when the arguments ("rsync" -
a static string, thus never triggers a change by itself) and the
function RsyncRefresh return a different value than the last time the
page was requested/assembled.

This partial caching is the first, most basic level of caching that
silverstripe can do. Thus when the load on the server is OK, just
using this kind of caching would make it possible to do some
server-based OS/lanaguage detection (by putting that outside of the
cached block).

> Excuse me. I will not be able to read your answer until tomorrow (+10 hours).

No problem, I'm more than happy that people are trying to help out :-)

ciao
Christian

-- 
Unsubscribe instructions: E-mail to website+h...@libreoffice.org
List archive: http://www.libreoffice.org/lists/website/
*** All posts to this list are publicly archived for eternity ***

Reply via email to