}
-
+
/**
* create an email from file.
* these must have been set first.
/* thumbnails */
+
// $this->createThumbnail(0,50);
return true;
/// ctrl not used??
function onUpload($roo)
{
-
+// echo $_FILES['imageUpload']['type'];exit;
if (empty($_FILES['imageUpload']['tmp_name']) ||
empty($_FILES['imageUpload']['name']) ||
empty($_FILES['imageUpload']['type'])
}
$c = clone($this);
- $c->ontable = $obj->tableName();
+ $c->whereAddIn($this->tableName() . '.ontable', array( $obj->tableName(), $obj->__table) , 'string');
$c->onid = $obj->id;
$c->autoJoin();
if (!empty($mime_like)) {
}
-
+
+ /**
+ *
+ * #2142 [new] CMS - image link urls
+ *
+ *
+ *
+ */
+ function toLinkHTML($size, $provider = '/Images/Thumb')
+ {
+ if(empty($this->linkurl)){
+ return $this->toHTML($size, $provider = '/Images/Thumb');
+ }
+
+ return '<a href="'.$this->linkurl.'" target="_blank">'.$this->toHTML($size, $provider = '/Images/Thumb').'</a>';
+
+ }
+
+
/**
* to Fileconvert object..
*
{
// not sure why we do this..
-
-
-
-
// if imgtype starts with '-' ? then we set the 'old' (probably to delete later)
if (!empty($ar['imgtype']) && !empty($ar['ontable']) && !empty($ar['onid']) && ($ar['imgtype'][0] == '-')) {
$this->setFrom($ar);
$roo->loadMap($r);
$r->limit(1);
$r->find(true);
- exit;
$roo->jok($r->toArray());
}