本文整理汇总了PHP中plugin_get_current函数的典型用法代码示例。如果您正苦于以下问题:PHP plugin_get_current函数的具体用法?PHP plugin_get_current怎么用?PHP plugin_get_current使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了plugin_get_current函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
function init()
{
//mantisgraph_autoload();
spl_autoload_register(array('MantisGraphPlugin', 'autoload'));
$t_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR;
set_include_path(get_include_path() . PATH_SEPARATOR . $t_path);
}
示例2: init
function init()
{
// Get path to core folder
$t_core_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR;
// Include constants
require_once $t_core_path . 'constant_api.php';
}
示例3: init
function init()
{
spl_autoload_register(array('MantisKanbanPlugin', 'autoload'));
$t_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR;
set_include_path(get_include_path() . PATH_SEPARATOR . $t_path);
// register our custom tables
#$GLOBALS['g_db_table']['mantis_team_user_table'] = '%db_table_prefix%_team_user%db_table_suffix%';
#$GLOBALS['g_db_table']['mantis_team_table'] = '%db_table_prefix%_team%db_table_suffix%';
}
示例4: init
function init()
{
$this->plugin_path = 'plugins' . DIRECTORY_SEPARATOR . plugin_get_current() . DIRECTORY_SEPARATOR;
// plugin events - view the README.txt file to know where these
// events have to be called
event_declare('EVENT_GROUP_ACCESS_HAS_BUG_LEVEL', EVENT_TYPE_CHAIN);
plugin_event_hook('EVENT_GROUP_ACCESS_HAS_BUG_LEVEL', 'group_access_has_bug_level');
event_declare('EVENT_GROUP_PROJECT_GET_ALL_USER_ROWS', EVENT_TYPE_CHAIN);
plugin_event_hook('EVENT_GROUP_PROJECT_GET_ALL_USER_ROWS', 'group_project_get_all_user_rows');
}
示例5: resources
/**
* Create the resource link to load the chosen library.
*/
function resources($p_event)
{
$markup = '';
$plugin_path = config_get_global('path') . 'plugins/' . plugin_get_current();
$style = $plugin_path . '/lib/chosen.min.css';
$script = $plugin_path . '/js/chosen_for_mantisbt.js';
$chosen_script = $plugin_path . '/lib/chosen.jquery.min.js';
$markup .= '<link rel="stylesheet" type="text/css" href="' . $style . '" />';
$markup .= '<script type="text/javascript" src="' . $chosen_script . '"></script>';
$markup .= '<script type="text/javascript" src="' . $script . '"></script>';
return $markup;
}
示例6: define
} else {
define("AGILEMANTIS_END_FIELD", 'end');
define("AGILEMANTIS_COMMIT_FIELD", 'commit');
}
// URL to agileMantis plugin
define("AGILEMANTIS_PLUGIN_URL", config_get_global('path') . 'plugins/' . plugin_get_current() . '/');
// Path to agileMantis plugin folder
define("AGILEMANTIS_PLUGIN_URI", config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR);
// Path to agileMantis core folder
define("AGILEMANTIS_CORE_URI", AGILEMANTIS_PLUGIN_URI . 'core' . DIRECTORY_SEPARATOR);
// Path to agileMantis libs folder
define("AGILEMANTIS_PLUGIN_CLASS_URI", AGILEMANTIS_PLUGIN_URI . 'libs' . DIRECTORY_SEPARATOR);
// Path to agileMantisExpert license
define("AGILEMANTIS_LICENSE_PATH", config_get_global('plugin_path') . 'agileMantisExpert' . DIRECTORY_SEPARATOR . 'license' . DIRECTORY_SEPARATOR . 'license.txt');
// URL to agileMantis remote interface
define("AGILEMANTIS_SCHNITTSTELLEN_URL", 'plugins/' . plugin_get_current() . '/core/schnittstelle.php');
// URL to agileMantis Source Forge website
define("AGILEMANTIS_DEMO_VERSION_HOST", 'agilemantis.sourceforge.net');
// URL to agileMantisExpert order website
define("AGILEMANTIS_ORDER_PAGE_URL", 'http://wp12122798.server-he.de/');
// URL to agileMantisExpert plugin download
define("AGILEMANTIS_EXPERT_DOWNLOAD_LINK", 'http://www.gadiv.de/media/content/produkte/open_source/agilemantis/agileMantisExpert.zip');
// Load agileMantis common Functions
require_once AGILEMANTIS_PLUGIN_CLASS_URI . 'class_commonlib.php';
global $agilemantis_commonlib;
$agilemantis_commonlib = new gadiv_commonlib();
// Load agileMantis User Functions
require_once AGILEMANTIS_PLUGIN_CLASS_URI . 'class_agileuser.php';
global $agilemantis_au;
$agilemantis_au = new gadiv_agileuser();
// Load agileMantis Team Functions
示例7: plugin_require_api
/**
* Allows a plugin page to require a plugin-specific API
* @param string $p_file The API to be included.
* @param string $p_basename Plugin's basename (defaults to current plugin).
* @return void
*/
function plugin_require_api($p_file, $p_basename = null)
{
if (is_null($p_basename)) {
$t_current = plugin_get_current();
} else {
$t_current = $p_basename;
}
$t_path = config_get_global('plugin_path') . $t_current . '/';
require_once $t_path . $p_file;
}
示例8: define
<?php
define('STORYBOARD_PLUGIN_URL', config_get_global('path') . 'plugins/' . plugin_get_current() . '/');
define('STORYBOARD_PLUGIN_URI', config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR);
define('STORYBOARD_CORE_URI', STORYBOARD_PLUGIN_URI . 'core/');
define('STORYBOARD_FILES_URI', STORYBOARD_PLUGIN_URL . 'files/');
define('PLUGINS_STORYBOARD_THRESHOLD_LEVEL_DEFAULT', ADMINISTRATOR);
define('PLUGINS_STORYBOARD_MAX_TOOLTIP_CONTENT_LENGTH', 250);
示例9: init
/**
* EmailReporting initialization function.
*/
function init()
{
$t_path = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'core_pear' . DIRECTORY_SEPARATOR;
if (is_dir($t_path)) {
set_include_path(get_include_path() . PATH_SEPARATOR . $t_path);
}
}
示例10: plugin_lang_get
echo plugin_lang_get('show_graph');
?>
"/>
</td>
</tr>
</table>
</form>
<?php
# build the graphs if both an interval and graph type are selected
if (0 != $f_type && $f_interval > 0 && gpc_get('show', '') != '') {
$t_width = plugin_config_get('window_width');
$t_summary = $f_type % 2 != 0;
$t_body = (int) ($f_type / 2);
$f_start = $t_period->get_start_formatted();
$f_end = $t_period->get_end_formatted();
if ($t_body == 1 || $t_body == 3) {
if ($f_show_as_table) {
include config_get_global('plugin_path') . plugin_get_current() . '/pages/bug_graph_bystatus.php';
} else {
echo '<br /><img src="' . plugin_page('bug_graph_bystatus.php') . '&width=600&interval=' . $f_interval . '&start_date=' . $f_start . '&end_date=' . $f_end . '&summary=' . $t_summary . '&show_table=0" alt="Bug Graph" />';
}
}
if ($t_body == 2 || $t_body == 3) {
if ($f_show_as_table) {
include config_get_global('plugin_path') . plugin_get_current() . '/pages/bug_graph_bycategory.php';
} else {
echo '<br /><img src="' . plugin_page('bug_graph_bycategory.php') . '&width=600&interval=' . $f_interval . '&start_date=' . $f_start . '&end_date=' . $f_end . '&summary=' . $t_summary . '&show_table=0" alt="Bug Graph" />';
}
}
}
html_page_bottom();
示例11: plugin_lang_get
<label v-bind:class="{'finished': task.finished}">
<input v-on:change="toggleFinished(task)" v-model="task.finished" v-bind:disabled="readOnly" type="checkbox">
<span>{{ task.description }}</span>
</label>
<a v-on:click="changeDescription(task, $event)" v-if="!readOnly" href="#"><img alt="Edit" title="<?php
echo plugin_lang_get('edit_task');
?>
" class="edit-icon" src="images/update.png"></a>
<a v-on:click="deleteTask(task, $event)" v-if="!readOnly" href="#"><img alt="X" title="<?php
echo plugin_lang_get('delete_task');
?>
" class="delete-icon" src="images/delete.png"></a>
</li>
</ul>
<input v-on:keydown.enter="insertTask" v-model="newTask.description" v-if="!readOnly" type="text" class="<?php
echo plugin_get_current();
?>
-add-new" placeholder="<?php
echo plugin_lang_get('add_new_task');
?>
" size="40" maxlength="120" />
</form>
<script type="text/javascript" src="<?php
echo plugin_file('todolists.js');
?>
"></script>
<script type="text/javascript">
ToDoList.$set('readOnly', <?php
echo !access_has_global_level(plugin_config_get('manage_threshold')) ? 'true' : 'false';
?>
);
示例12: auth_reauthenticate
#######
auth_reauthenticate();
html_page_top1(lang_get('plugin_mite_title'));
html_page_top2();
# build config arrays for convenient access to necessary elements
#################################################################
$a_configParams['api_key'] = array('name' => Mantis2mitePlugin::DB_FIELD_API_KEY, 'value' => current_user_get_field(Mantis2mitePlugin::DB_FIELD_API_KEY), 'label' => lang_get('plugin_mite_api_key'), 'type' => 'text', 'readonly' => '', 'cssClass' => '', 'help' => '');
if ($a_configParams['api_key']['value']) {
$a_configParams['api_key']['value'] = Mantis2mitePlugin::decodeValue($a_configParams['api_key']['value']);
}
$a_configParams['account_name'] = array('name' => Mantis2mitePlugin::DB_FIELD_ACCOUNT_NAME, 'value' => current_user_get_field(Mantis2mitePlugin::DB_FIELD_ACCOUNT_NAME), 'label' => lang_get('plugin_mite_account_name'), 'type' => 'text', 'readonly' => '', 'cssClass' => '', 'help' => '');
if ($a_configParams['account_name']['value']) {
$a_configParams['account_name']['value'] = Mantis2mitePlugin::decodeValue($a_configParams['account_name']['value']);
}
# get the path to this plugin
$s_pluginDirPath = helper_mantis_url("plugins/" . plugin_get_current() . "/");
# get connection status
$b_miteConnectionVerified = current_user_get_field(Mantis2mitePlugin::DB_FIELD_CONNECT_VERIFIED);
# add options if the connection was verified
############################################
if ($b_miteConnectionVerified) {
$s_miteConnectionStatus = sprintf(lang_get('plugin_mite_connection_verified'), current_user_get_field(Mantis2mitePlugin::DB_FIELD_CONNECT_LAST_UPDATED));
$s_connectionStatusCssClass = 'plugin_mite_positive_connection_status';
$a_configParams['account_name']['readonly'] = $a_configParams['api_key']['readonly'] = " readonly='readonly'";
$a_configParams['account_name']['cssClass'] = $a_configParams['api_key']['cssClass'] = " class='readonly'";
$a_configParams['api_key']['type'] = "password";
$b_visibleBtnUnbindConnection = $b_visibleLinkChangeApiKey = $b_visibleLinkChangeAccountName = true;
$s_bgUserAccountDataCssClass = 'mite_user_account_active';
} else {
$s_miteConnectionStatus = lang_get('plugin_mite_connection_unverified');
$s_connectionStatusCssClass = 'plugin_mite_negative_connection_status';
示例13: define
<?php
define('SPECMANAGEMENT_PLUGIN_URL', config_get_global('path') . 'plugins/' . plugin_get_current() . '/');
define('SPECMANAGEMENT_PLUGIN_URI', config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR);
define('SPECMANAGEMENT_CORE_URI', SPECMANAGEMENT_PLUGIN_URI . 'core/');
define('SPECMANAGEMENT_FILES_URI', SPECMANAGEMENT_PLUGIN_URI . 'files/');
define('PLUGINS_SPECMANAGEMENT_THRESHOLD_LEVEL_DEFAULT', ADMINISTRATOR);
define('PLUGINS_SPECMANAGEMENT_READ_LEVEL_DEFAULT', REPORTER);
define('PLUGINS_SPECMANAGEMENT_WRITE_LEVEL_DEFAULT', DEVELOPER);
define('PLUGINS_SPECMANAGEMENT_COLUMN_AMOUNT', 1);
define('PLUGINS_SPECMANAGEMENT_MAX_COLUMNS', 10);
define('PLUGINS_SPECMANAGEMENT_COLUMN_STAT_DEFAULT', 50);
define('PLUGINS_SPECMANAGEMENT_RES_OPEN', 10);
define('PLUGINS_SPECMANAGEMENT_RES_FIXED', 20);
define('PLUGINS_SPECMANAGEMENT_RES_REOPENED', 30);
define('PLUGINS_SPECMANAGEMENT_RES_UNABLETOREPRODUCE', 40);
define('PLUGINS_SPECMANAGEMENT_RES_NOTFIXABLE', 50);
define('PLUGINS_SPECMANAGEMENT_RES_DUPLICATE', 60);
define('PLUGINS_SPECMANAGEMENT_RES_NOCHANGEREQUIRED', 70);
define('PLUGINS_SPECMANAGEMENT_RES_SUSPENDED', 80);
define('PLUGINS_SPECMANAGEMENT_RES_WONTFIX', 90);
define('PLUGINS_SPECMANAGEMENT_STAT_NEW', 10);
define('PLUGINS_SPECMANAGEMENT_STAT_FEEDBACK', 20);
define('PLUGINS_SPECMANAGEMENT_STAT_ACHKNOWLEDGED', 30);
define('PLUGINS_SPECMANAGEMENT_STAT_CONFIRMED', 40);
define('PLUGINS_SPECMANAGEMENT_STAT_ASSIGNED', 50);
define('PLUGINS_SPECMANAGEMENT_STAT_RESOLVED', 80);
define('PLUGINS_SPECMANAGEMENT_STAT_CLOSED', 90);
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:28,代码来源:specmanagement_constant_api.php
示例14: access_denied
if (user_get_access_level($t_current_user_id) < plugin_config_get('upload_threshold_level', PLUGINS_RELEASEMGT_UPLOAD_THRESHOLD_LEVEL_DEFAULT)) {
access_denied();
}
for ($i = 0; $i < $t_file_count; $i++) {
$t_file_error[$i] = isset($t_file[$i]['error']) ? $t_file[$i]['error'] : 0;
$t_file_id[$i] = plugins_releasemgt_file_add($t_file[$i]['tmp_name'], $t_file[$i]['name'], $t_file[$i]['type'], $t_project_id, $t_version, $t_description[$i], $t_file_error[$i]);
}
$t_redirect_url = plugin_page('releases', true);
if (plugin_config_get('notification_enable', PLUGINS_RELEASEMGT_NOTIFICATION_ENABLE_DEFAULT) == ON) {
$t_subject = plugin_config_get('email_subject', PLUGINS_RELEASEMGT_EMAIL_SUBJECT_DEFAULT);
$t_subject_replace = array('*P' => '*p', '*C' => '*c', '*V' => '*v', '*p' => project_get_name($t_project_id), '*v' => version_get_field($t_version, 'version'), '*c' => $t_file_count, '**' => '*');
foreach ($t_subject_replace as $t_key => $t_value) {
$t_subject = str_replace($t_key, $t_value, $t_subject);
}
$t_selected = plugin_config_get('email_template', PLUGINS_RELEASEMGT_EMAIL_TEMPLATE_DEFAULT);
$t_template_dir = config_get_global('plugin_path') . plugin_get_current() . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $t_selected . DIRECTORY_SEPARATOR;
$t_template = array();
$t_template['files'] = array();
$t_template['files_count'] = $t_file_count;
for ($i = 0; $i < $t_file_count; $i++) {
$t_template['files'][$i] = array();
$t_template['files'][$i]['file_name'] = $t_file[$i]['name'];
$t_template['files'][$i]['file_description'] = $t_description;
$t_template['files'][$i]['file_html_description'] = string_display_links($t_description);
$t_template['files'][$i]['file_url'] = config_get('path') . plugin_page('download', true) . '&id=' . $t_file_id[$i];
$t_template['files'][$i]['file_size'] = number_format($t_file[$i]['size']);
$t_template['files'][$i]['file_date'] = date(config_get('normal_date_format'), plugins_releasemgt_file_get_field($t_file_id[$i], 'date_added'));
}
$t_template['project_id'] = $t_project_id;
$t_template['project_name'] = project_get_name($t_project_id);
$t_template['version_id'] = $t_version;
示例15: spl_autoload_register
<?php
/**
* @param string $class
* @return void
*/
spl_autoload_register(function ($class) {
// project-specific namespace prefix
$prefix = plugin_get_current() . '\\';
// base directory for the namespace prefix
$base_dir = __DIR__ . '/src/';
// does the class use the namespace prefix?
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) !== 0) {
// no, move to the next registered autoloader
return;
}
// get the relative class name
$relative_class = substr($class, $len);
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file)) {
require $file;
}
});