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


PHP plugin_is_installed函数代码示例

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


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

示例1: get_system_apps

function get_system_apps()
{
    $ret = array();
    $files = glob('app/*.apd');
    if ($files) {
        foreach ($files as $f) {
            $x = parse_app_description($f);
            if ($x) {
                $ret[] = $x;
            }
        }
    }
    $files = glob('addon/*/*.apd');
    if ($files) {
        foreach ($files as $f) {
            $n = basename($f, '.apd');
            if (plugin_is_installed($n)) {
                $x = parse_app_description($f);
                if ($x) {
                    $ret[] = $x;
                }
            }
        }
    }
    return $ret;
}
开发者ID:Mauru,项目名称:red,代码行数:26,代码来源:apps.php

示例2: build

function build($argv)
{
    global $_plugin;
    global $success;
    global $error;
    global $errors;
    plugin_is_installed($_plugin['name']) or $error = $error['not_installed'];
    isset($argv[3]) or $error = $errors['usage'];
    prompt('WARNING: Building a table from a definition will clear all data from your table; are you sure you want to do this?') or $error = $errors['aborted'];
    if (!$error) {
        # Let's get connected!
        db_connect();
        use_db();
        # Get definition config.
        $_definition = get_plugin_config('definitions');
        # At this point, $_definition is overwritten with the defined $_definition in the require.
        require $_definition['dir']['definitions'] . $argv[3] . '.php';
        # Drop the current table. Should really be its own script, no?
        # Check for table existence.
        if (mysql_query('SELECT * FROM ' . $_definition['name'])) {
            mysql_query('DROP TABLE ' . $_definition['name']);
        }
        # Let's build this noise!
        $query = 'CREATE TABLE ' . $_definition['name'] . '(' . "\n";
        # We'll foreach through the table def and build the SQL string as needed.
        foreach ($_definition['fields'] as $field => $data) {
            $query .= $field . ' ' . strtoupper($data['type']);
            if ($data['length']) {
                $query .= '(' . $data['length'] . ')';
            }
            if (!$data['null']) {
                $query .= ' NOT NULL';
            }
            if ($data['auto_inc']) {
                $query .= ' AUTO_INCREMENT';
            }
            # Add a comma and line break.
            $query .= ",\n";
            # Output relational data.
            if (isset($data['relation'])) {
                $query .= 'INDEX ' . $data['relation']['name'] . '_rel(' . $data['relation']['name'] . '_id)';
                $query .= ',' . "\n" . 'FOREIGN KEY(' . $data['relation']['name'] . '_id) REFERENCES ' . $data['relation']['name'] . '(id) ON DELETE CASCADE';
                $query .= ",\n";
            }
        }
        if ($_definition['primary']) {
            $query .= 'PRIMARY KEY(' . $_definition['primary'] . ')';
        }
        # End query here.
        $query .= "\n" . ')';
        //add option to display this!
        echo 'Executing the following query:' . "\n" . $query . "\n\n";
        if (mysql_query($query)) {
            //$success = 'Created ' . $_definition['name'] . ' with the following query: ' . "\n" . $query;
            $success = 'Created "' . $_definition['name'] . '"';
        } else {
            $error = mysql_error();
        }
    }
}
开发者ID:joshuamorse,项目名称:flava_framework_plugins,代码行数:60,代码来源:ops.php

示例3: get_system_apps

 public static function get_system_apps($translate = true)
 {
     $ret = array();
     if (is_dir('apps')) {
         $files = glob('apps/*.apd');
     } else {
         $files = glob('app/*.apd');
     }
     if ($files) {
         foreach ($files as $f) {
             $x = self::parse_app_description($f, $translate);
             if ($x) {
                 $ret[] = $x;
             }
         }
     }
     $files = glob('addon/*/*.apd');
     if ($files) {
         foreach ($files as $f) {
             $path = explode('/', $f);
             $plugin = $path[1];
             if (plugin_is_installed($plugin)) {
                 $x = self::parse_app_description($f, $translate);
                 if ($x) {
                     $ret[] = $x;
                 }
             }
         }
     }
     return $ret;
 }
