当前位置: 首页>>代码示例>>PHP>>正文


PHP JPlugin::loadLanguage方法代码示例

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


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

示例1: onProfileDisplay

 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_events', JPATH_ADMINISTRATOR);
     $config = CFactory::getConfig();
     if (!$config->get('enableevents')) {
         return JText::_('PLG_EVENTS_EVENT_DISABLED');
     }
     $document = JFactory::getDocument();
     $mainframe = JFactory::getApplication();
     $user = CFactory::getRequestUser();
     $caching = $this->params->get('cache', 1);
     $model = CFactory::getModel('Events');
     $my = CFactory::getUser();
     $this->loadUserParams();
     //CFactory::load( 'helpers' , 'event' );
     $event = JTable::getInstance('Event', 'CTable');
     $handler = CEventHelper::getHandler($event);
     $events = $model->getEvents(null, $user->id, $this->params->get('sorting', 'latest'), null, true, false, null, null, $handler->getContentTypes(), $handler->getContentId(), $this->userparams->get('count', 5));
     if ($this->params->get('hide_empty', 0) && !count($events)) {
         return '';
     }
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $creatable = $my->canCreateEvents();
     $cache = JFactory::getCache('plgCommunityEvents');
     $cache->setCaching($caching);
     $callback = array($this, '_getEventsHTML');
     $content = $cache->call($callback, true, $events, $user, $config, $model->getEventsCount($user->id), $creatable);
     return $content;
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:31,代码来源:events.php

示例2: onAfterRouter

 function onAfterRouter()
 {
     if ($this->_admin) {
         return;
     }
     JPlugin::loadLanguage('com_content', JPATH_SITE);
 }
开发者ID:educacionbe,项目名称:stabwall,代码行数:7,代码来源:plg_sj_content_listing_ajax.php

