diff --git a/ExternalLink/NextcloudLink.php b/ExternalLink/NextcloudLink.php
new file mode 100644
index 0000000..1ea0acd
--- /dev/null
+++ b/ExternalLink/NextcloudLink.php
@@ -0,0 +1,37 @@
+httpClient->get($this->url);
+
+ if (preg_match('/
(.*)<\/title>/siU', $html, $matches)) {
+ return trim($matches[1]);
+ }
+
+ $components = parse_url($this->url);
+
+ if (! empty($components['host']) && ! empty($components['path'])) {
+ return $components['host'].$components['path'];
+ }
+
+ return t('Title not found');
+ }
+}
diff --git a/ExternalLink/NextcloudLinkProvider.php b/ExternalLink/NextcloudLinkProvider.php
new file mode 100644
index 0000000..1877d22
--- /dev/null
+++ b/ExternalLink/NextcloudLinkProvider.php
@@ -0,0 +1,77 @@
+ t('Related'),
+ );
+ }
+
+ /**
+ * Return true if the provider can parse correctly the user input
+ *
+ * @access public
+ * @return boolean
+ */
+ public function match()
+ {
+ $startWithHttp = strpos($this->userInput, 'http://') === 0 || strpos($this->userInput, 'https://') === 0;
+ $validUrl = filter_var($this->userInput, FILTER_VALIDATE_URL);
+
+ return $startWithHttp && $validUrl;
+ }
+
+ /**
+ * Get the link found with the properties
+ *
+ * @access public
+ * @return \Kanboard\Core\ExternalLink\ExternalLinkInterface
+ */
+ public function getLink()
+ {
+ $link = new WebLink($this->container);
+ $link->setUrl($this->userInput);
+
+ return $link;
+ }
+}
diff --git a/Plugin.php b/Plugin.php
index a3e978e..6cfccc1 100644
--- a/Plugin.php
+++ b/Plugin.php
@@ -34,7 +34,7 @@ public function initialize()
//$this->route->addRoute('/ / ', ' ', ' ', 'TaskLinker');
// Register New Link Provider
- $this->externalLinkManager->register(new MyLinkProvider($this->container));
+ $this->externalLinkManager->register(new NextcloudLinkProvider($this->container));
}
public function onStartup()