开发者ID:BlaBlaNet,项目名称:hubzilla,代码行数:31,代码来源:Apps.php

示例4: menu

 /**
  * If the whiteboard menu plugin isnt installed, show the storyboard menu instead
  *
  * @return null|string
  */
 function menu()
 {
     if (!plugin_is_installed('WhiteboardMenu') && plugin_config_get('ShowMenu') && $this->getUserHasLevel()) {
         return '<a href="' . plugin_page('storyboard_index') . '">' . plugin_lang_get('menu_title') . '</a>';
     }
     return null;
 }
开发者ID:Cre-ator,项目名称:Whiteboard.StoryBoard-Plugin,代码行数:12,代码来源:StoryBoard.php

示例5: get_system_apps

function get_system_apps($translate = true)
{
    $ret = array();
    if (is_dir('apps')) {
        $files = glob('apps/*.apd');
    } else {
        $files = glob('app/*.apd');
    }
    if ($files) {
        foreach ($files as $f) {
            $x = parse_app_description($f, $translate);
            if ($x) {
                $ret[] = $x;
            }
        }
    }
    $files = glob('addon/*/*.apd');
    if ($files) {
        foreach ($files as $f) {
            $n = basename($f, '.apd');
            if (plugin_is_installed($n)) {
                $x = parse_app_description($f, $translate);
                if ($x) {
                    $ret[] = $x;
                }
            }
        }
    }
    return $ret;
}
开发者ID:anmol26s,项目名称:hubzilla-yunohost,代码行数:30,代码来源:apps.php

示例6: uninstall

function uninstall()
{
    global $_plugin;
    global $success;
    global $error;
    global $errors;
    plugin_is_installed($_plugin['name']) or $error = $errors['not_installed'];
    set_as_uninstalled() or $error = $errors['uninstalling'];
    $success = $_plugin['name'] . ' was successfully uninstalled';
}
开发者ID:joshuamorse,项目名称:flava_framework,代码行数:10,代码来源:ops.php

示例7: menu

 function menu()
 {
     require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'userprojectapi.php';
     if (!userprojectapi::checkPluginIsRegisteredInWhiteboardMenu()) {
         userprojectapi::addPluginToWhiteboardMenu();
     }
     if ((!plugin_is_installed('WhiteboardMenu') || !file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) && plugin_config_get('ShowMenu') && $this->getUserHasLevel()) {
         return '<a href="' . plugin_page('UserProject') . '&sortVal=userName&sort=ASC">' . plugin_lang_get('menu_title') . '</a>';
     }
     return null;
 }
开发者ID:Cre-ator,项目名称:Whiteboard.UserProjectView-Plugin,代码行数:11,代码来源:UserProjectView.php

示例8: print_page_head

 /**
  * Prints head elements of a page
  * @param $string
  */
 public function print_page_head($string)
 {
     echo '<link rel="stylesheet" href="' . STORYBOARD_FILES_URI . 'storyboard.css">';
     html_page_top1($string);
     html_page_top2();
     if (plugin_is_installed('WhiteboardMenu')) {
         require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
         $whiteboard_print_api = new whiteboard_print_api();
         $whiteboard_print_api->printWhiteboardMenu();
     }
     $this->print_plugin_menu();
 }
开发者ID:Cre-ator,项目名称:Whiteboard.StoryBoard-Plugin,代码行数:16,代码来源:storyboard_print_api.php

示例9: print_page_head

 /**
  * Prints head elements of a page
  * @param $string
  */
 public function print_page_head($string)
 {
     html_page_top1($string);
     echo '<script language="javascript" type="text/javascript" src="' . SPECMANAGEMENT_PLUGIN_URL . 'files/checkbox.js"></script>';
     echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
     html_page_top2();
     if (plugin_is_installed('WhiteboardMenu') && file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) {
         require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
         $whiteboard_print_api = new whiteboard_print_api();
         $whiteboard_print_api->printWhiteboardMenu();
     }
     $this->print_plugin_menu();
 }
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:17,代码来源:specmanagement_print_api.php

