Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-Platform-Links #5

Open
inos-github opened this issue Aug 4, 2016 · 2 comments
Open

Cross-Platform-Links #5

inos-github opened this issue Aug 4, 2016 · 2 comments

Comments

@inos-github
Copy link

inos-github commented Aug 4, 2016

As the generated links are windows only, a cross-platform solution would be preferable.
I found a suggestion here:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>The Tudors</title>
    <meta http-equiv="refresh" content="0;URL='http://thetudors.example.com/'" />
  </head>
  <body>
    <p>This page has moved to a <a href="http://thetudors.example.com/">
      theTudors.example.com</a>.</p>
  </body>
</html>

Another benefit: no additional mime type necessary so this would solve Bug #3

@otetard
Copy link
Owner

otetard commented Aug 4, 2016

Thanks for the tip, I’ll have a look at it.

Concerning the MIME Type, this file-format won’t help since it’s mainly used to “attach” the action of opening the pad/calc to a specific file: js/ownpad.js.

Olivier;

@inos-github
Copy link
Author

Hi Olivier,
I tried this by myself and have a solution that works for me:
in ajax/newpad.php substitute line 105
$content = sprintf("[InternetShortcut]\nURL=%s", $url);
with:

$content = sprintf('<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>ownPad</title>
    <meta http-equiv="refresh" content="0;URL=\'%s\'" />
  </head>
  <body>
    <p>call to <a href="%s">
      %s</a>.</p>
  </body>
</html>', $url, $url, $padname);

and in controller/displaycontroller.php change line 73
preg_match('/URL=(.*)$/', $content, $matches);
to
preg_match("/URL='(.*)'/", $content, $matches);

The files/links should work on all platforms (on mobile with "send to")

Martin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants