/** * Constructor * @param icms_ipf_Object $object target object * @param string $key the key */ public function __construct($object, $key) { parent::__construct($object->vars[$key]['form_caption'], " "); $fileObj = $object->getFileObj($key); $module_handler = icms::handler("icms_module"); $module = $module_handler->getByDirname($object->handler->_moduleName); if ($fileObj->getVar("url") != "") { $this->addElement(new icms_form_elements_Label("", _CO_ICMS_CURRENT_FILE . $fileObj->render() . "<br /><br />")); } if ($fileObj->isNew()) { $this->addElement(new icms_ipf_form_elements_Fileupload($fileObj, $key)); $this->addElement(new icms_form_elements_Label("", "<br /><br /><small>" . _CO_ICMS_URL_FILE_DSC . "</small>")); $this->addElement(new icms_form_elements_Label("", "<br />" . _CO_ICMS_URL_FILE)); $this->addElement(new icms_ipf_form_elements_Text($fileObj, "url_" . $key)); } $this->addElement(new icms_form_elements_Hidden("mid_" . $key, $module->getVar("mid"))); $this->addElement(new icms_form_elements_Label("", "<br />" . _CO_ICMS_CAPTION)); $this->addElement(new icms_ipf_form_elements_Text($fileObj, "caption_" . $key)); $this->addElement(new icms_form_elements_Label("", "<br />" . _CO_ICMS_DESC)); $this->addElement(new icms_ipf_form_elements_Text($fileObj, "desc_" . $key)); if (!$fileObj->isNew()) { $this->addElement(new icms_form_elements_Label("", "<br />" . _CO_ICMS_CHANGE_FILE)); $this->addElement(new icms_ipf_form_elements_Fileupload($fileObj, $key)); $this->addElement(new icms_form_elements_Label("", "<br /><br /><small>" . _CO_ICMS_URL_FILE_DSC . "</small>")); $this->addElement(new icms_form_elements_Label("", "<br />" . _CO_ICMS_URL_FILE)); $this->addElement(new icms_ipf_form_elements_Text($fileObj, "url_" . $key)); } }
/** * Constructor * * @param icms_ipf_Object $object reference to targetobject (@link icms_ipf_Object) * @param string $key name of the form section */ public function __construct($object, $key) { $control = $object->getControl($key); $this->setName($key); $this->_value = $object->vars[$key]['value']; $this->_close = isset($control['close']) ? $control['close'] : FALSE; }
/** * Constructor * @param icms_ipf_Object $object reference to targetobject (@link icms_ipf_Object) * @param string $key the form name */ public function __construct($object, $key) { $var = $object->vars[$key]; $control = $object->controls[$key]; $form_maxlength = isset($control['maxlength']) ? $control['maxlength'] : (isset($var['maxlength']) ? $var['maxlength'] : 255); $form_size = isset($control['size']) ? $control['size'] : 50; $this->_file = $control['file']; parent::__construct($var['form_caption'], $key, $form_size, $form_maxlength, $object->getVar($key, 'e')); }
/** * Constructor * * @param mod_profile_VisibilityHandler $handler object handler */ public function __construct(&$handler) { parent::__construct($handler); $this->initVar('fieldid', XOBJ_DTYPE_INT); $this->initVar('user_group', XOBJ_DTYPE_INT); $this->initVar('profile_group', XOBJ_DTYPE_INT); }
/** * Override accessor for several properties * * @see htdocs/libraries/icms/ipf/icms_ipf_Object::getVar() */ public function getVar($key, $format = 's') { if ($format == 's' && in_array($key, array("color_border", "color_background", "color_link", "color_url", "color_text"))) { return call_user_func(array($this, $key)); } return parent::getVar($key, $format); }
/** * Override accessors for properties * @see htdocs/libraries/icms/ipf/icms_ipf_Object::getVar() */ public function getVar($key, $format = 's') { if ($format == 's' && in_array($key, array())) { return call_user_func(array($this, $key)); } return parent::getVar($key, $format); }
/** * Constructor * * @param mod_profile_FieldHandler $handler object handler */ public function __construct(&$handler) { parent::__construct($handler); $this->quickInitVar('fieldid', XOBJ_DTYPE_INT, true); $this->quickInitVar('catid', XOBJ_DTYPE_INT, false); $this->quickInitVar('field_type', XOBJ_DTYPE_TXTBOX, false); $this->quickInitVar('field_valuetype', XOBJ_DTYPE_TXTBOX, false); $this->quickInitVar('field_name', XOBJ_DTYPE_TXTBOX, true); $this->quickInitVar('field_title', XOBJ_DTYPE_TXTBOX, true); $this->quickInitVar('url', XOBJ_DTYPE_IMAGE, true); $this->quickInitVar('field_description', XOBJ_DTYPE_TXTAREA, false); $this->quickInitVar('field_required', XOBJ_DTYPE_INT, false); $this->quickInitVar('field_maxlength', XOBJ_DTYPE_TXTBOX, false, false, false, 0); $this->quickInitVar('field_weight', XOBJ_DTYPE_INT, false, false, false, 0); $this->quickInitVar('field_default', XOBJ_DTYPE_TXTAREA, false); $this->quickInitVar('field_notnull', XOBJ_DTYPE_INT, false); $this->quickInitVar('field_edit', XOBJ_DTYPE_INT, false); $this->quickInitVar('field_show', XOBJ_DTYPE_INT, false); $this->quickInitVar('field_options', XOBJ_DTYPE_TXTBOX, false); $this->quickInitVar('exportable', XOBJ_DTYPE_INT, false); $this->quickInitVar('step_id', XOBJ_DTYPE_INT, false); $this->quickInitVar('system', XOBJ_DTYPE_INT, false, false, false, 0); $this->hideFieldFromForm(array('field_valuetype', 'system')); $this->setControl('url', array('name' => 'image', 'nourl' => true)); $this->setControl('field_required', 'yesno'); $this->setControl('field_notnull', 'yesno'); $this->setControl('field_edit', 'yesno'); $this->setControl('field_show', 'yesno'); $this->setControl('exportable', 'yesno'); $this->setControl('system', 'yesno'); $this->setControl('catid', array('itemHandler' => 'category', 'method' => 'getList', 'module' => 'profile')); $this->setControl('field_type', array('itemHandler' => 'field', 'method' => 'getFieldTypeArray', 'module' => 'profile')); $this->setControl('step_id', array('itemHandler' => 'regstep', 'method' => 'getListForFields', 'module' => 'profile')); }
public function __construct(&$handler) { parent::__construct($handler); $this->quickInitVar('page_id', XOBJ_DTYPE_INT); $this->quickInitVar('page_moduleid', XOBJ_DTYPE_INT, true); $this->quickInitVar('page_title', XOBJ_DTYPE_TXTBOX, true); $this->quickInitVar('page_url', XOBJ_DTYPE_TXTBOX, true); $this->quickInitVar('page_status', XOBJ_DTYPE_INT, true); }
/** * Constructor * * @param icms_view_block_position_Handler $handler */ public function __construct(&$handler) { parent::__construct($handler); $this->quickInitVar('id', XOBJ_DTYPE_INT); $this->quickInitVar('pname', XOBJ_DTYPE_TXTBOX, true); $this->quickInitVar('title', XOBJ_DTYPE_TXTBOX, true); $this->quickInitVar('description', XOBJ_DTYPE_TXTAREA); $this->quickInitVar('block_default', XOBJ_DTYPE_INT); $this->quickInitVar('block_type', XOBJ_DTYPE_TXTBOX); }
/** * Constructor * @param icms_ipf_Object $object target object * @param string $key the key */ public function __construct($object, $key) { parent::__construct($object->vars[$key]['form_caption'], " "); $urllinkObj = $object->getUrlLinkObj($key); $module_handler = icms::handler("icms_module"); $module = $module_handler->getByDirname($object->handler->_moduleName); $this->addElement(new icms_form_elements_Label("", _CO_ICMS_URLLINK_URL)); $this->addElement(new icms_ipf_form_elements_Text($urllinkObj, "url_" . $key)); $this->addElement(new icms_form_elements_Label("", "<br/>" . _CO_ICMS_CAPTION)); $this->addElement(new icms_ipf_form_elements_Text($urllinkObj, "caption_" . $key)); $this->addElement(new icms_form_elements_Label("", "<br/>" . _CO_ICMS_DESC)); $this->addElement(new icms_ipf_form_elements_Text($urllinkObj, "desc_" . $key)); $this->addElement(new icms_form_elements_Label("", "<br/>" . _CO_ICMS_URLLINK_TARGET)); $this->addElement(new icms_form_elements_Hidden("mid_" . $key, $module->getVar("mid"))); $targ_val = $urllinkObj->getVar("target"); $targetRadio = new icms_form_elements_Radio("", "target_" . $key, $targ_val != "" ? $targ_val : "_blank"); $control = $urllinkObj->getControl("target"); $targetRadio->addOptionArray($control["options"]); $this->addElement($targetRadio); }
/** * get value for variable * * @param string $key field name * @param string $format format * @return mixed value */ public function getVar($key, $format = "e") { if (substr($key, 0, 4) == "url_") { return parent::getVar("url", $format); } elseif (substr($key, 0, 4) == "mid_") { return parent::getVar("mid", $format); } elseif (substr($key, 0, 8) == "caption_") { return parent::getVar("caption", $format); } elseif (substr($key, 0, 5) == "desc_") { return parent::getVar("description", $format); } else { return parent::getVar($key, $format); } }
/** * Constructor * * @param mod_profile_TribetopicHandler $handler object handler */ public function __construct(&$handler) { icms_ipf_Object::__construct($handler); $this->quickInitVar('topic_id', XOBJ_DTYPE_INT, true); $this->quickInitVar('tribes_id', XOBJ_DTYPE_INT, true); $this->quickInitVar('poster_uid', XOBJ_DTYPE_INT, true); $this->quickInitVar('post_id', XOBJ_DTYPE_INT, true); $this->quickInitVar('title', XOBJ_DTYPE_TXTBOX, true); $this->quickInitVar('closed', XOBJ_DTYPE_INT, true, false, false, 0); $this->quickInitVar('replies', XOBJ_DTYPE_INT, false); $this->quickInitVar('views', XOBJ_DTYPE_INT, false); $this->quickInitVar('last_post_id', XOBJ_DTYPE_INT, true); $this->quickInitVar('last_post_time', XOBJ_DTYPE_LTIME, false); $this->setControl('poster_uid', 'user'); $this->setControl('closed', 'yesno'); $this->hideFieldFromForm(array('tribes_id', 'post_uid', 'post_id', 'replies', 'views', 'last_post_id', 'last_post_time')); $this->initiateSEO(); }
public function __construct(&$handler) { global $contentConfig; icms_ipf_Object::__construct($handler); $this->quickInitVar('content_id', XOBJ_DTYPE_INT, true); $this->quickInitVar('content_pid', XOBJ_DTYPE_INT, false); $this->quickInitVar('content_uid', XOBJ_DTYPE_INT, true, false, false, 1); $this->quickInitVar('content_title', XOBJ_DTYPE_TXTBOX, true); $this->quickInitVar('content_body', XOBJ_DTYPE_TXTAREA); $this->quickInitVar('content_css', XOBJ_DTYPE_TXTAREA); $this->quickInitVar('content_tags', XOBJ_DTYPE_TXTAREA); $this->quickInitVar('content_visibility', XOBJ_DTYPE_INT, true, false, false, CONTENT_CONTENT_VISIBLE_MENUSUBS); $this->quickInitVar('content_published_date', XOBJ_DTYPE_LTIME, false); $this->quickInitVar('content_updated_date', XOBJ_DTYPE_LTIME); $this->quickInitVar('content_weight', XOBJ_DTYPE_INT, true, false, false, 0); $this->quickInitVar('content_status', XOBJ_DTYPE_INT, true, false, false, CONTENT_CONTENT_STATUS_PUBLISHED); $this->quickInitVar('content_makesymlink', XOBJ_DTYPE_INT, true, false, false, 0); $this->quickInitVar('content_showsubs', XOBJ_DTYPE_INT, false, false, false, $contentConfig['show_relateds']); $this->quickInitVar('content_cancomment', XOBJ_DTYPE_INT, false, false, false, true); $this->quickInitVar('content_comments', XOBJ_DTYPE_INT); $this->quickInitVar('content_notification_sent', XOBJ_DTYPE_INT); $this->hideFieldFromForm('content_comments'); $this->hideFieldFromForm('content_notification_sent'); $this->hideFieldFromSingleView('content_comments'); $this->hideFieldFromSingleView('content_notification_sent'); $this->initCommonVar('counter', false); $this->initCommonVar('dohtml', false, true); $this->initCommonVar('dobr', false, true); $this->initCommonVar('doimage', false, true); $this->initCommonVar('dosmiley', false, true); $this->initCommonVar('doxcode', false, true); $this->initNonPersistableVar('content_subs', XOBJ_DTYPE_INT); $this->setControl('content_body', 'dhtmltextarea'); $this->setControl('content_uid', 'user'); $this->setControl('content_status', array('itemHandler' => 'content', 'method' => 'getContent_statusArray', 'module' => 'content')); $this->setControl('content_visibility', array('itemHandler' => 'content', 'method' => 'getContent_visibleArray', 'module' => 'content')); $this->setControl('content_pid', array('itemHandler' => 'content', 'method' => 'getContentList', 'module' => 'content')); $this->setControl('categories', array('name' => 'categories', 'module' => 'imtagging')); $this->setControl('content_makesymlink', 'yesno'); $this->setControl('content_showsubs', 'yesno'); $this->setControl('content_cancomment', 'yesno'); parent::initiateSEO(); }
/** * Constructor * * @param mod_profile_TribepostHandler $handler mod_profile_TribepostHandler object */ public function __construct(&$handler) { icms_ipf_Object::__construct($handler); $this->quickInitVar('post_id', XOBJ_DTYPE_INT, true); $this->quickInitVar('topic_id', XOBJ_DTYPE_INT, true); $this->quickInitVar('tribes_id', XOBJ_DTYPE_INT, true); $this->quickInitVar('poster_uid', XOBJ_DTYPE_INT, true); $this->quickInitVar('title', XOBJ_DTYPE_TXTBOX, true); $this->quickInitVar('body', XOBJ_DTYPE_TXTAREA, true); $this->quickInitVar('attachsig', XOBJ_DTYPE_INT, true, false, false, 1); $this->quickInitVar('post_time', XOBJ_DTYPE_LTIME, false); $this->initCommonVar('dohtml', false, true); $this->initCommonVar('dobr', false, true); $this->initCommonVar('doimage', false, true); $this->initCommonVar('dosmiley', false, true); $this->initCommonVar('doxcode', false, true); $this->setControl('poster_uid', 'user'); $this->setControl('body', 'dhtmltextarea'); $this->setControl('attachsig', 'yesno'); $this->hideFieldFromForm(array('topic_id', 'tribes_id', 'poster_uid', 'post_time')); $this->initiateSEO(); }
/** * Constructor for the block object * @param $handler */ public function __construct(&$handler) { parent::__construct($handler); $this->quickInitVar('name', XOBJ_DTYPE_TXTBOX); $this->quickInitVar('bid', XOBJ_DTYPE_INT, TRUE); $this->quickInitVar('mid', XOBJ_DTYPE_INT, TRUE); $this->quickInitVar('func_num', XOBJ_DTYPE_INT); $this->quickInitVar('title', XOBJ_DTYPE_TXTBOX); $this->quickInitVar('content', XOBJ_DTYPE_TXTAREA); $this->quickInitVar('side', XOBJ_DTYPE_INT, TRUE); $this->quickInitVar('weight', XOBJ_DTYPE_INT, TRUE, FALSE, FALSE, 0); $this->quickInitVar('visible', XOBJ_DTYPE_INT, TRUE); /** * @var string $block_type Holds the type of block * S - System block * M - block from a Module (other than system) * C - Custom block (legacy type 'E') * K - block cloned from another block (legacy type 'D') */ $this->quickInitVar('block_type', XOBJ_DTYPE_TXTBOX); /** * @var string $c_type The type of content in the block * H - HTML * P - PHP * S - Auto Format (smilies and HTML enabled) * T - Auto Format (smilies and HTML disabled) */ $this->quickInitVar('c_type', XOBJ_DTYPE_TXTBOX, TRUE, FALSE, FALSE, "S"); $this->quickInitVar('isactive', XOBJ_DTYPE_INT); $this->quickInitVar('dirname', XOBJ_DTYPE_TXTBOX); $this->quickInitVar('func_file', XOBJ_DTYPE_TXTBOX); $this->quickInitVar('show_func', XOBJ_DTYPE_TXTBOX); $this->quickInitVar('edit_func', XOBJ_DTYPE_TXTBOX); $this->quickInitVar('template', XOBJ_DTYPE_TXTBOX); $this->quickInitVar('bcachetime', XOBJ_DTYPE_INT); $this->quickInitVar('last_modified', XOBJ_DTYPE_INT); $this->quickInitVar('options', XOBJ_DTYPE_TXTBOX); }
/** * Overridding IcmsPersistable::toArray() method to add a few info * * @return array of picture info */ public function toArray() { $ret = parent::toArray(); $ret['creation_time'] = formatTimestamp($this->getVar('creation_time', 'e'), 'm'); $ret['picture_content'] = $this->getProfilePicture(); $ret['editItemLink'] = $this->getEditItemLink(false, true, true); $ret['deleteItemLink'] = $this->getDeleteItemLink(false, true, true); $ret['userCanEditAndDelete'] = $this->userCanEditAndDelete(); return $ret; }
/** * Custom form generation for autotasks * @see icms_ipf_Object::getForm() */ public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) { if ($this->getType(0)=='addon') { $this->doHideFieldFromForm('sat_code'); $this->doHideFieldFromForm('sat_onfinish'); } else { $this->doShowFieldOnForm('sat_code'); $this->doShowFieldOnForm('sat_onfinish'); } return parent::getForm($form_caption, $form_name, $form_action, $submit_button_caption, $cancel_js_action, $captcha); }
public function IcmsPersistableObject(&$handler) { parent::__construct($handler); $this->_deprecated = icms_core_Debug::setDeprecated('icms_ipf_Object', sprintf(_CORE_REMOVE_IN_VERSION, '1.4')); }
public function __construct(&$handler) { parent::__construct($handler); }
/** * Overridding IcmsPersistable::toArray() method to add a few info * * @return array of audio info */ public function toArray() { $ret = parent::toArray(); $ret['audio_content'] = $this->getAudioToDisplay(); $ret['editItemLink'] = $this->getEditItemLink(false, true, true); $ret['deleteItemLink'] = $this->getDeleteItemLink(false, true, true); $ret['userCanEditAndDelete'] = $this->userCanEditAndDelete(); $ret['audio_sender_link'] = $this->getAudioSender(); return $ret; }
/** * Overridding IcmsPersistable::toArray() method to add a few info * * @return array of friendship info */ public function toArray() { $ret = parent::toArray(); $ret['creation_time'] = formatTimestamp($this->getVar('creation_time', 'e'), 'm'); $ret['friendship_avatar'] = $this->getAvatar(); $ret['friendship_linkedUname'] = $this->getFriendLinkedUname(); $ret['friendship_uname'] = $this->getFriendUname(); $ret['friend_uid'] = $this->getFriendUid(); $ret['editItemLink'] = $this->getEditItemLink(false, true, true); $ret['deleteItemLink'] = $this->getDeleteItemLink(false, true, true); $ret['userCanEditAndDelete'] = $this->userCanEditAndDelete(); return $ret; }
/** * Overridding IcmsPersistable::toArray() method to add a few info * * @return array of tribeuser info */ public function toArray() { $ret = parent::toArray(); $profile_tribes_handler = icms_getmodulehandler('tribes', basename(dirname(dirname(__FILE__))), 'profile'); $tribe = $profile_tribes_handler->get($this->getVar('tribe_id'))->toArray(); $ret['tribe_itemLink'] = $tribe['itemLink']; unset($profile_tribes_handler, $tribe); $ret['tribeuser_avatar'] = $this->getTribeuserAvatar(); $ret['editItemLink'] = $this->getEditItemLink(false, true, true); $ret['deleteItemLink'] = $this->getDeleteItemLink(false, true, true); $ret['userCanEditAndDelete'] = $this->userCanEditAndDelete(); $ret['tribeuser_sender_link'] = $this->getTribeuserSender(); return $ret; }
/** * This method returns a view link of the Object * * @param icms_ipf_Object $icmsObj * @param boolean $onlyUrl * @param boolean $withimage * @param boolean $userSide * @return string */ public function getViewItemLink($icmsObj, $onlyUrl = false, $withimage = true, $userSide = false) { if ($this->handler->_moduleName != 'system') { $admin_side = $userSide ? '' : 'admin/'; $ret = $this->handler->_moduleUrl . $admin_side . $this->handler->_page . "?" . $this->handler->keyName . "=" . $icmsObj->getVar($this->handler->keyName); } else { $admin_side = ''; $ret = $this->handler->_moduleUrl . $admin_side . 'admin.php?fct=' . $this->handler->_itemname . "&op=view&" . $this->handler->keyName . "=" . $icmsObj->getVar($this->handler->keyName); } if ($onlyUrl) { return $ret; } elseif ($withimage) { return "<a href='" . $ret . "'>\r\n\t\t\t\t<img src='" . ICMS_IMAGES_SET_URL . "/actions/viewmag.png' style='vertical-align: middle;' alt='" . _PREVIEW . "' title='" . _PREVIEW . "'/></a>"; } return "<a href='" . $ret . "'>" . $icmsObj->getVar($this->handler->identifierName) . "</a>"; }
/** * Overridding IcmsPersistable::toArray() method to add a few info * * @return array of video info */ public function toArray() { $ret = parent::toArray(); $ret['creation_time'] = formatTimestamp($this->getVar('creation_time', 'e'), 'm'); $ret['video_content'] = $this->getVideoToDisplay(); $ret['video_content_main'] = $this->getVideoToDisplay(true); $ret['editItemLink'] = $this->getEditItemLink(false, true, true); $ret['deleteItemLink'] = $this->getDeleteItemLink(false, true, true); $ret['userCanEditAndDelete'] = $this->userCanEditAndDelete(); return $ret; }