示例10: calculate_page_content

/**
 * @param $print_flag
 */
function calculate_page_content($print_flag)
{
    $specmanagement_print_api = new specmanagement_print_api();
    html_page_top1(plugin_lang_get('menu_versgraph'));
    echo '<link rel="stylesheet" href="' . SPECMANAGEMENT_PLUGIN_URL . 'files/specmanagement.css">';
    if (!$print_flag) {
        html_page_top2();
        if (plugin_is_installed('WhiteboardMenu') && file_exists(config_get_global('plugin_path') . 'WhiteboardMenu')) {
            require_once WHITEBOARDMENU_CORE_URI . 'whiteboard_print_api.php';
            $whiteboard_print_api = new whiteboard_print_api();
            $whiteboard_print_api->printWhiteboardMenu();
        }
        $specmanagement_print_api->print_plugin_menu();
        echo '<div align="center">';
        echo '<hr size="1" width="100%" />';
    }
    print_table($print_flag);
    if (!$print_flag) {
        html_page_bottom1();
    }
}
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:24,代码来源:version_graph.php

示例11: print_test_row

print_test_row('check mail configuration: send_reset_password = ON requires allow_blank_email = OFF', OFF == config_get_global('send_reset_password') || OFF == config_get_global('allow_blank_email'));
print_test_row('check mail configuration: send_reset_password = ON requires enable_email_notification = ON', OFF == config_get_global('send_reset_password') || ON == config_get_global('enable_email_notification'));
print_test_row('check mail configuration: allow_signup = ON requires enable_email_notification = ON', OFF == config_get_global('allow_signup') || ON == config_get_global('enable_email_notification'));
print_test_row('check mail configuration: allow_signup = ON requires send_reset_password = ON', OFF == config_get_global('allow_signup') || ON == config_get_global('send_reset_password'));
print_test_row('check language configuration: fallback_language is not \'auto\'', 'auto' != config_get_global('fallback_language'));
print_test_row('check configuration: allow_anonymous_login = ON requires anonymous_account to be set', OFF == config_get_global('allow_anonymous_login') || strlen(config_get_global('anonymous_account')) > 0);
$t_anon_user = false;
print_test_row('check configuration: anonymous_account is a valid username if set', strlen(config_get_global('anonymous_account')) > 0 ? ($t_anon_user = user_get_id_by_name(config_get_global('anonymous_account'))) !== false : TRUE);
print_test_row('check configuration: anonymous_account should not be an administrator', $t_anon_user ? !user_is_administrator($t_anon_user) : TRUE);
print_test_row('$g_bug_link_tag is not empty ("' . config_get_global('bug_link_tag') . '")', '' != config_get_global('bug_link_tag'));
print_test_row('$g_bugnote_link_tag is not empty ("' . config_get_global('bugnote_link_tag') . '")', '' != config_get_global('bugnote_link_tag'));
print_test_row('filters: dhtml_filters = ON requires use_javascript = ON', OFF == config_get_global('dhtml_filters') || ON == config_get_global('use_javascript'));
print_test_row('Phpmailer sendmail configuration requires escapeshellcmd. Please use a different phpmailer method if this is blocked.', PHPMAILER_METHOD_SENDMAIL != config_get('phpMailer_method') || PHPMAILER_METHOD_SENDMAIL == config_get('phpMailer_method') && function_exists('escapeshellcmd'));
print_test_row('Phpmailer sendmail configuration requires escapeshellarg. Please use a different phpmailer method if this is blocked.', PHPMAILER_METHOD_SENDMAIL != config_get('phpMailer_method') || PHPMAILER_METHOD_SENDMAIL == config_get('phpMailer_method') && function_exists('escapeshellarg'));
check_zend_optimiser_version();
if (plugin_is_installed('MantisGraph')) {
    plugin_push_current('MantisGraph');
    print_test_row('checking gd is enabled, and version 2...', get_gd_version() == 2);
    if (plugin_config_get('eczlibrary', ON) == OFF) {
        $t_jpgraph_path = config_get('absolute_path') . 'library' . DIRECTORY_SEPARATOR . 'jpgraph' . DIRECTORY_SEPARATOR;
        if (!file_exists($t_jpgraph_path . 'jpgraph.php')) {
            print_test_row('checking we can find jpgraph class files...', false);
        } else {
            require_once $t_jpgraph_path . 'jpgraph.php';
            print_test_row('Checking Jpgraph version (if installed)...', version_compare(JPG_VERSION, '2.3.0') ? true : false, JPG_VERSION);
        }
        print_test_row('check configuration: jpgraph (if used) requires php bundled gd for antialiasing support', plugin_config_get('jpgraph_antialias', OFF) == OFF || function_exists('imageantialias'));
    }
    plugin_pop_current();
}
print_test_row('Checking if ctype is enabled in php (required for rss feeds)....', extension_loaded('ctype'));
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:31,代码来源:check.php

