public $linkurl; // string(254) not_null
public $descript; // blob(65535) not_null blob
public $title; // string(128) not_null
-
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
{
// default permissons are to
// allow create / edit / if the user has
+
if (!$au) {
return false;
}
-
-
$o = $this->object();
//print_r($o);
));
}
-
/**
* deletes all the image instances of it...
}
// direct via roo...
+ /// ctrl not used??
function onUpload($ctrl)
{
}
+
+
/**
* return a list of images for an object, optionally with a mime regex.
* eg. '%/pdf' or 'image/%'
// echo '<PRE>';print_r($req);exit;
$ret= $this->toArray();
-
+ static $ff = false;
+ if (!$ff) {
+ $ff = HTML_FlexyFramework::get();
+ }
+
+ $ret['public_baseURL'] = isset($ff->Pman_Images['public_baseURL']) ?
+ $ff->Pman_Images['public_baseURL'] : $ff->baseURL;
+
if (!empty($req['query']['imagesize'])) {
$baseURL = isset($req['query']['imageBaseURL']) ? $req['query']['imageBaseURL'] : false;
if (preg_match('#^http[s]*://#', $provider)) {
$baseURL = '';
}
-
+
if ($size < 0) {
+ $provider = preg_replace('#/Thumb$#', '', $provider);
+
return $baseURL . $provider . "/{$this->id}/{$this->filename}";
}
//-- max?
$sy = $sz[1];
}
// create it?
+
+ return '<img src="' . $this->URL($size, $provider) . '" width="'. $sx . '" height="'. $sy . '">';
- return '<img src="' . $this->URL($size, $provider) . '" width="'. $sx . '" height="'. $sy . '">';
+ }
+
+ /**
+ * to Fileconvert object..
+ *
+ *
+ *
+ */
+ function toFileConvert()
+ {
+ require_once 'File/Convert.php';
+ $fc = new File_Convert($this->getStoreName(), $this->mimetype);
+ return $fc;
+
+ }
+
+ function fileExt()
+ {
+ require_once 'File/MimeType.php';
+
+ $y = new File_MimeType();
+ return $y->toExt($this->mimetype);
}