• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CFormElement类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CFormElement的典型用法代码示例。如果您正苦于以下问题:PHP CFormElement类的具体用法?PHP CFormElement怎么用?PHP CFormElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CFormElement类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: create

 /**
  * Add a form element
  *
  * @param array $form     details for the form
  * @param array $elements all the elements
  *
  * @return $this CForm
  */
 public function create($form = [], $elements = [])
 {
     $this->form = $form;
     if (!empty($elements)) {
         foreach ($elements as $key => $element) {
             $this->elements[$key] = CFormElement::Create($key, $element);
         }
     }
     $this->output = [];
     return $this;
 }
开发者ID:alcr33k,项目名称:ccloak,代码行数:19,代码来源:CForm.php


示例2: preferences

 function preferences()
 {
     $mainframe =& JFactory::getApplication();
     if (!$this->accessAllowed('registered')) {
         return;
     }
     $this->showSubmenu();
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('CC EDIT PREFERENCES'));
     $my = CFactory::getUser();
     $params = $my->getParams();
     $jConfig = JFactory::getConfig();
     $pathway =& $mainframe->getPathway();
     $pathway->addItem(JText::_($my->getDisplayName()), CRoute::_('index.php?option=com_community&view=profile&userid=' . $my->id));
     $pathway->addItem(JText::_('CC EDIT PREFERENCES'), '');
     $prefixURL = $my->getAlias();
     if ($jConfig->getValue('sef')) {
         $juriRoot = JURI::root(false);
         $juriPathOnly = JURI::root(true);
         $juriPathOnly = rtrim($juriPathOnly, '/');
         $profileURL = rtrim(str_replace($juriPathOnly, '', $juriRoot), '/');
         $profileURL .= CRoute::_('index.php?option=com_community&view=profile&userid=' . $my->id, false);
         $alias = $my->getAlias();
         $inputHTML = '<input id="alias" name="alias" class="inputbox" type="alias" value="' . $alias . '" />';
         $prefixURL = str_replace($alias, $inputHTML, $profileURL);
         // For backward compatibility issues, as we changed from ID-USER to ID:USER in 2.0,
         // we also need to test older urls.
         if ($prefixURL == $profileURL) {
             $prefixURL = JString::str_ireplace(JString::str_ireplace(':', '-', $alias), $inputHTML, $profileURL);
         }
     }
     CFactory::load('libraries', 'apps');
     $app =& CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-profile-preferences'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $tmpl = new CTemplate();
     $tmpl->set('beforeFormDisplay', $beforeFormDisplay);
     $tmpl->set('afterFormDisplay', $afterFormDisplay);
     $tmpl->set('params', $params);
     $tmpl->set('prefixURL', $prefixURL);
     $tmpl->set('user', $my);
     $tmpl->set('jConfig', $jConfig);
     $html = $tmpl->fetch('profile.preferences');
     echo $html;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:46,代码来源:view.html.php


示例3: newalbum

 /**
  * Display the new album form
  **/
 function newalbum()
 {
     $config = CFactory::getConfig();
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('CC CREATE NEW ALBUM TITLE'));
     $this->addPathway(JText::_('CC PHOTOS'), CRoute::_('index.php?option=com_community&view=photos'));
     $this->addPathway(JText::_('CC CREATE NEW ALBUM TITLE'));
     $js = 'assets/validate-1.5' . ($config->getBool('usepackedjavascript') ? '.pack.js' : '.js');
     CAssets::attach($js, 'js');
     $handler = $this->_getHandler();
     $type = $handler->getType();
     $this->showSubmenu();
     CFactory::load('libraries', 'apps');
     $app =& CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-photos-newalbum'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $tmpl = new CTemplate();
     $tmpl->set('beforeFormDisplay', $beforeFormDisplay);
     $tmpl->set('afterFormDisplay', $afterFormDisplay);
     $tmpl->set('type', $type);
     echo $tmpl->fetch('photos.newalbum');
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:26,代码来源:view.html.php


