我的距乳后妈在线播放:Joomla常用功能

来源:百度文库 编辑:偶看新闻 时间:2024/05/02 09:50:35
(2011-07-29 14:34:01)
标签:对象 组件 绝对地址 设置方法 获得 杂谈分类:PHP
获得表单提交数据: JRequest::getCmd( 'task' ); JRequest::getInt('limit', 0); JRequest::getVar('message', '');
绑定模板数 据:view.html.php: $this->assignRef('lists', 'value');
网站名: $mainframe->getCfg('sitename');
获得管理员名称与邮箱:
$mainframe->getCfg('mailfrom'); $mainframe->getCfg('fromname');
配 置文件设置方法:
// Get the path of the configuration file $fname = JPATH_CONFIGURATION.DS.'configuration.php'; // clear cache $cache = JFactory::getCache(); $cache->clean();
// Update the credentials with the new settings $config =& JFactory::getConfig(); $config->setValue('config.form_email', 'xxx');
// Get the config registry in PHP class format and write it to configuation.php jimport('Joomla.filesystem.file'); if (!JFile::write($fname, $config->toString('PHP', 'config', array('class' => 'JConfig')))) { $msg = JText::_('ERRORCONFIGFILE'); }
路 由地址为HTML全地址: JRoute::_( 'index.php?option=com_ccNewsletter' );
绝对地址: JPATH_COMPONENT 组件地址,前台、后台 JPATH_ADMINISTRATOR 组件路径 后台 JPATH_COMPONENT_SITE 组件路径 前台 JPATH_ROOT 根目录
日历: 'short', 'size'=>'25', 'maxlength'=>'19')); ?>
JHTML::_('date', $this->list->modified, JText::_('DATE_FORMAT_LC2') )
载入脚本: JHTML::script('upload.js', 'components/com_smipa/js/', false); JHTML::_('behavior.mootools');
获得全局对象:
$user =& JFactory::getUser(); $db =& JFactory::getDBO(); $document =& JFactory::getDocument(); $lang =& JFactory::getLanguage();
数 据库对象操作:
$db =& JFactory::getDBO();
$db->setQuery($sql); $db->loadObjectList(); 对象列表 $db->loadObject(); 一行对象 $db->loadResult(); 单个结果 $db->Quote(); 过滤敏感字
Document对象操作:
$document->addStyleSheet(url); $document->addScript(url);
语言对象操作:
$lang->_lang === 'en-GB' or $lang->_lang === 'zh-TW'
用户对象操作:
$user->get('guest') 是否登录,登录了返回false
获得组件的Menuid:
$menu=&JSite::getMenu();$Items=$menu->getItems('link','index.php?option=com_idoblog&view=idoblog'); $Itemid=$Items[0]->id;
获得当前Menuid:
$menus = &JSite::getMenu(); $menu = $menus->getActive();
发送Email:
$sent = JUtility::sendMail($email, $contactname, $adminmail, $subject, $body, true); if (!$sent) { $this->setError("Send email failed."); }
修改默 认提示信息:
libraries\Joomla\document\html\renderer\message.php
Javascript弹 出小窗口:
xx