$roo->jerr("erro making image" . $q['_remote_upload']);
}
+ if(!empty($q['_return_after_create'])){
+ return;
+ }
+
$roo->addEvent("ADD", $this, $this->toEventString());
$r = DB_DataObject::factory($this->tableName());
}
-
+
/**
* create an email from file.
* these must have been set first.
$f = $this->getStoreName();
-
$dest = dirname($f);
if (!file_exists($dest)) {
// currently this is 0775 due to problems using shared hosing (FTP)
/// 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)) {
$sy = $sz[1];
}
// create it?
-
- return '<img src="' . $this->URL($size, $provider) . '" width="'. $sx . '" height="'. $sy . '">';
+ $extra = '';
+ if (strlen($this->title)) {
+ $extra = ' title="'. htmlspecialchars($this->title) . '"';
+ }
+
+ return '<img src="' . $this->URL($size, $provider) . '"' .
+ $extra .
+ ' width="'. $sx . '"' .
+ ' height="'. $sy . '">';
}
-
+
+ /**
+ *
+ * #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);
//$p->toEventString();
}
+ function remoteUpload()
+ {
+
+ }
+
}