示例12: menu

 /**
  * If the whiteboard menu plugin isnt installed, show the specificationmanagement menu instead
  *
  * @return null|string
  */
 function menu()
 {
     if ((!plugin_is_installed('WhiteboardMenu-ALT') || !file_exists(config_get_global('plugin_path') . 'WhiteboardMenu-ALT')) && plugin_config_get('ShowMenu') && $this->getUserHasLevel()) {
         return '<a href="' . plugin_page('choose_document') . '">' . plugin_lang_get('menu_title') . '</a>';
     }
     return null;
 }
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:12,代码来源:SpecManagement.php

示例13: plugin_uninstall

/**
 * Uninstall a plugin from the database.
 * @param string Plugin basename
 */
function plugin_uninstall($p_plugin)
{
    access_ensure_global_level(config_get_global('manage_plugin_threshold'));
    if (!plugin_is_installed($p_plugin->basename) || plugin_protected($p_plugin->basename)) {
        return;
    }
    $t_plugin_table = db_get_table('plugin');
    $t_query = "DELETE FROM {$t_plugin_table} WHERE basename=" . db_param();
    db_query_bound($t_query, array($p_plugin->basename));
    plugin_push_current($p_plugin->basename);
    $p_plugin->uninstall();
    plugin_pop_current();
}
开发者ID:Kirill,项目名称:mantisbt,代码行数:17,代码来源:plugin_api.php

示例14: plugin_uninstall

/**
 * Uninstall a plugin from the database.
 * @param MantisPlugin $p_plugin Plugin basename.
 * @return void
 */
function plugin_uninstall(MantisPlugin $p_plugin)
{
    access_ensure_global_level(config_get_global('manage_plugin_threshold'));
    if (!plugin_is_installed($p_plugin->basename) || plugin_protected($p_plugin->basename)) {
        return;
    }
    db_param_push();
    $t_query = 'DELETE FROM {plugin} WHERE basename=' . db_param();
    db_query($t_query, array($p_plugin->basename));
    plugin_push_current($p_plugin->basename);
    $p_plugin->uninstall();
    plugin_pop_current();
}
开发者ID:spring,项目名称:spring-website,代码行数:18,代码来源:plugin_api.php

示例15: helper_alternate_class

<tr <?php 
echo helper_alternate_class();
?>
>
<td class="category"><?php 
echo plugin_lang_get('bugfix_resolution');
?>
</td>
<td><select name="bugfix_resolution"><?php 
print_enum_string_option_list('resolution', plugin_config_get('bugfix_resolution'));
?>
</select></td>
</tr>

<?php 
if (plugin_is_installed('ProductMatrix') || plugin_config_get('enable_product_matrix')) {
    ?>
<tr <?php 
    echo helper_alternate_class();
    ?>
>
<td class="category"><?php 
    echo plugin_lang_get('bugfix_status_pvm');
    ?>
</td>
<td><select name="bugfix_status_pvm">
<option value="0" <?php 
    echo check_selected(0, plugin_config_get('bugfix_status_pvm'));
    ?>
><?php 
    echo plugin_lang_get('bugfix_status_off');
开发者ID:01-Scripts,项目名称:source-integration,代码行数:31,代码来源:manage_config_page.php


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