當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。