1 *** syntax.php 2009-02-09 17:08:04.000000000 +0200
2 --- syntax_t-verssion.php 2010-04-30 12:11:50.000000000 +0300
6 $link['class'] = 'media';
8 ! //Format the link for smb (Linux or Win-Firefox)
9 //Just replace all \ with / to get something like smb://host/path/to/file
10 ! $smburl='smb:' . str_replace('\\', '/', $url);
11 ! //If we're using linux, then smb:// protocol works fine.
12 ! if (strstr($_SERVER['HTTP_USER_AGENT'], 'Linux')) {
15 ! //If we're not on linux, we might be using IE, so...
16 ! //Replace the \\ with the file:/// protocol and put the \\ back in
17 ! $url = str_replace('\\\\', 'file:///\\\\', $url);
18 ! //Use javascript to change the link in Firefox to the smb url.
20 ! 'onclick="if(document.all == null){' .
21 ! "parent.location='".$smburl."';" .
23 ! 'onkeypress="if(document.all == null){' .
24 ! "parent.location='".$smburl."';" .
32 $link['class'] = 'media';
35 //Just replace all \ with / to get something like smb://host/path/to/file
36 ! $smburl='smb:' . str_replace('\\', '/', $url);
37 ! //Replace the \\ with the file:/// protocol and put the \\ back in
38 ! $url = str_replace('\\\\', 'file:///\\\\', $url);
39 ! //Use javascript to change the link in other browsers then IE to the smb url.
41 ! 'onclick="if(!(/Internet Explorer/.test(navigator.appName))){' .
42 ! " window.location.href='".$smburl."';" .
44 ! 'onkeypress="if(!(/Internet Explorer/.test(navigator.appName))){' .
45 ! " window.location.href='".$smburl."';" .