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


PHP showMessage2函数代码示例

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


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

示例1: updateINI_1_1_0

function updateINI_1_1_0()
{
    showMessage2("Updating INI-files...");
    $siteaccessList = getUserInput("Please specify the eZ Flow siteaccesses on your site (separated with space, for example eng nor): ");
    $siteaccessList = explode(' ', $siteaccessList);
    $translationSA = array();
    foreach ($siteaccessList as $siteaccess) {
        if (!file_exists('settings/siteaccess/' . $siteaccess)) {
            continue;
        }
        /* Update override.ini.append.php part */
        $settings = array('full_silverlight' => array('Source' => 'node/view/full.tpl', 'MatchFile' => 'full/silverlight.tpl', 'Subdir' => 'templates', 'Match' => array('class_identifier' => 'silverlight')), 'line_silverlight' => array('Source' => 'node/view/line.tpl', 'MatchFile' => 'line/silverlight.tpl', 'Subdir' => 'templates', 'Match' => array('class_identifier' => 'silverlight')), 'edit_ezsubtreesubscription_forum_topic' => array('Source' => 'content/datatype/edit/ezsubtreesubscription.tpl', 'MatchFile' => 'datatype/edit/ezsubtreesubscription/forum_topic.tpl', 'Subdir' => 'templates', 'Match' => array('class_identifier' => 'forum_topic')), 'block_item_article' => array('Source' => 'node/view/block_item.tpl', 'MatchFile' => 'block_item/article.tpl', 'Subdir' => 'templates', 'Match' => array('class_identifier' => 'article')), 'block_item_image' => array('Source' => 'node/view/block_item.tpl', 'MatchFile' => 'block_item/image.tpl', 'Subdir' => 'templates', 'Match' => array('class_identifier' => 'image')), 'dynamic_3_items1' => array('Source' => 'block/view/view.tpl', 'MatchFile' => 'block/dynamic_3_items1.tpl', 'Subdir' => 'templates', 'Match' => array('type' => 'Dynamic3Items', 'view' => '3_items1')));
        $ini = eZINI::instance('override.ini', 'settings/siteaccess/' . $siteaccess, null, null, false, true);
        $ini->setReadOnlySettingsCheck(false);
        $ini->setVariables($settings);
        $ini->save(false, '.append.php', false, false, 'settings/siteaccess/' . $siteaccess, false);
        /* Update menu.ini.append.php part */
        $settings = array('SelectedMenu' => array('CurrentMenu' => 'DoubleTop', 'TopMenu' => 'double_top', 'LeftMenu' => ''));
        $ini = eZINI::instance('menu.ini', 'settings/siteaccess/' . $siteaccess, null, null, false, true);
        $ini->setReadOnlySettingsCheck(false);
        $ini->setVariables($settings);
        $ini->save(false, '.append.php', false, false, 'settings/siteaccess/' . $siteaccess, false);
        /* Get site.ini for ContentObjectLocale code */
        $ini = eZINI::instance('site.ini', 'settings/siteaccess/' . $siteaccess, null, null, false, true);
        $contentObjectLocale = explode('-', $ini->variable('RegionalSettings', 'ContentObjectLocale'));
        $translationSA[$siteaccess] = ucfirst($contentObjectLocale[0]);
    }
    $settings = array(array('name' => 'site.ini', 'settings' => array('RegionalSettings' => array('TranslationSA' => $translationSA))), array('name' => 'content.ini', 'settings' => array('table' => array('CustomAttributes' => array('0' => 'summary', '1' => 'caption')), 'td' => array('CustomAttributes' => array('0' => 'valign')), 'th' => array('CustomAttributes' => array('0' => 'scope', '1' => 'abbr', '2' => 'valign')), 'CustomTagSettings' => array('AvailableCustomTags' => array('0' => 'underline'), 'IsInline' => array('underline' => 'true')), 'embed-type_images' => array('AvailableClasses' => array()))), array('name' => 'ezoe_attributes.ini', 'settings' => array('CustomAttribute_table_summary' => array('Name' => 'Summary (WAI)', 'Required' => 'true'), 'CustomAttribute_scope' => array('Name' => 'Scope', 'Title' => 'The scope attribute defines a way to associate header cells and data cells in a table.', 'Type' => 'select', 'Selection' => array('0' => '', 'col' => 'Column', 'row' => 'Row')), 'CustomAttribute_valign' => array('Title' => 'Lets you define the vertical alignment of the table cell/ header.', 'Type' => 'select', 'Selection' => array('0' => '', 'top' => 'Top', 'middle' => 'Middle', 'bottom' => 'Bottom', 'baseline' => 'Baseline')), 'Attribute_table_border' => array('Type' => 'htmlsize', 'AllowEmpty' => 'true'), 'CustomAttribute_embed_offset' => array('Type' => 'int', 'AllowEmpty' => 'true'), 'CustomAttribute_embed_limit' => array('Type' => 'int', 'AllowEmpty' => 'true'))), array('name' => 'ezxml.ini', 'settings' => array('TagSettings' => array('TagPresets' => array('0' => '', 'mini' => 'Simple formatting')))));
    foreach ($settings as $setting) {
        $iniName = $setting['name'];
        $onlyModified = false;
        if (file_exists('settings/override/' . $iniName . '.append') || file_exists('settings/override/' . $iniName . '.append.php')) {
            $ini = eZINI::instance($iniName, 'settings/override', null, null, false, true);
        } else {
            $ini = eZINI::create($iniName, 'settings/override');
            $onlyModified = true;
        }
        $ini->setReadOnlySettingsCheck(false);
        $ini->setVariables($setting['settings']);
        $ini->save(false, '.append.php', false, $onlyModified, 'settings/override', false);
    }
}
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:42,代码来源:ezflowupgrade.php

示例2: installPackages

function installPackages($packageList, $params = array())
{
    global $cli;
    showMessage2("Installing...");
    // copy/paste from eZPackage
    if (!isset($params['path'])) {
        $params['path'] = false;
    }
    // process packages
    $action = false;
    while ((list(, $packageName) = each($packageList)) && $action != EZ_INSTALL_PACKAGE_EXTRA_ACTION_QUIT) {
        $action = false;
        $cli->output($cli->stylize('emphasize', "Installing package '{$packageName}'"), true);
        $package = eZPackage::fetch($packageName);
        if (!is_object($package)) {
            showError("can't fetch package '{$packageName}'. Aborting...");
        }
        // skip package which can not be installed(e.g. which can be imported only, like 'design' and 'site' types)
        if ($package->attribute('install_type') != 'install') {
            continue;
        }
        $packageType = $package->attribute('type');
        $packageItems = $package->installItemsList();
        while ((list(, $item) = each($packageItems)) && $action != EZ_INSTALL_PACKAGE_EXTRA_ACTION_QUIT && $action != EZ_INSTALL_PACKAGE_EXTRA_ACTION_SKIP_PACKAGE) {
            $itemInstalled = false;
            do {
                $action = false;
                $package->installItem($item, $params);
                if (isset($params['error']) && is_array($params['error']) && count($params['error']) > 0) {
                    global $autoMode;
                    if ($autoMode == 'on') {
                        switch ($packageType) {
                            case 'contentclass':
                                $action = 2;
                                break;
                            case 'extension':
                                $action = 1;
                                break;
                            default:
                                $action = handlePackageError($params['error']);
                                break;
                        }
                    } else {
                        $action = handlePackageError($params['error']);
                    }
                    $params['error']['choosen_action'] = $action;
                } else {
                    $itemInstalled = true;
                }
            } while (!$itemInstalled && $action != EZ_INSTALL_PACKAGE_EXTRA_ACTION_QUIT && $action != EZ_INSTALL_PACKAGE_EXTRA_ACTION_SKIP_PACKAGE);
        }
    }
}
开发者ID:runelangseid,项目名称:ezpublish,代码行数:53,代码来源:ezwebincommon.php

示例3: eZExecuteShellCommand

function eZExecuteShellCommand($command, $errMessage = '', $retry = true, $ignore = false)
{
    $err = 0;
    do {
        $out = system($command, $err);
        if ($err) {
            if ($errMessage) {
                showMessage2($errMessage);
            }
            if ($retry) {
                do {
                    $action = $ignore ? eZGetUserInput("Retry? [y/n/Ignore]: ") : eZGetUserInput("Retry? [y/n]: ");
                    if (strpos($action, 'y') === 0) {
                        $continue = false;
                    } elseif ($ignore && strpos($action, 'I') === 0) {
                        $continue = true;
                        $retry = false;
                    } else {
                        // default action is not to retry but to abort
                        showError("Aborting...");
                    }
                } while (!$continue);
            } else {
                showError("Aborting...");
            }
        } else {
            $retry = false;
        }
    } while ($retry);
    return $err;
}
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:31,代码来源:ezconvertdbcharset.php

示例4: postInstallAdminSiteaccessINIUpdate

            postInstallAdminSiteaccessINIUpdate($params);
            postInstallUserSiteaccessINIUpdate($params);
            createTranslationSiteAccesses($params);
            // updateTemplateLookClassAttributes() and updateTemplateLookObjectAttributes();
            $classIdentifier = 'template_look';
            $newAttributeIdArr = expandClass($classIdentifier);
            foreach ($newAttributeIdArr as $id) {
                updateObject($classIdentifier, $id);
            }
            $templateLookData = templateLookObjectData($params);
            $siteInstaller->updateContentObjectAttributes(array('object_id' => $webinInstaller->setting('template_look_object_id'), 'attributes_data' => $templateLookData));
            $siteInstaller->swapNodes(array('src_node' => array('name' => "eZ Publish"), 'dst_node' => array('name' => "Home")));
            $siteInstaller->removeContentObject(array('name' => 'eZ Publish'));
            $webinInstaller->postInstall();
        }
        //
        // Output installation status.
        //
        showMessage2('Installation complete.');
        showMessage('URLs to access eZWebin sites:');
        foreach ($siteaccessUrls as $siteaccessType => $siteaccessInfo) {
            showMessage("  {$siteaccessType}:");
            foreach ($siteaccessInfo as $siteaccessName => $urlInfo) {
                showMessage("    {$siteaccessName}: " . $urlInfo['url']);
            }
        }
    } else {
        showWarning("Unable to find installation script dir.");
    }
}
$script->shutdown(0, 'Done');
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:31,代码来源:ezwebininstall.php


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