/**
  * @param string $key
  * @return mixed
  */
 protected function _getProfile($key)
 {
     if ($this->profile === null) {
         XCube_DelegateUtils::call('Legacy_Profile.GetProfile', new XCube_Ref($this->profile), $this->get('uid'));
     }
     if ($this->profile instanceof XoopsSimpleObject) {
         return $this->profile->get($key);
     }
     return null;
 }
Beispiel #2
0
 function getVar($key)
 {
     if ($key == 'com_text') {
         $ts =& MyTextSanitizer::getInstance();
         return $ts->displayTarea($this->get($key), $this->get('dohtml'), $this->get('dosmiley'), $this->get('doxcode'), $this->get('doimage'), $this->get('dobr'));
     } else {
         return parent::getVar($key);
     }
 }
Beispiel #3
0
 public function __construct()
 {
     $this->initVar('id', XOBJ_DTYPE_INT, '0', false);
     //Primary key
     $this->initVar('sid', XOBJ_DTYPE_INT, '0', false);
     //store join
     $this->initVar('dirname', XOBJ_DTYPE_STRING, '', false);
     $this->initVar('trust_dirname', XOBJ_DTYPE_STRING, '', false);
     $this->initVar('version', XOBJ_DTYPE_INT, 100, false);
     $this->initVar('license', XOBJ_DTYPE_STRING, '', false);
     $this->initVar('required', XOBJ_DTYPE_STRING, '', false);
     $this->initVar('last_update', XOBJ_DTYPE_INT, null, false);
     $this->initVar('target_key', XOBJ_DTYPE_STRING, '', false);
     $this->initVar('target_type', XOBJ_DTYPE_STRING, '', false);
     $this->initVar('replicatable', XOBJ_DTYPE_INT, '0', false);
     $this->initVar('description', XOBJ_DTYPE_STRING, '', false);
     $this->initVar('unzipdirlevel', XOBJ_DTYPE_INT, '0', false);
     $this->initVar('addon_url', XOBJ_DTYPE_STRING, '', false, 255);
     $this->initVar('detail_url', XOBJ_DTYPE_STRING, '', false, 255);
     $this->initVar('options', XOBJ_DTYPE_TEXT, '', false);
     parent::__construct();
 }
 /**
  * delete images
  *
  * @param XoopsSimpleObject	$obj
  *
  * @return	bool
  */
 protected function _deleteImages($obj)
 {
     $ret = true;
     $isPost = false;
     $obj->setupImages($isPost);
     foreach ($obj->mImage as $image) {
         if (!$image instanceof Legacy_AbstractImageObject) {
             continue;
         }
         $result = false;
         XCube_DelegateUtils::call('Legacy_Image.DeleteImage', new XCube_Ref($result), $image);
         if ($result === false) {
             $ret = false;
         }
     }
     return $ret;
 }
 /**
  * getImageTag
  * 
  * @param	XoopsSimpleObject	$obj
  * @param	int		$tsize
  * @param	string	$link
  * 
  * @return	XoopsSimpleObject[]
  **/
 public static function getImageTag($obj, $tsize = 1, $link = null)
 {
     $tag = null;
     $image = $obj->getImage();
     if ($image) {
         switch ($link) {
             case 'original':
                 $html = '<a href="%s">%s</a>';
                 $tag = sprintf($html, $image->getFileUrl(), $image->makeImageTag($tsize));
                 break;
             case 'source':
                 $html = '<a href="%s">%s</a>';
                 $tag = sprintf($html, Legacy_Utils::renderUri($image->getShow('dirname'), $image->getShow('dataname'), $image->getShow('data_id')), $image->makeImageTag($tsize));
                 break;
             default:
                 $tag = $image->makeImageTag($tsize);
                 break;
         }
     } else {
         switch ($tsize) {
             case 1:
                 $noimage = 'noimage120.gif';
                 break;
             case 2:
                 $noimage = 'noimage80.gif';
                 break;
         }
         switch ($link) {
             case 'source':
                 $html = '<a href="%s"><img src="%s%s" alt="noimage" /></a>';
                 $tag = sprintf($html, Legacy_Utils::renderUri($obj->getDirname(), $obj->getDataname(), $obj->getShow($obj->getPrimary())), XOOPS_MODULE_URL . '/playermap/images/', $noimage);
                 break;
             default:
                 $tag = sprintf('<img src="%s%s" alt="noimage" />', XOOPS_MODULE_URL . '/playermap/images/', $noimage);
                 break;
         }
     }
     return $tag;
 }
Beispiel #6
0
 /**
  * __construct
  * 
  * @param   void
  * 
  * @return  void
  **/
 public function __construct()
 {
     parent::__construct();
     $this->_setupChildTables();
 }
Beispiel #7
0
 /**
  * _makeDateString
  *
  * @param	string	$key
  * @param	XoopsSimpleObject	$obj
  *
  * @return	string
  **/
 protected function _makeDateString($key, $obj)
 {
     return $obj->get($key) ? date(_PHPDATEPICKSTRING, $obj->get($key)) : '';
 }