示例3: onContentPrepare

 public function onContentPrepare($context, &$article, &$params, $limitstart)
 {
     $app = JFactory::getApplication();
     /* @var $app JApplication */
     // Do not render the buttons in administration area
     if ($app->isAdmin()) {
         return;
     }
     $doc = JFactory::getDocument();
     /* @var $doc JDocumentHtml */
     $docType = $doc->getType();
     // Joomla! must render content of this plugin only in HTML document
     if (strcmp("html", $docType) != 0) {
         return;
     }
     $currentOption = JRequest::getCmd("option");
     if ($currentOption != "com_content" or !isset($article) or empty($article->id) or !isset($this->params)) {
         return;
     }
     JPlugin::loadLanguage('plg_mvsocialbuttons');
     $buttons = $this->getButtons($article);
     $position = $this->params->get('position');
     switch ($position) {
         case 1:
             $article->text = $buttons . $article->text;
             break;
         case 2:
             $article->text = $article->text . $buttons;
             break;
         default:
             $article->text = $buttons . $article->text . $buttons;
             break;
     }
     return true;
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:35,代码来源:mvsocialbuttons.php

示例4: construct

	function construct( )
	{
            $name = "input";
            
            if(empty($this->params)){
                    $plugin = JPluginHelper::getPlugin('fieldsattachment', $name);
                    $this->params = new JParameter($plugin->params); 
                }

            //LOAD LANGUAGE --------------------------------------------------------------
            $lang   =&JFactory::getLanguage();
            $lang->load( 'plg_fieldsattachment_'.$name  );
            $lang = &JFactory::getLanguage(); ;
            $lang_file="plg_fieldsattachment_".$name ;
            $sitepath1 = JPATH_BASE ;
            $sitepath1 = str_replace ("administrator", "", $sitepath1);
            $path = $sitepath1."languages".DS . $lang->getTag() .DS.$lang->getTag().".".$lang_file.".php.ini";
            
            if(JFile::exists($path)){
               JPlugin::loadLanguage( 'plg_fieldsattachment_'.$name );
            }
            //-----------------------------------------------------------------------------
            //JPlugin::loadLanguage( 'plg_fieldsattachment_input' );
            
            $this->params->set( "name" , $name  );
	}
开发者ID:xenten,项目名称:swift-kanban,代码行数:26,代码来源:input.php

示例5: onProfileDisplay

 function onProfileDisplay()
 {
     // Load language
     $lang =& JFactory::getLanguage();
     JPlugin::loadLanguage('plg_community_plg_rsmembership', JPATH_ADMINISTRATOR);
     // Attach CSS
     $document =& JFactory::getDocument();
     $css = JURI::base() . 'plugins/community/plg_rsmembership/style.css';
     $document->addStyleSheet($css);
     if (!file_exists($this->_path)) {
         $content = '<div class="icon-nopost"><img src="' . JURI::base() . 'components/com_community/assets/error.gif" alt="" /></div>';
         $content .= '<div class="content-nopost">' . JText::_('RSM_NOT_INSTALLED') . '</div>';
     } else {
         require_once $this->_path;
         $user =& CFactory::getActiveProfile();
         $userName = $user->getDisplayName();
         $userId = $user->id;
         $memberships = $this->_getMemberships();
         $Itemid = $this->getItemid();
         $cache =& JFactory::getCache('plgCommunityPlg_RSMembership');
         $cache->setCaching($this->params->get('cache', 1));
         $callback = array('plgCommunityPlg_RSMembership', '_getRSMembershipHTML');
         $content = $cache->call($callback, $userName, $userId, $memberships, $Itemid);
     }
     return $content;
 }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:26,代码来源:plg_rsmembership.php

示例6: _getTagText

    private function _getTagText($html)
    {
        JPlugin::loadLanguage('plg_system_pftomsproject', JPATH_ADMINISTRATOR);
        $str2 = null;
        $r = null;
        $p1 = '%<dd class="owner-data">.*?</dd>%si';
        $str2 = ' $0 
						<div class="btn-toolbar btn-toolbar-top">
							<div class="btn-group">
								<button class="btn export">
									<i class="cus-doc-pdf"></i> ' . JText::_('PLG_PFTOMSPROJECT_LABEL_EXPORT') . '
								</button>
								<button class="btn dropdown-toggle" data-toggle="dropdown">
									<span class="caret"></span>
								</button>
								<ul class="dropdown-menu">
									<li>
										<a href="index.php?option=com_pfprojects&view=projects&action=export&cid="><i class="cus-doc-excel-table"></i> ' . JText::_('PLG_PFTOMSPROJECT_LABEL_MS2013') . '</a>
									</li>									
								</ul>
							</div>
						</div>';
        $r = preg_replace($p1, $str2, $html);
        return $r;
    }
开发者ID:hlgrl13,项目名称:Projectfork-3rd-Party-Extensions,代码行数:25,代码来源:pftomsproject.php

示例7: onProfileDisplay

 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_mygoogleads', JPATH_ADMINISTRATOR);
     $config = CFactory::getConfig();
     $config = CFactory::getConfig();
     $this->loadUserParams();
     $uri = JURI::base();
     $user = CFactory::getRequestUser();
     $document = JFactory::getDocument();
     $css = $uri . 'plugins/community/mygoogleads/mygoogleads/style.css';
     $document->addStyleSheet($css);
     $googleCode = $this->userparams->get('googleCode');
     $content = '';
     if (!empty($googleCode)) {
         $mainframe = JFactory::getApplication();
         $caching = $this->params->get('cache', 1);
         if ($caching) {
             $caching = $mainframe->getCfg('caching');
         }
         $cache = JFactory::getCache('plgCommunityMyGoogleAds');
         $cache->setCaching($caching);
         $callback = array('plgCommunityMyGoogleAds', '_getGoogleAdsHTML');
         $content = $cache->call($callback, $googleCode, $user->id);
     } else {
         // $content = "<div class=\"icon-nopost\"><img src=\"".JURI::base()."components/com_community/assets/error.gif\" alt=\"\" /></div>";
         $content .= "<div class=\"content-nopost\">" . JText::_('PLG_GOOGLE_ADS_NOT_SET') . "</div>";
     }
     return $content;
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:29,代码来源:mygoogleads.php

示例8: onProfileDisplay

 function onProfileDisplay()
 {
     if (!self::kunenaOnline()) {
         return;
     }
     //Load Language file.
     JPlugin::loadLanguage('plg_community_mykunena', JPATH_ADMINISTRATOR);
     $document = JFactory::getDocument();
     $document->addStyleSheet(JURI::base() . 'plugins/community/mykunena/style.css');
     $items = array();
     $user = CFactory::getRequestUser();
     if ($user->id) {
         require_once KPATH_SITE . '/funcs/latestx.php';
         $obj = new CKunenaLatestX('userposts', 0);
         $obj->user = JFactory::getUser($user->id);
         $obj->threads_per_page = $this->params->get('count', 5);
         $obj->embedded = 1;
         $obj->getUserPosts();
         $items = $obj->customreply;
     }
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $app = JFactory::getApplication();
         $caching = $app->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyKunena');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyKunena', '_getMyKunenaHTML');
     $content = $cache->call($callback, $user, $items);
     return $content;
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:mykunena.php

示例9: onProfileDisplay

 /**
  * Ajax function to save a new wall entry
  *
  * @param message    A message that is submitted by the user
  * @param uniqueId    The unique id for this group
  *
  **/
 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_myvideos', JPATH_ADMINISTRATOR);
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $user = CFactory::getRequestUser();
     $userid = $user->id;
     $this->loadUserParams();
     $def_limit = $this->params->get('count', 10);
     $limit = JRequest::getVar('limit', $def_limit, 'REQUEST');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     $row = $this->getVideos($userid, $limitstart, $limit);
     $total = count($row);
     if ($this->params->get('hide_empty', 0) && !$total) {
         return '';
     }
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyVideos');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyVideos', '_getLatestVideosHTML');
     $count = $this->userparams->get('count', $def_limit);
     $dbg = "<!--DEFLIMIT {$def_limit} USERPARAMLIMIT {$count}-->";
     $content = $dbg . $cache->call($callback, $userid, $count, $limitstart, $row, $total);
     return $content;
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:35,代码来源:myvideos.php

示例10: onContentPrepare

 /**
  *  Handle onPrepareLocatie
  *
  */
 public function onContentPrepare($context, $article, $params, $page = 0)
 {
     // just startup
     $replacement = '';
     $app = JFactory::getApplication();
     // Only render in the HTML format
     $document = JFactory::getDocument();
     $type = $document->getType();
     $html = $type == 'html';
     // find all instances of plugin and put in $matches
     preg_match_all($this->_regex1, $article->text, $declarations);
     // Return if there are no matches
     if (!count($declarations[0])) {
         return true;
     }
     JPlugin::loadLanguage('plg_content_googlecalendar', JPATH_ADMINISTRATOR);
     // make replacement
     $replacement = $this->params->get('code');
     if (!$replacement) {
         $article->text = preg_replace($this->_regex1, '', $article->text);
         return true;
     }
     //Replace
     $article->text = preg_replace($this->_regex1, $replacement, $article->text);
 }
开发者ID:shamusdougan,项目名称:GDMCWebsite,代码行数:29,代码来源:googlecalendar.php

示例11: onProfileDisplay

 /**
  * Ajax function to save a new wall entry
  *
  * @param message	A message that is submitted by the user
  * @param uniqueId	The unique id for this group
  *
  * */
 function onProfileDisplay()
 {
     //Load language file.
     JPlugin::loadLanguage('plg_community_myarticles', JPATH_ADMINISTRATOR);
     // Attach CSS
     $document = JFactory::getDocument();
     $css = JURI::base() . 'plugins/community/myarticles/myarticles/style.css';
     $document->addStyleSheet($css);
     if (JRequest::getVar('task', '', 'REQUEST') == 'app') {
         $app = 1;
     } else {
         $app = 0;
     }
     $user = CFactory::getRequestUser();
     $userid = $user->id;
     $def_limit = $this->params->get('count', 10);
     $limit = JRequest::getVar('limit', $def_limit, 'REQUEST');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     $row = $this->getArticle($userid, $limitstart, $limit, $this->section);
     $cat = $this->getCatAlias();
     $total = $this->countArticle($userid, $this->section);
     if ($this->params->get('hide_empty', 0) && !$total) {
         return '';
     }
     $mainframe = JFactory::getApplication();
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyArticles');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyArticles', '_getArticleHTML');
     $content = $cache->call($callback, $userid, $limit, $limitstart, $row, $app, $total, $cat, $this->params);
     return $content;
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:42,代码来源:myarticles.php

示例12: construct

 /**
  * Constructor
  *
  * For php4 compatability we must not use the __constructor as a constructor for plugins
  * because func_get_args ( void ) returns a copy of all passed arguments NOT references.
  * This causes problems with cross-referencing necessary for the observer design pattern.
  *
  * @access	protected
  * @param	object	$subject The object to observe
  * @param 	array   $config  An array that holds the plugin configuration
  * @since	1.0
  */
 function construct()
 {
     $name = "file";
     if (empty($this->params)) {
         $plugin = JPluginHelper::getPlugin('fieldsattachment', $name);
         $this->params = new JParameter($plugin->params);
     }
     $this->params->set("name", $name);
     //$this->params->set( "path" , '..'.DS.'images'.DS.'documents'  );
     /* $sitepath = JURI::base() ;
        $pos = strrpos($sitepath, "administrator");
        if(!empty($pos)){$sitepath  = JURI::base().'..'.DS;}*/
     $sitepath = fieldsattachHelper::getabsoluteURL();
     $this->params->set("path", $sitepath . 'images' . DS . 'documents');
     // $this->params->set( "sitepath" , $sitepath );
     $this->params->set("documentpath", JPATH_INSTALLATION . DS . '..' . DS . 'images' . DS . 'documents');
     //LOAD LANGUAGE --------------------------------------------------------------
     $lang =& JFactory::getLanguage();
     $lang->load('plg_fieldsattachment_' . $name);
     $lang =& JFactory::getLanguage();
     $lang_file = "plg_fieldsattachment_" . $name;
     $sitepath1 = JPATH_BASE;
     $sitepath1 = str_replace("administrator", "", $sitepath1);
     $path = $sitepath1 . "languages" . DS . $lang->getTag() . DS . $lang->getTag() . "." . $lang_file . ".php.ini";
     if (JFile::exists($path)) {
         JPlugin::loadLanguage('plg_fieldsattachment_' . $name);
     }
     //-----------------------------------------------------------------------------
 }
开发者ID:xenten,项目名称:swift-kanban,代码行数:41,代码来源:file.php

示例13: construct

 /**
  * Constructor
  *
  * For php4 compatability we must not use the __constructor as a constructor for plugins
  * because func_get_args ( void ) returns a copy of all passed arguments NOT references.
  * This causes problems with cross-referencing necessary for the observer design pattern.
  *
  * @access	protected
  * @param	object	$subject The object to observe
  * @param 	array   $config  An array that holds the plugin configuration
  * @since	1.0
  */
 function construct()
 {
     $name = "image";
     $this->name = $name;
     /*$sitepath = JURI::base() ;
       $pos = strrpos($sitepath, "administrator");
       if(!empty($pos)){$sitepath  = JURI::base().'..'.DS;}*/
     $sitepath = fieldsattachHelper::getabsoluteURL();
     $this->path1 = $sitepath . 'images' . DS . 'documents';
     $documentpath = fieldsattachHelper::getabsolutePATH();
     if (JRequest::getVar('option') == 'com_categories' && JRequest::getVar('layout') == "edit") {
         $this->documentpath = $documentpath . DS . 'images' . DS . 'documentscategories';
     }
     //LOAD LANGUAGE --------------------------------------------------------------
     $lang =& JFactory::getLanguage();
     $lang->load('plg_fieldsattachment_' . $name);
     $lang =& JFactory::getLanguage();
     $lang_file = "plg_fieldsattachment_" . $name;
     $sitepath1 = JPATH_BASE;
     $sitepath1 = str_replace("administrator", "", $sitepath1);
     $path = $sitepath1 . "languages" . DS . $lang->getTag() . DS . $lang->getTag() . "." . $lang_file . ".php.ini";
     if (JFile::exists($path)) {
         JPlugin::loadLanguage('plg_fieldsattachment_' . $name);
     }
     //-----------------------------------------------------------------------------
 }
开发者ID:AxelFG,项目名称:ckbran-inf,代码行数:38,代码来源:image.php

示例14: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     JPlugin::loadLanguage('com_virtuemart', JPATH_ADMINISTRATOR);
     $model = VmModel::getModel('Manufacturer');
     $manufacturers = $model->getManufacturers(true, true, false);
     return JHTML::_('select.genericlist', $manufacturers, $control_name . '[' . $name . ']', '', $name, 'mf_name', $value, $control_name . $name);
 }
开发者ID:joselapria,项目名称:virtuemart,代码行数:7,代码来源:vmmanufacturersmenu.php

示例15: onProfileDisplay

 /**
  * Ajax function to save a new wall entry
  *
  * @param message	A message that is submitted by the user
  * @param uniqueId	The unique id for this group
  *
  **/
 function onProfileDisplay()
 {
     JPlugin::loadLanguage('plg_community_mytaggedvideos', JPATH_ADMINISTRATOR);
     $mainframe = JFactory::getApplication();
     // Attach CSS
     $document = JFactory::getDocument();
     // $css		= JURI::base() . 'plugins/community/myvideos/style.css';
     // $document->addStyleSheet($css);
     $user = CFactory::getRequestUser();
     $userid = $user->id;
     $this->loadUserParams();
     $def_limit = $this->params->get('count', 10);
     $limit = JRequest::getVar('limit', $def_limit, 'REQUEST');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     $row = $this->getVideos($userid);
     $total = count($row);
     if ($this->params->get('hide_empty', 0) && !$total) {
         return '';
     }
     $caching = $this->params->get('cache', 1);
     if ($caching) {
         $caching = $mainframe->getCfg('caching');
     }
     $cache = JFactory::getCache('plgCommunityMyTaggedVideos');
     $cache->setCaching($caching);
     $callback = array('plgCommunityMyTaggedVideos', '_getLatestVideosHTML');
     $content = $cache->call($callback, $userid, $this->userparams->get('count', 5), $limitstart, $row, $total);
     return $content;
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:36,代码来源:mytaggedvideos.php


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