$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.
function getStoreName()
{
$opts = HTML_FlexyFramework::get()->Pman;
-
$fn = preg_replace('/[^a-z0-9\.]+/i', '_', $this->filename);
- print_r($fn);exit;
return implode( '/', array(
$opts['storedir'], '_images_', date('Y/m', strtotime($this->created)), $this->id . '-'. $fn
));
/// 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);
//$p->toEventString();
}
+ function remoteUpload()
+ {
+
+ }
+
}