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


PHP WFEditorPlugin类代码示例

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


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

示例1: getList

 function getList()
 {
     $wf =& WFEditorPlugin::getInstance();
     if ($wf->checkAccess('menu', '1')) {
         return '<li id="index.php?option=com_menu"><div class="tree-row"><div class="tree-image"></div><span class="folder menu nolink"><a href="javascript:;">' . JText::_('MENU') . '</a></span></div></li>';
     }
 }
开发者ID:neoandrew1000,项目名称:crao_journal,代码行数:7,代码来源:menu.php

示例2: getRootDir

 /**
  * Return the full user directory path. Create if required
  *
  * @param string	The base path
  * @access public
  * @return Full path to folder
  */
 function getRootDir()
 {
     static $root;
     if (!isset($root)) {
         $root = parent::getRootDir();
         $wf = WFEditorPlugin::getInstance();
         // Restricted Joomla! folders
         $restricted = explode(',', $wf->getParam('editor.filesystem.joomla.restrict_dir', 'administrator,cache,components,includes,language,libraries,logs,media,modules,plugins,templates,xmlrpc'));
         $allowroot = $wf->getParam('editor.filesystem.joomla.allow_root', 0);
         // Revert to default if empty
         if (empty($root) && !$allowroot) {
             $root = 'images';
         }
         // Force default if directory is a joomla directory
         $parts = explode('/', $root);
         if (in_array(strtolower($parts[0]), $restricted) && !$allowroot) {
             $root = 'images';
         }
         if (!empty($root)) {
             // Create the folder
             $full = WFUtility::makePath(JPATH_SITE, $root);
             if (!JFolder::exists($full)) {
                 $this->folderCreate($full);
             }
             // Fallback
             $root = JFolder::exists($full) ? $root : 'images';
         }
     }
     return $root;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:37,代码来源:joomla.php

示例3: getList

 function getList()
 {
     $wf = WFEditorPlugin::getInstance();
     if ($wf->checkAccess('links.joomlalinks.menu', 1)) {
         return '<li id="index.php?option=com_menu"><div class="tree-row"><div class="tree-image"></div><span class="folder menu nolink"><a href="javascript:;">' . WFText::_('WF_LINKS_JOOMLALINKS_MENU') . '</a></span></div></li>';
     }
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:7,代码来源:menu.php

示例4: array

 public function &getAggregators()
 {
     static $aggregators;
     if (!isset($aggregators)) {
         $aggregators = array();
     }
     // get the aggregator format for this instance
     $format = $this->get('format');
     if (empty($aggregators[$format])) {
         jimport('joomla.filesystem.folder');
         // get a plugin instance
         $plugin = WFEditorPlugin::getInstance();
         $aggregators[$format] = array();
         $path = WF_EDITOR_EXTENSIONS . '/aggregator';
         $files = JFolder::files($path, '\\.php$', false, true);
         foreach ($files as $file) {
             require_once $file;
             $name = basename($file, '.php');
             $classname = 'WFAggregatorExtension_' . ucfirst($name);
             // only load if enabled
             if (class_exists($classname)) {
                 $aggregator = new $classname();
                 // check if enabled
                 if ($aggregator->isEnabled()) {
                     if ($aggregator->get('format') == $format) {
                         $aggregator->set('name', $name);
                         $aggregator->set('title', 'WF_AGGREGATOR_' . strtoupper($name) . '_TITLE');
                         $aggregators[$format][] = $aggregator;
                     }
                 }
             }
         }
     }
     return $aggregators[$format];
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:35,代码来源:aggregator.php

示例5: isEnabled

 public function isEnabled()
 {
     $wf = WFEditorPlugin::getInstance();
     if (JPluginHelper::isEnabled('system', 'widgetkit_system') && $wf->getParam('popups.widgetkit.enable', 1) == 1) {
         return true;
     }
     return false;
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:8,代码来源:widgetkit.php

示例6: isEnabled

 function isEnabled()
 {
     $wf = WFEditorPlugin::getInstance();
     if (JPluginHelper::isEnabled('system', 'rokbox') && $wf->getParam('popups.rokbox.enable', 1) == 1) {
         return true;
     }
     return false;
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:8,代码来源:rokbox.php

示例7: isEnabled

 function isEnabled()
 {
     $plugin = WFEditorPlugin::getInstance();
     if ($plugin->getParam('popups.window.enable', 1) && ($plugin->getName() == 'link' || $plugin->getName() == 'imgmanager_ext')) {
         return true;
     }
     return false;
 }
开发者ID:omarmm,项目名称:MangLuoiBDS,代码行数:8,代码来源:window.php

示例8: isEnabled

 public function isEnabled()
 {
     $jce = WFEditorPlugin::getInstance();
     if (JPluginHelper::isEnabled('system', 'jcemediabox') && $jce->getParam('popups.jcemediabox.enable', 1) == 1) {
         return true;
     }
     return false;
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:8,代码来源:jcemediabox.php

示例9: getList

 public function getList()
 {
     //Reference to JConentEditor (JCE) instance
     $wf = WFEditorPlugin::getInstance();
     if ($wf->checkAccess('links.joomlalinks.contacts', 1)) {
         return '<li id="index.php?option=com_contact"><div class="tree-row"><div class="tree-image"></div><span class="folder contact nolink"><a href="javascript:;">' . WFText::_('WF_LINKS_JOOMLALINKS_CONTACTS') . '</a></span></div></li>';
     }
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:8,代码来源:contact.php

示例10: getList

 public function getList()
 {
     $advlink = WFEditorPlugin::getInstance();
     $list = '';
     if ($advlink->checkAccess('flexicontentlinks.items', '1')) {
         return '<li id="index.php?option=com_flexicontent_items&view=category&cid=1"><div class="tree-row"><div class="tree-image"></div><span class="folderflexicontent nolink"><a href="javascript:;">' . JText::_('FLEXIcontent') . '</a></span></div></li>';
     }
     return $list;
 }
开发者ID:jguilloux71,项目名称:crok-notes,代码行数:9,代码来源:items.php

示例11: getList

 public function getList()
 {
     $advlink = WFEditorPlugin::getInstance();
     $list = '';
     if ($advlink->checkAccess('JEventslinks.JEvents', '1')) {
         $list = '<li id="index.php?option=com_jevents"><div class="tree-row"><div class="tree-image"></div><span class="folder content nolink"><a href="javascript:;">' . JText::_('JEvents Content') . '</a></span></div></li>';
     }
     return $list;
 }
开发者ID:jguilloux71,项目名称:crok-notes,代码行数:9,代码来源:jevents.php

示例12: getRootDir

 /**
  * Return the full user directory path. Create if required
  *
  * @param string  The base path
  * @access public
  * @return Full path to folder
  */
 function getRootDir()
 {
     static $root;
     if (!isset($root)) {
         $user = JFactory::getUser();
         $wf = WFEditorPlugin::getInstance();
         $profile = $wf->getProfile();
         // Get base directory as shared parameter
         $root = $this->get('dir', '');
         // Remove whitespace
         $root = trim($root);
         if (!empty($root)) {
             // Convert slashes / Strip double slashes
             $root = preg_replace('/[\\\\]+/', '/', $root);
             // Remove first leading slash
             $root = ltrim($root, '/');
             // Force default directory if base param starts with a variable or a . eg $id
             if (preg_match('/[\\.\\$]/', $root[0])) {
                 $root = 'images';
             }
             jimport('joomla.user.helper');
             // Joomla! 1.6+
             if (method_exists('JUserHelper', 'getUserGroups')) {
                 $groups = JUserHelper::getUserGroups($user->id);
                 // get the first group
                 $group_id = array_shift(array_keys($groups));
                 // Joomla! 2.5?
                 if (is_int($group_id)) {
                     // usergroup table
                     $group = JTable::getInstance('Usergroup', 'JTable');
                     $group->load($group_id);
                     // usertype
                     $usertype = $group->title;
                 } else {
                     $usertype = $group_id;
                 }
             } else {
                 $usertype = $user->usertype;
             }
             // Replace any path variables
             $pattern = array('/\\$id/', '/\\$username/', '/\\$usertype/', '/\\$(group|profile)/', '/\\$day/', '/\\$month/', '/\\$year/');
             $replace = array($user->id, $user->username, $usertype, $profile->name, date('d'), date('m'), date('Y'));
             $root = preg_replace($pattern, $replace, $root);
             // split into path parts to preserve /
             $parts = explode('/', $root);
             // clean path parts
             $parts = WFUtility::makeSafe($parts, $wf->getParam('editor.websafe_mode', 'utf-8'), $wf->getParam('editor.websafe_allow_spaces', 0));
             //join path parts
             $root = implode('/', $parts);
         }
     }
     return $root;
 }
开发者ID:01J,项目名称:bealtine,代码行数:60,代码来源:filesystem.php

示例13: display

 public function display()
 {
     parent::display();
     $document = WFDocument::getInstance();
     $document->addScript(array('colorpicker'), 'plugins');
     $document->addStyleSheet(array('colorpicker'), 'plugins');
 }
开发者ID:spikart,项目名称:spikart.com.ua,代码行数:7,代码来源:colorpicker.php

示例14: execute

 function execute()
 {
     $task = JRequest::getWord('task');
     if ($task == 'compile') {
         return $this->compile();
     }
     parent::execute();
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:8,代码来源:source.php

示例15:

 /**
  * Constructor activating the default information of the class
  *
  * @access	protected
  */
 function __construct()
 {
     parent::__construct();
     $request = WFRequest::getInstance();
     // Setup plugin XHR callback functions
     $request->setRequest(array($this, 'showPreview'));
     $this->execute();
 }
开发者ID:01J,项目名称:topm,代码行数:13,代码来源:preview.php


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