示例4: newalbum

 /**
  * Display the new album form
  **/
 public function newalbum()
 {
     $config = CFactory::getConfig();
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_COMMUNITY_PHOTOS_CREATE_NEW_ALBUM_TITLE'));
     $this->addPathway(JText::_('COM_COMMUNITY_PHOTOS'), CRoute::_('index.php?option=com_community&view=photos'));
     $this->addPathway(JText::_('COM_COMMUNITY_PHOTOS_CREATE_NEW_ALBUM_TITLE'));
     $js = 'assets/validate-1.5' . ($config->getBool('usepackedjavascript') ? '.pack.js' : '.js');
     CAssets::attach($js, 'js');
     $handler = $this->_getHandler();
     $type = $handler->getType();
     $user = CFactory::getRequestUser();
     $params = $user->getParams();
     $this->showSubmenu();
     $album =& JTable::getInstance('Album', 'CTable');
     // Added to maintain user input value if there is save error
     $album->name = JRequest::getVar('name', '', 'POST');
     $album->location = JRequest::getVar('location', '', 'POST');
     $album->description = JRequest::getVar('description', '', 'POST');
     $album->permissions = JRequest::getVar('permissions', $params->get('privacyPhotoView'), 'POST');
     $album->type = JRequest::getVar('type', '', 'POST');
     CFactory::load('libraries', 'apps');
     $app =& CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-photos-newalbum'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     CFactory::load('libraries', 'privacy');
     $tmpl = new CTemplate();
     echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('permissions', $album->permissions)->set('type', $type)->set('album', $album)->set('referrer', '')->set('enableLocation', $config->get('enable_photos_location'))->fetch('photos.editalbum');
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:33,代码来源:view.html.php


示例5: write

    function write($data)
    {
        if (!$this->accessAllowed('registered')) {
            return;
        }
        $mainframe =& JFactory::getApplication();
        $my =& JFactory::getUser();
        $config = CFactory::getConfig();
        if (!$config->get('enablepm')) {
            echo JText::_('CC PRIVATE MESSAGING DISABLED');
            return;
        }
        //page title
        $pathway =& $mainframe->getPathway();
        $pathway->addItem(JText::_('CC INBOX TITLE'), CRoute::_('index.php?option=com_community&view=inbox'));
        $pathway->addItem(JText::_('CC TITLE COMPOSE'), '');
        $document =& JFactory::getDocument();
        $document->setTitle(JText::_('CC TITLE COMPOSE'));
        $this->showSubMenu();
        $autoCLink = CRoute::_(JURI::base() . 'index.php?option=com_community&view=inbox&task=ajaxAutoName&no_html=1&tmpl=component');
        $js = 'assets/validate-1.5';
        $js .= $config->getBool('usepackedjavascript') ? '.pack.js' : '.js';
        CAssets::attach($js, 'js');
        $js = 'assets/autocomplete-1.0.js';
        CAssets::attach($js, 'js');
        $js = <<<SHOWJS
\t\t    var yPos;

\t\t\tjoms.jQuery().ready(function(){
\t\t\t\tjoms.jQuery("#to").autocomplete("{$autoCLink}", {
\t\t\t\t\tminChars:1, 
\t\t\t\t\tcacheLength:10, 
\t\t\t\t\tselectOnly:1,
\t\t\t\t\tmatchSubset:true, 
\t\t\t\t\tmatchContains:true, 
\t\t\t\t\tmultiple:false,
\t\t\t\t\tformatItem: function(data, i, n, value) {
\t            \t\treturn data[0];
\t        \t\t},
\t        \t\tformatResult: function(data, value) {
\t            \t\treturn data[0];
\t \t\t\t\t}
\t \t\t\t});
\t\t\t});
SHOWJS;
        $document->addScriptDeclaration($js);
        if ($data->sent) {
            return;
        }
        $inboxModel = CFactory::getModel('inbox');
        $totalSent = $inboxModel->getTotalMessageSent($my->id);
        /**
         * Get friend list
         */
        $friends = CFactory::getModel('friends');
        /**
         * Get ban list
         */
        $block = CFactory::getModel('block');
        $sorted = JRequest::getVar('sort', 'latest', 'GET');
        $rows = $friends->getFriends($my->id, $sorted, false);
        $friendlist = array();
        foreach ($rows as $row) {
            // Exclude blocked user
            if (!$block->getBlockStatus($my->id, $row->id)) {
                $friendlist[] = $row;
            }
        }
        CFactory::load('libraries', 'apps');
        $app =& CAppPlugins::getInstance();
        $appFields = $app->triggerEvent('onFormDisplay', array('jsform-inbox-write'));
        $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
        $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
        $tmpl = new CTemplate();
        $tmpl->set('beforeFormDisplay', $beforeFormDisplay);
        $tmpl->set('afterFormDisplay', $afterFormDisplay);
        $tmpl->set('autoCLink', $autoCLink);
        $tmpl->set('data', $data);
        $tmpl->set('rows', $friendlist);
        $tmpl->set('totalSent', $totalSent);
        $tmpl->set('maxSent', $config->get('pmperday'));
        $tmpl->set('useRealName', $config->get('displayname') == 'name' ? '1' : '0');
        $html = $tmpl->fetch('inbox.write');
        echo $html;
    }
开发者ID:bizanto,项目名称:Hooked,代码行数:85,代码来源:view.html.php


示例6: search

 /**
  * View method to search groups
  *
  * @access	public
  *
  * @returns object  An object of the specific group
  */
 public function search()
 {
     /**
      * Opengraph
      */
     CHeadHelper::setType('website', JText::_('COM_COMMUNITY_GROUPS_SEARCH_TITLE'));
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $this->addPathway(JText::_('COM_COMMUNITY_GROUPS'), CRoute::_('index.php?option=com_community&view=groups'));
     $this->addPathway(JText::_("COM_COMMUNITY_SEARCH"), '');
     $search = $jinput->get('search', '', 'STRING');
     $catId = $jinput->get('catid', '', 'INT');
     $groups = '';
     $pagination = null;
     $posted = false;
     $count = 0;
     $model = CFactory::getModel('groups');
     $categories = $model->getCategories();
     // Test if there are any post requests made
     if (!empty($search) || !empty($catId)) {
         JRequest::checkToken('get') or jexit(JText::_('COM_COMMUNITY_INVALID_TOKEN'));
         $appsLib = CAppPlugins::getInstance();
         $saveSuccess = $appsLib->triggerEvent('onFormSave', array('jsform-groups-search'));
         if (empty($saveSuccess) || !in_array(false, $saveSuccess)) {
             $posted = true;
             $groups = $model->getAllGroups($catId, null, $search);
             $pagination = $model->getPagination();
             $count = count($groups);
         }
     }
     // Get the template for the group lists
     $groupsHTML = $this->_getGroupsHTML($groups, $pagination);
     $app = CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-groups-search'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $searchLinks = parent::getAppSearchLinks('groups');
     $tmpl = new CTemplate();
     echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('posted', $posted)->set('groupsCount', $count)->set('groupsHTML', $groupsHTML)->set('search', $search)->set('categories', $categories)->set('catId', $catId)->set('searchLinks', $searchLinks)->set('submenu', $this->showSubmenu(false))->fetch('groups.search');
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:47,代码来源:view.html.php


示例7: write

    public function write($data)
    {
        if (!$this->accessAllowed('registered')) {
            return;
        }
        $mainframe =& JFactory::getApplication();
        $my =& JFactory::getUser();
        $config = CFactory::getConfig();
        if (!$config->get('enablepm')) {
            echo JText::_('COM_COMMUNITY_PRIVATE_MESSAGING_DISABLED');
            return;
        }
        //page title
        $pathway =& $mainframe->getPathway();
        $pathway->addItem(JText::_('COM_COMMUNITY_INBOX_TITLE'), CRoute::_('index.php?option=com_community&view=inbox'));
        $pathway->addItem(JText::_('COM_COMMUNITY_INBOX_TITLE_WRITE'), '');
        $document = JFactory::getDocument();
        $document->setTitle(JText::_('COM_COMMUNITY_INBOX_TITLE_WRITE'));
        $this->showSubMenu();
        $autoCLink = CRoute::_(JURI::base() . 'index.php?option=com_community&view=inbox&task=ajaxAutoName&no_html=1&tmpl=component');
        $js = 'assets/validate-1.5';
        $js .= $config->getBool('usepackedjavascript') ? '.pack.js' : '.js';
        CAssets::attach($js, 'js');
        $js = 'assets/autocomplete-1.0.js';
        CAssets::attach($js, 'js');
        $js = <<<SHOWJS
\t\t  var yPos;

\t\t\tjoms.jQuery().ready(function(){
\t\t\t\tjoms.jQuery("#toDisplay").autocomplete("{$autoCLink}", {
\t\t\t\t\tminChars:1, 
\t\t\t\t\tcacheLength:10, 
\t\t\t\t\tselectOnly:1,
\t\t\t\t\tmatchSubset:true, 
\t\t\t\t\tmatchContains:true, 
\t\t\t\t\tmultiple:false,
\t\t\t\t\tscrollHeight: 200,
\t\t\t\t\tformatItem: function(data, i, n, value) {
\t\t\t\t\t\tvar formatHTML = '<div class="cInbox-ACResult"><img src="'+data[2]+'" />'+data[0]+'</div><div class="clr"></div>';
\t\t\t\t\t\treturn formatHTML;
\t\t\t\t\t},
\t\t\t\t\tformatResult: function(data, value) {
\t\t\t\t\t\treturn data[0];
\t \t\t\t\t}
\t \t\t\t});
\t\t\t});
SHOWJS;
        $document->addScriptDeclaration($js);
        if ($data->sent) {
            return;
        }
        $inboxModel = CFactory::getModel('inbox');
        $totalSent = $inboxModel->getTotalMessageSent($my->id);
        CFactory::load('libraries', 'apps');
        $app =& CAppPlugins::getInstance();
        $appFields = $app->triggerEvent('onFormDisplay', array('jsform-inbox-write'));
        $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
        $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
        $tmpl = new CTemplate();
        echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('autoCLink', $autoCLink)->set('data', $data)->set('totalSent', $totalSent)->set('maxSent', $config->get('pmperday'))->set('useRealName', $config->get('displayname') == 'name' ? '1' : '0')->fetch('inbox.write');
    }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:61,代码来源:view.html.php


示例8: __construct

 /**
  * Constructor
  */
 public function __construct($form = array(), $elements = array())
 {
     $this->form = $form;
     if (!empty($elements)) {
         foreach ($elements as $key => $element) {
             $this->elements[$key] = CFormElement::Create($key, $element);
         }
     }
     $this->output = array();
 }
开发者ID:fnlive,项目名称:Anax-MVC,代码行数:13,代码来源:CForm.php


示例9: write

 public function write($data)
 {
     if (!$this->accessAllowed('registered')) {
         return;
     }
     $mainframe = JFactory::getApplication();
     $my = CFactory::getUser();
     $config = CFactory::getConfig();
     if (!$config->get('enablepm')) {
         echo JText::_('COM_COMMUNITY_PRIVATE_MESSAGING_DISABLED');
         return;
     }
     //page title
     $pathway = $mainframe->getPathway();
     $pathway->addItem(JText::_('COM_COMMUNITY_INBOX_TITLE'), CRoute::_('index.php?option=com_community&view=inbox'));
     $pathway->addItem(JText::_('COM_COMMUNITY_INBOX_TITLE_WRITE'), '');
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_COMMUNITY_INBOX_TITLE_WRITE'));
     $autoCLink = CRoute::_(JURI::base() . 'index.php?option=com_community&view=inbox&task=ajaxAutoName&no_html=1&tmpl=component');
     if ($data->sent) {
         return;
     }
     $inboxModel = CFactory::getModel('inbox');
     $totalSent = $inboxModel->getTotalMessageSent($my->id);
     //CFactory::load( 'libraries' , 'apps' );
     $app = CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-inbox-write'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $tmpl = new CTemplate();
     echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('autoCLink', $autoCLink)->set('data', $data)->set('totalSent', $totalSent)->set('maxSent', $config->get('pmperday'))->set('useRealName', $config->get('displayname') == 'name' ? '1' : '0')->set('friendsCount', $my->getFriendCount())->set('submenu', $this->showSubmenu(false))->fetch('inbox.write');
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:32,代码来源:view.html.php


示例10: uploadAvatar

 public function uploadAvatar()
 {
     /**
      * Opengraph
      */
     CHeadHelper::setType('website', JText::_('COM_COMMUNITY_EVENTS_AVATAR'));
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $eventid = $jinput->get('eventid', '0', 'INT');
     $this->_addEventInPathway($eventid);
     $this->addPathway(JText::_('COM_COMMUNITY_EVENTS_AVATAR'));
     $this->showSubmenu();
     $event = JTable::getInstance('Event', 'CTable');
     $event->load($eventid);
     //CFactory::load( 'helpers' , 'event' );
     $handler = CEventHelper::getHandler($event);
     if (!$handler->manageable()) {
         $this->noAccess();
         return;
     }
     $config = CFactory::getConfig();
     $uploadLimit = (double) $config->get('maxuploadsize');
     $uploadLimit .= 'MB';
     //CFactory::load( 'models' , 'events' );
     $event = JTable::getInstance('Event', 'CTable');
     $event->load($eventid);
     //CFactory::load( 'libraries' , 'apps' );
     $app = CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-events-uploadavatar'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $tmpl = new CTemplate();
     echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('eventId', $eventid)->set('avatar', $event->getAvatar('avatar'))->set('thumbnail', $event->getThumbAvatar())->set('uploadLimit', $uploadLimit)->fetch('events.uploadavatar');
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:34,代码来源:view.html.php


示例11: notifications

 /**
  *
  */
 public function notifications()
 {
     $mainframe = JFactory::getApplication();
     if (!$this->accessAllowed('registered')) {
         return;
     }
     $pathway = $mainframe->getPathway();
     $my = CFactory::getUser();
     $pathway->addItem(JText::_($my->getDisplayName()), CRoute::_('index.php?option=com_community&view=profile&userid=' . $my->id));
     $pathway->addItem(JText::_('COM_COMMUNITY_PROFILE_NOTIFICATIONS'), '');
     /**
      * Opengraph
      */
     CHeadHelper::setType('website', JText::_('COM_COMMUNITY_PROFILE_NOTIFICATIONS'));
     $user = CFactory::getUser();
     $params = $user->getParams();
     $config = CFactory::getConfig();
     $modelNotification = CFactory::getModel('notification');
     $notifications = $modelNotification->getNotification($my->id, '0', 0);
     $app = CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-profile-notifications'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $tmpl = new CTemplate();
     echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('params', $params)->set('config', $config)->set('submenu', $this->showSubmenu(false))->set('pagination', $modelNotification->getPagination())->set('notifications', $notifications)->fetch('profile.notification');
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:29,代码来源:view.html.php


示例12: search

 /**
  * View method to search groups
  *
  * @access	public
  *
  * @returns object  An object of the specific group
  */
 public function search()
 {
     // Get the document object and set the necessary properties of the document
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_COMMUNITY_GROUPS_SEARCH_TITLE'));
     $this->addPathway(JText::_('COM_COMMUNITY_GROUPS'), CRoute::_('index.php?option=com_community&view=groups'));
     $this->addPathway(JText::_("COM_COMMUNITY_SEARCH"), '');
     // Display the submenu
     $this->showSubmenu();
     $search = JRequest::getVar('search', '');
     $catId = JRequest::getVar('catid', '');
     $groups = '';
     $pagination = null;
     $posted = false;
     $count = 0;
     $model = CFactory::getModel('groups');
     $categories = $model->getCategories();
     // Test if there are any post requests made
     if (!empty($search) || !empty($catId)) {
         JRequest::checkToken('get') or jexit(JText::_('COM_COMMUNITY_INVALID_TOKEN'));
         CFactory::load('libraries', 'apps');
         $appsLib =& CAppPlugins::getInstance();
         $saveSuccess = $appsLib->triggerEvent('onFormSave', array('jsform-groups-search'));
         if (empty($saveSuccess) || !in_array(false, $saveSuccess)) {
             $posted = true;
             $groups = $model->getAllGroups($catId, null, $search);
             $pagination = $model->getPagination();
             $count = count($groups);
         }
     }
     // Get the template for the group lists
     $groupsHTML = $this->_getGroupsHTML($groups, $pagination);
     CFactory::load('libraries', 'apps');
     $app =& CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-groups-search'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $searchLinks = parent::getAppSearchLinks('groups');
     $tmpl = new CTemplate();
     echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('posted', $posted)->set('groupsCount', $count)->set('groupsHTML', $groupsHTML)->set('search', $search)->set('categories', $categories)->set('catId', $catId)->set('searchLinks', $searchLinks)->fetch('groups.search');
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:48,代码来源:view.html.php


示例13: uploadAvatar

 function uploadAvatar()
 {
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('CC UPLOAD EVENT AVATAR'));
     $eventid = JRequest::getVar('eventid', '0');
     $this->_addEventInPathway($eventid);
     $this->addPathway(JText::_('CC UPLOAD EVENT AVATAR'));
     $this->showSubmenu();
     $event =& JTable::getInstance('Event', 'CTable');
     $event->load($eventid);
     CFactory::load('helpers', 'event');
     $handler = CEventHelper::getHandler($event);
     if (!$handler->manageable()) {
         $this->noAccess();
         return;
     }
     $config = CFactory::getConfig();
     $uploadLimit = (double) $config->get('maxuploadsize');
     $uploadLimit .= 'MB';
     CFactory::load('models', 'events');
     $event =& JTable::getInstance('Event', 'CTable');
     $event->load($eventid);
     CFactory::load('libraries', 'apps');
     $app =& CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-events-uploadavatar'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $tmpl = new CTemplate();
     $tmpl->set('beforeFormDisplay', $beforeFormDisplay);
     $tmpl->set('afterFormDisplay', $afterFormDisplay);
     $tmpl->set('eventId', $eventid);
     $tmpl->set('avatar', $event->getAvatar('avatar'));
     $tmpl->set('thumbnail', $event->getAvatar());
     $tmpl->set('uploadLimit', $uploadLimit);
     echo $tmpl->fetch('events.uploadavatar');
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:36,代码来源:view.html.php


示例14: invite

 /**
  * Show the invite window
  */
 public function invite()
 {
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $jConfig = JFactory::getConfig();
     /**
      * Opengraph
      */
     CHeadHelper::setType('website', JText::sprintf('COM_COMMUNITY_FRIENDS_INVITE_FRIENDS_TITLE', $jConfig->get('sitename')));
     $my = CFactory::getUser();
     //$this->showSubmenu();
     $post = $jinput->post->get('action', '', 'STRING') == 'invite' ? JRequest::get('POST') : array('message' => '', 'emails' => '');
     $pathway = $mainframe->getPathway();
     $this->addPathway(JText::_('COM_COMMUNITY_FRIENDS'), CRoute::_('index.php?option=com_community&view=friends'));
     $this->addPathway(JText::_('COM_COMMUNITY_INVITE_FRIENDS'), '');
     // Process the Suggest Friends
     // Load required filterbar library that will be used to display the filtering and sorting.
     $id = JRequest::getCmd('userid', $my->id);
     $user = CFactory::getUser($id);
     $sorted = $jinput->get->get('sort', 'suggestion', 'STRING');
     $filter = $jinput->get->get('filter', 'suggestion', 'STRING');
     $friends = CFactory::getModel('friends');
     $rows = $friends->getFriends($id, $sorted, true, $filter);
     $resultRows = array();
     foreach ($rows as $row) {
         $user = CFactory::getUser($row->id);
         $obj = clone $row;
         $obj->friendsCount = $user->getFriendCount();
         $obj->profileLink = CUrlHelper::userLink($row->id);
         $obj->isFriend = true;
         $resultRows[] = $obj;
     }
     unset($rows);
     $app = CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-friends-invite'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $tmpl = new CTemplate();
     echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('my', $my)->set('post', $post)->setRef('friends', $resultRows)->set('config', CFactory::getConfig())->set('submenu', $this->showSubmenu(false))->fetch('friends.invite');
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:43,代码来源:view.html.php


示例15: newalbum

 /**
  * Display the new album form
  * */
 public function newalbum()
 {
     $config = CFactory::getConfig();
     /**
      * Opengraph
      */
     CHeadHelper::setType('website', JText::_('COM_COMMUNITY_PHOTOS_CREATE_NEW_ALBUM_TITLE'));
     $this->addPathway(JText::_('COM_COMMUNITY_PHOTOS'), CRoute::_('index.php?option=com_community&view=photos'));
     $this->addPathway(JText::_('COM_COMMUNITY_PHOTOS_CREATE_NEW_ALBUM_TITLE'));
     // $js = 'assets/validate-1.5.min.js';
     // CFactory::attach($js, 'js');
     $handler = $this->_getHandler();
     $type = $handler->getType();
     $user = CFactory::getRequestUser();
     $params = $user->getParams();
     $album = JTable::getInstance('Album', 'CTable');
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     // Added to maintain user input value if there is save error
     $album->name = $jinput->post->get('name', '', 'STRING');
     //JRequest::getVar('name', '', 'POST');
     $album->location = $jinput->post->get('location', '', 'STRING');
     //JRequest::getVar('location', '', 'POST');
     $album->description = $jinput->post->get('description', '', 'STRING');
     //JRequest::getVar('description', '', 'POST');
     $album->permissions = $jinput->post->get('permissions', $params->get('privacyPhotoView'), 'NONE');
     //JRequest::getVar('permissions', $params->get( 'privacyPhotoView' ), 'POST');
     $album->type = $jinput->post->get('type', '', 'NONE');
     //JRequest::getVar('type', '', 'POST');
     $album->groupid = $jinput->get('groupid', '', 'NONE');
     $app = CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-photos-newalbum'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $tmpl = new CTemplate();
     echo $tmpl->set('beforeFormDisplay', $beforeFormDisplay)->set('afterFormDisplay', $afterFormDisplay)->set('permissions', $album->permissions)->set('type', $type)->set('album', $album)->set('referrer', '')->set('enableLocation', $config->get('enable_photos_location'))->set('submenu', $this->showSubmenu(false))->fetch('photos.editalbum');
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:40,代码来源:view.html.php


示例16: invite

 /**
  * Show the invite window
  */
 function invite()
 {
     $mainframe =& JFactory::getApplication();
     $document =& JFactory::getDocument();
     $config = CFactory::getConfig();
     $document->setTitle(JText::sprintf('CC INVITE FRIENDS TITLE', $config->get('sitename')));
     $my = CFactory::getUser();
     $this->showSubmenu();
     $post = JRequest::getVar('action', '', 'POST') == 'invite' ? JRequest::get('POST') : array('message' => '', 'emails' => '');
     $pathway =& $mainframe->getPathway();
     $this->addPathway(JText::_('CC FRIENDS'), CRoute::_('index.php?option=com_community&view=friends'));
     $this->addPathway(JText::_('CC INVITE FRIENDS'), '');
     // Process the Suggest Friends
     // Load required filterbar library that will be used to display the filtering and sorting.
     CFactory::load('libraries', 'filterbar');
     $id = JRequest::getCmd('userid', $my->id);
     $user = CFactory::getUser($id);
     $sorted = JRequest::getVar('sort', 'suggestion', 'GET');
     $filter = JRequest::getVar('filter', 'suggestion', 'GET');
     $friends = CFactory::getModel('friends');
     $rows = $friends->getFriends($id, $sorted, true, $filter);
     $resultRows = array();
     foreach ($rows as $row) {
         $user = CFactory::getUser($row->id);
         $obj = clone $row;
         $obj->friendsCount = $user->getFriendCount();
         $obj->profileLink = CUrlHelper::userLink($row->id);
         $obj->isFriend = true;
         $resultRows[] = $obj;
     }
     unset($rows);
     CFactory::load('libraries', 'apps');
     $app =& CAppPlugins::getInstance();
     $appFields = $app->triggerEvent('onFormDisplay', array('jsform-friends-invite'));
     $beforeFormDisplay = CFormElement::renderElements($appFields, 'before');
     $afterFormDisplay = CFormElement::renderElements($appFields, 'after');
     $tmpl = new CTemplate();
     $tmpl->set('beforeFormDisplay', $beforeFormDisplay);
     $tmpl->set('afterFormDisplay', $afterFormDisplay);
     $tmpl->set('my', $my);
     $tmpl->set('post', $post);
     $tmpl->setRef('friends', $resultRows);
     $tmpl->set('config', CFactory::getConfig());
     echo $tmpl->fetch('friends.invite');
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:48,代码来源:view.html.php


示例17: __construct

 public function __construct($config, $parent = null)
 {
     if ($parent == null) {
         $parent = Yii::app()->controller;
     }
     parent::__construct($config, $parent);
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:7,代码来源:FontPickerInput.php


示例18: __construct

 /**
  * Constructor
  *
  * @param string $name       of the element.
  * @param array  $attributes to set to the element. Default is an empty array.
  *
  * @return void
  */
 public function __construct($name, $attributes = [])
 {
     parent::__construct($name, $attributes);
     $this['type'] = 'radio';
     //$this['checked']  = isset($attributes['checked']) ? $attributes['checked'] : false;
     //$this['value']    = isset($attributes['value']) ? $attributes['value'] : $name;
 }
开发者ID:Kajja,项目名称:phpmvc,代码行数:15,代码来源:CFormElementRadio.php


示例19: __construct

 /**
  * Constructor
  *
  * @param string $name       of the element.
  * @param array  $attributes to set to the element. Default is an empty array.
  *
  * @return void
  */
 public function __construct($name, $attributes = [])
 {
     parent::__construct($name, $attributes);
     $this['type'] = 'checkbox';
     $this['checked'] = isset($attributes['checked']) ? $attributes['checked'] : false;
     $this['value'] = isset($attributes['value']) ? $attributes['value'] : $name;
     $this->UseNameAsDefaultLabel(null);
 }
开发者ID:Kajja,项目名称:phpmvc,代码行数:16,代码来源:CFormElementCheckbox.php


示例20: __construct

 /**
  * Constructor
  *
  * @param string $name       of the element.
  * @param array  $attributes to set to the element. Default is an empty array.
  *
  * @throws CFormException if missing <options>
  */
 public function __construct($name, $attributes = [])
 {
     parent::__construct($name, $attributes);
     $this['type'] = 'select';
     $this->UseNameAsDefaultLabel();
     if (!is_array($this['options'])) {
         throw new CFormException("Select needs options, did you forget to specify them when creating the element?");
     }
 }
开发者ID:stjo15,项目名称:janax,代码行数:17,代码来源:CFormElementSelect.php



注:本文中的CFormElement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CFormList类代码示例发布时间:2022-05-23
下一篇:
PHP CForm类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap