class wescoLink extends normalLink
{
+ public static function _getURL($to)
+ {
+ return self::_getURLOfType('wesco', $to);
+ }
public function getURL()
{
- return 'https://workshop.fluidbook.com/services/wescoRef?ref=' . $this->to;
+ return self::_getURL($this->to);
}
+ protected static function _getURLOfType($type, $ref)
+ {
+ global $core;
+ $r = $core->con->select("SELECT * FROM wsref WHERE ref='" . $core->con->escape($ref) . "' AND type='" . $core->con->escape($type) . "'");
+ if ($r->count()) {
+ return $r->url;
+ }
+ return 'https://workshop.fluidbook.com/services/wsref?ref=' . urlencode($type . '|' . $ref);
+ }
+
+
public function getTarget()
{
return '_blank';
}
+ public function getDefaultTooltip()
+ {
+ return 'click to open the link';
+ }
+
}
class pierronLink extends normalLink
}
$type = trim($e[0]);
$ref = trim($e[1]);
-
- $r = $core->con->select("SELECT * FROM wsref WHERE ref='" . $core->con->escape($ref) . "' AND type='" . $core->con->escape($type) . "'");
- if ($r->count()) {
- return $r->url;
- }
- return 'https://workshop.fluidbook.com/services/wsref?ref=' . urlencode($type . '|' . $ref);
- }
-
- public function getURL()
- {
- return self::_getURL($this->to);
+ return self::_getURLOfType($type, $ref);
}
public function getDefaultTooltip()