<?php /** * Description: Array of plugin objects for HTML Beautify package * @package htmlbeautify * @subpackage build */ if (!function_exists('getPluginContent')) { function getpluginContent($filename) { $o = file_get_contents($filename); $o = str_replace('<?php', '', $o); $o = str_replace('?>', '', $o); $o = trim($o); return $o; } } $plugins = array(); $plugins[1] = $modx->newObject('modplugin'); $plugins[1]->fromArray(array('id' => 1, 'name' => 'XHTML Beautify', 'description' => 'XHTML Beautify', 'plugincode' => getPluginContent($sources['source_core'] . '/elements/plugins/xhtmlbeautify.plugin.php')), '', true, true); return $plugins;
/** * Package in plugins * * @package debugtoolbar * @subpackage build */ function getPluginContent($filename) { $o = file_get_contents($filename); $o = str_replace('<?php', '', $o); $o = str_replace('?>', '', $o); $o = trim($o); return $o; } $plugins = array(); /* create the plugin object */ $plugins[0] = $modx->newObject('modPlugin'); $plugins[0]->set('name', 'DebugToolbar'); $plugins[0]->set('description', ''); $plugins[0]->set('plugincode', getPluginContent($sources['elements'] . 'plugins/debugtoolbar.php')); $plugins[0]->set('category', 0); $events = (include $sources['data'] . 'events/events.debugtoolbar.php'); if (is_array($events) && !empty($events)) { $plugins[0]->addMany($events); $modx->log(xPDO::LOG_LEVEL_INFO, 'Packaged in ' . count($events) . ' Plugin Events for DebugToolbar.'); flush(); } else { $modx->log(xPDO::LOG_LEVEL_ERROR, 'Could not find plugin events for DebugToolbar!'); } unset($events); return $plugins;
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * SyntaxHighlighter; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * * @package syntaxhighlighter */ /** * Description: Array of plugin objects for SyntaxHighlighter package * @package syntaxhighlighter * @subpackage build */ if (!function_exists('getPluginContent')) { function getpluginContent($filename) { $o = file_get_contents($filename); $o = str_replace('<?php', '', $o); $o = str_replace('?>', '', $o); $o = trim($o); return $o; } } $plugins = array(); $plugins[1] = $modx->newObject('modplugin'); $plugins[1]->fromArray(array('id' => 1, 'name' => 'SyntaxHighlighter', 'disabled' => 1, 'description' => 'SyntaxHighlighter ' . PKG_VERSION . '-' . PKG_RELEASE . " A Revolution version of Alex Gorbatchev's JS Syntax Highlighter", 'plugincode' => getPluginContent($sources['source_core'] . '/elements/plugins/syntaxhighlighter.plugin.php')), '', true, true); $properties = (include $sources['data'] . 'properties/properties.syntaxhighlighter.php'); $plugins[1]->setProperties($properties); unset($properties); return $plugins;
<?php function getPluginContent($filename) { $o = file_get_contents($filename); $o = trim(str_replace(array('<?php', '?>'), '', $o)); return $o; } /** * @var modX $modx */ $plugins = array(); $plugins[0] = $modx->newObject('modPlugin'); $plugins[0]->fromArray(array('id' => 1, 'name' => 'Mirror', 'description' => 'Synchronizes elements from filesystem with database', 'plugincode' => getPluginContent($sources['elements'] . 'plugins/plugin.mirror.php'), 'category' => 0), '', true, true); $properties = (include $sources['data'] . 'properties/properties.mirror.php'); $plugins[0]->setProperties($properties); unset($properties); $events = (include $sources['data'] . 'events/events.mirror.php'); if (is_array($events) && !empty($events)) { $plugins[0]->addMany($events); $modx->log(xPDO::LOG_LEVEL_INFO, 'Packaged in ' . count($events) . ' Plugin Events.'); } else { $modx->log(xPDO::LOG_LEVEL_ERROR, 'Could not find plugin events.'); } return $plugins;
<?php function getPluginContent($filename) { $o = file_get_contents($filename); $o = trim(str_replace(array('<?php', '?>'), '', $o)); return $o; } $plugins = array(); $plugins[0] = $modx->newObject('modPlugin'); $plugins[0]->fromArray(array('id' => 0, 'name' => 'TranslationsGateway', 'description' => 'Manages content language switching', 'plugincode' => getPluginContent($sources['plugins'] . 'translations.plugin.php'), 'locked' => true), '', true, true); $properties = array(); // include $sources['data'].'properties/properties.doodles.php'; $plugins[0]->setProperties($properties); unset($properties); return $plugins;
* later version. * * SanitizeFilename is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * SanitizeFilename; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * * @package sanitizefilename */ /** * Description: Array of plugin objects for SanitizeFilename package * @package sanitizefilename * @subpackage build */ if (!function_exists('getPluginContent')) { function getpluginContent($filename) { $o = file_get_contents($filename); $o = str_replace('<?php', '', $o); $o = str_replace('?>', '', $o); $o = trim($o); return $o; } } $plugins = array(); $plugins[1] = $modx->newObject('modplugin'); $plugins[1]->fromArray(array('id' => 1, 'name' => 'SanitizeFilename', 'description' => 'Create redirections for resources which alias was updated', 'plugincode' => getPluginContent($sources['source_core'] . '/elements/plugins/sanitizefilename.plugin.php')), '', true, true); return $plugins;
* Place, Suite 330, Boston, MA 02111-1307 USA * * @package mycomponent */ /** * Description: Array of plugin objects for MyComponent package * @package mycomponent * @subpackage build */ if (!function_exists('getPluginContent')) { function getpluginContent($filename) { $o = file_get_contents($filename); $o = str_replace('<?php', '', $o); $o = str_replace('?>', '', $o); $o = trim($o); return $o; } } $plugins = array(); $plugins[1] = $modx->newObject('modplugin'); $plugins[1]->fromArray(array('id' => 1, 'name' => 'MyPlugin1', 'description' => 'MyPlugin1 for MyComponent.', 'plugincode' => getPluginContent($sources['source_core'] . '/elements/plugins/myplugin1.plugin.php')), '', true, true); $properties = (include $sources['data'] . 'properties/properties.myplugin1.php'); $plugins[1]->setProperties($properties); unset($properties); $plugins[2] = $modx->newObject('modplugin'); $plugins[2]->fromArray(array('id' => 2, 'name' => 'MyPlugin2', 'description' => 'MyPlugin2 for MyComponent.', 'plugincode' => getPluginContent($sources['source_core'] . '/elements/plugins/myplugin2.plugin.php')), '', true, true); $properties = (include $sources['data'] . 'properties/properties.myplugin2.php'); $plugins[2]->setProperties($properties); unset($properties); return $plugins;
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * LogPageNotFound; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA * * @package logpagenotfound */ /** * Description: plugin object for LogPageNotFound package * @package logpagenotfound * @subpackage build */ if (!function_exists('getPluginContent')) { function getpluginContent($filename) { $o = file_get_contents($filename); $o = str_replace('<?php', '', $o); $o = str_replace('?>', '', $o); $o = trim($o); return $o; } } $plugins = array(); $plugins[1] = $modx->newObject('modplugin'); $plugins[1]->fromArray(array('id' => 1, 'name' => 'LogPageNotFound', 'description' => 'LogPageNotFound plugin -- logs page-not-found requests', 'plugincode' => getPluginContent($sources['source_core'] . '/elements/plugins/logpagenotfound.plugin.php')), '', true, true); $properties = (include $sources['data'] . 'properties/properties.logpagenotfound.plugin.php'); $plugins[1]->setProperties($properties); unset($properties); return $plugins;