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


PHP serendipity_smarty_show函数代码示例

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


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

示例1: serendipity_plugin_api_core_event_hook

function serendipity_plugin_api_core_event_hook($event, &$bag, &$eventData, &$addData)
{
    global $serendipity;
    switch ($event) {
        case 'js_backend':
        case 'js':
            // Add a global available (index.tpl; admin/index.tpl; preview_iframe.tpl) redirect error string function used by errorToExceptionHandler()
            // hardened by admin only - better have that here, to be reachable everywhere
            if ($serendipity['production'] === true && $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN) {
                echo "\nfunction errorHandlerCreateDOM(htmlStr) {\n    var frag = document.createDocumentFragment(),\n        temp = document.createElement('div');\n        temp.innerHTML = htmlStr;\n    while (temp.firstChild) {\n        frag.appendChild(temp.firstChild);\n    }\n    return frag;\n} \n";
            }
            break;
        case 'external_plugin':
            switch ($eventData) {
                case 'admin/serendipity_editor.js':
                    header('Content-Type: application/javascript');
                    global $serendipity;
                    echo serendipity_smarty_show('admin/serendipity_editor.js.tpl', null, 'JS', 'include/plugin_api.inc.php:external_plugin');
                    break;
            }
            break;
        case 'backend_save':
        case 'backend_publish':
            echo '<script>$(document).ready(function() { if(Modernizr.indexeddb) { serendipity.eraseEntryEditorCache(); } });</script>';
            return true;
            break;
    }
}
开发者ID:smoeding,项目名称:Serendipity,代码行数:28,代码来源:plugin_api.inc.php

示例2: serendipity_plugin_api_core_event_hook

function serendipity_plugin_api_core_event_hook($event, &$bag, &$eventData, &$addData)
{
    global $serendipity;
    switch ($event) {
        case 'js_backend':
        case 'js':
            // Add a global available (index.tpl; admin/index.tpl; preview_iframe.tpl) redirect error string function used by errorToExceptionHandler()
            // hardened by admin only - better have that here, to be reachable everywhere
            if ($serendipity['production'] === true && $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN) {
                echo "\nfunction errorHandlerCreateDOM(htmlStr) {\n    var frag = document.createDocumentFragment(),\n        temp = document.createElement('div');\n        temp.innerHTML = htmlStr;\n    while (temp.firstChild) {\n        frag.appendChild(temp.firstChild);\n    }\n    return frag;\n} \n";
            }
            break;
        case 'external_plugin':
            if ($eventData == 'admin/serendipity_editor.js') {
                header('Content-Type: application/javascript');
                echo serendipity_smarty_show('admin/serendipity_editor.js.tpl', null, 'JS', 'include/plugin_api.inc.php:external_plugin');
            }
            break;
        case 'backend_save':
        case 'backend_publish':
            // this is preview_iframe.tpl updertHooks [ NOT ONLY!! See freetags ]
            if ($_GET['serendipity']['is_iframe'] == 'true' && $_GET['serendipity']['iframe_mode'] == 'save') {
                echo "\n" . '<script>document.addEventListener("DOMContentLoaded", function() { if (window.parent.Modernizr.indexedDB) { window.parent.serendipity.eraseEntryEditorCache(); } });</script>' . "\n";
            }
            break;
    }
}
开发者ID:amirchrist,项目名称:Serendipity,代码行数:27,代码来源:plugin_api.inc.php

示例3: array

        $data['rip_entry'] = array();
        foreach ($serendipity['POST']['multiDelete'] as $idx => $id) {
            $ids .= (int) $id . ',';
            $entry = serendipity_fetchEntry('id', $id, 1, 1);
            $data['is_multidelete'] = true;
            $data['rip_entry'][] = sprintf(DELETE_SURE, $entry['id'] . ' - ' . serendipity_specialchars($entry['title']));
        }
        $newLoc = '?' . serendipity_setFormToken('url') . '&amp;serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=doMultiDelete&amp;serendipity[id]=' . $ids;
        $data['switched_output'] = true;
        $data['newLoc'] = $newLoc;
        break;
    case 'edit':
        $entry = serendipity_fetchEntry('id', $serendipity['GET']['id'], 1, 1);
    default:
        include_once S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php';
        // edit entry mode
        $entryForm = serendipity_printEntryForm('?', array('serendipity[action]' => 'admin', 'serendipity[adminModule]' => 'entries', 'serendipity[adminAction]' => 'save'), isset($entry) ? $entry : array());
}
$data['entryForm'] = $entryForm;
$data['errors'] = $errors;
$data['get'] = $serendipity['GET'];
// don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime
// make sure we've got these
if (!isset($data['urltoken'])) {
    $data['urltoken'] = serendipity_setFormToken('url');
}
if (!isset($data['formtoken'])) {
    $data['formtoken'] = serendipity_setFormToken();
}
echo serendipity_smarty_show('admin/entries.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:vonnordmann,项目名称:Serendipity,代码行数:31,代码来源:entries.inc.php

示例4: array

        }
        if ($info['demoURL']) {
            $data['templates'][$theme]['demoURL'] = $info['demoURL'];
        }
    }
    $unmetRequirements = array();
    if (isset($info['require serendipity']) && version_compare($info['require serendipity'], serendipity_getCoreVersion($serendipity['version']), '>')) {
        $unmetRequirements[] = 'Serendipity ' . $info['require serendipity'];
        $data['templates'][$theme]['unmetRequirements'] = sprintf(UNMET_REQUIREMENTS, implode(', ', $unmetRequirements));
    }
    if ($info['recommended']) {
        $data['recommended_templates'][$theme] = $data['templates'][$theme];
        if ($theme != $serendipity['template'] && $theme != $serendipity['template_backend']) {
            unset($data['templates'][$theme]);
        }
    }
}
uasort($data['templates'], function ($a, $b) {
    return strnatcasecmp($a['info']['name'], $b['info']['name']);
});
$data['cur_tpl'] = $data['templates'][$serendipity['template']];
$data['cur_tpl_backend'] = $data['templates'][$serendipity['template_backend']];
unset($data['templates'][$serendipity['template']]);
if ($serendipity['template'] != $serendipity['template_backend'] && isset($data['recommended_templates'][$serendipity['template_backend']]) && isset($data['templates'][$serendipity['template_backend']])) {
    // when we could not unset a template because it is a backend template, and when that template is also a recommended template, then it will now
    // be in recommended and in the normal tmeplate list. We just detected that and have to remove it
    unset($data['templates'][$serendipity['template_backend']]);
}
unset($data['recommended_templates'][$serendipity['template']]);
echo serendipity_smarty_show('admin/templates.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:jimjag,项目名称:Serendipity,代码行数:31,代码来源:templates.inc.php

示例5: serendipity_fetchCategories

    $data['cat'] = $this_cat;
    if (!is_array($this_cat) || isset($this_cat['authorid']) && $this_cat['authorid'] == '0' || isset($read_groups[0])) {
        $data['selectAllReadAuthors'] = true;
    }
    if (!is_array($this_cat) || isset($this_cat['authorid']) && $this_cat['authorid'] == '0' || isset($write_groups[0])) {
        $data['selectAllWriteAuthors'] = true;
    }
    $categories = serendipity_fetchCategories('all');
    $categories = serendipity_walkRecursive($categories, 'categoryid', 'parentid', VIEWMODE_THREADED);
    $data['categories'] = $categories;
    // hook content as var to category.inc.tpl, to place inside the form
    ob_start();
    serendipity_plugin_api::hook_event('backend_category_showForm', $cid, $this_cat);
    $data['category_showForm'] = ob_get_contents();
    ob_end_clean();
}
if ($serendipity['GET']['adminAction'] == 'view') {
    if (empty($admin_category)) {
        $cats = serendipity_fetchCategories('all');
    } else {
        $cats = serendipity_fetchCategories(null, null, null, 'write');
    }
    $data['view'] = true;
    $data['viewCats'] = $cats;
    if (is_array($cats)) {
        $categories = serendipity_walkRecursive($cats, 'categoryid', 'parentid', VIEWMODE_THREADED);
        $data['viewCategories'] = $categories;
    }
}
echo serendipity_smarty_show('admin/category.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:vonnordmann,项目名称:Serendipity,代码行数:31,代码来源:category.inc.php

示例6: array

            $from = array();
        } elseif (serendipity_checkPermission('adminUsersMaintainOthers') || serendipity_checkPermission('adminUsersMaintainSame') && $group_intersect) {
            $data['create_permission'] = true;
            $from =& $user[0];
            unset($from['password']);
        } else {
            $from = array();
        }
    } else {
        $from = array();
    }
    $data['from'] = $from;
    $config = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
    if (!empty($serendipity['GET']['userid'])) {
        $from['groups'] = serendipity_getGroups($serendipity['GET']['userid']);
    } else {
        $from['groups'] = array();
    }
    $data['config'] = serendipity_printConfigTemplate($config, $from, true, false, true, true);
} elseif ($serendipity['GET']['adminAction'] == 'delete' && serendipity_checkPermission('adminUsersDelete')) {
    $user = serendipity_fetchUsers($serendipity['GET']['userid']);
    $group_intersect = serendipity_intersectGroup($user[0]['authorid']);
    if (serendipity_checkPermission('adminUsersMaintainOthers') || serendipity_checkPermission('adminUsersMaintainSame') && $group_intersect) {
        $data['delete'] = true;
        $data['userid'] = (int) $serendipity['GET']['userid'];
        $data['realname'] = $user[0]['realname'];
        $data['formToken'] = serendipity_setFormToken();
    }
}
echo serendipity_smarty_show('admin/users.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:vonnordmann,项目名称:Serendipity,代码行数:31,代码来源:users.inc.php

示例7: array

    global $serendipity;
    if (!serendipity_checkPermission('adminImagesView')) {
        return;
    }
    $output = "";
    // After upload, do not show the list to be able to proceed to
    // media selection.
    if ($addvar_check && !empty($GLOBALS['image_selector_addvars'])) {
        return true;
    }
    if (!isset($serendipity['thumbPerPage'])) {
        $serendipity['thumbPerPage'] = 2;
    }
    $smarty_vars = array('textarea' => isset($serendipity['GET']['textarea']) ? $serendipity['GET']['textarea'] : false, 'htmltarget' => isset($serendipity['GET']['htmltarget']) ? $serendipity['GET']['htmltarget'] : '', 'filename_only' => isset($serendipity['GET']['filename_only']) ? $serendipity['GET']['filename_only'] : false);
    $show_upload = isset($serendipity['GET']['showUpload']) ? $serendipity['GET']['showUpload'] : false;
    $output .= serendipity_displayImageList(isset($serendipity['GET']['page']) ? $serendipity['GET']['page'] : 1, $serendipity['thumbPerPage'], isset($serendipity['GET']['showMediaToolbar']) ? serendipity_db_bool($serendipity['GET']['showMediaToolbar']) : true, NULL, $show_upload, NULL, $smarty_vars);
    return $output;
}
if (!isset($data['showML'])) {
    if (isset($_REQUEST['go_properties'])) {
        $data['showMLbutton'] = true;
    } else {
        // always having the ML available is useful when switching the filter after adding an image, thus being in the add-case
        $data['showML'] = showMediaLibrary();
    }
}
$data['get']['fid'] = $serendipity['GET']['fid'];
// don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime
$data['get']['only_path'] = $serendipity['GET']['only_path'];
echo serendipity_smarty_show('admin/images.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:beealone,项目名称:Serendipity,代码行数:31,代码来源:images.inc.php

示例8: serendipity_iframe

/**
 * Prints the content of the iframe.
 *
 * Called by serendipity_is_iframe, when preview is requested. Fetches data from session.
 * An iframe is used so that a single s9y page must not timeout on intensive operations,
 * and so that the frontend stylesheet can be embedded without screwing up the backend.
 *
 * @access private
 * @see serendipity_is_iframe()
 * @param   mixed   The entry array (comes from session variable)
 * @param   string  Indicates whether an entry is previewed or saved. Save performs XML-RPC calls.
 * @param   boolean Use smarty templating?
 * @return  boolean Indicates whether iframe data was printed
 */
function serendipity_iframe(&$entry, $mode = null)
{
    global $serendipity;
    if (empty($mode) || !is_array($entry)) {
        return false;
    }
    $data = array();
    $data['is_preview'] = true;
    $data['mode'] = $mode;
    switch ($mode) {
        case 'save':
            ob_start();
            $res = serendipity_updertEntry($entry);
            $data['updertHooks'] = ob_get_contents();
            ob_end_clean();
            if (is_string($res)) {
                $data['res'] = $res;
            }
            if (!empty($serendipity['lastSavedEntry'])) {
                $data['lastSavedEntry'] = $serendipity['lastSavedEntry'];
            }
            $data['entrylink'] = serendipity_archiveURL($res, $entry['title'], 'serendipityHTTPPath', true, array('timestamp' => $entry['timestamp']));
            break;
        case 'preview':
            $serendipity['smarty_preview'] = true;
            $data['preview'] = serendipity_printEntries(array($entry), $entry['extended'] != '' ? 1 : 0, true);
            break;
    }
    return serendipity_smarty_show('preview_iframe.tpl', $data);
}
开发者ID:beealone,项目名称:Serendipity,代码行数:44,代码来源:functions_config.inc.php

示例9: sprintf

            $showWritableNote = true;
        }
    }
    $data['showWritableNote'] = $showWritableNote;
    $data['errorCount'] = $errorCount;
    if ($errorCount < 1) {
        if (sizeof($sqlfiles) > 0) {
            $data['database_update_types'] = sprintf(SERENDIPITY_UPGRADER_DATABASE_UPDATES, $serendipity['dbType']);
            $data['sqlfiles'] = $sqlfiles;
        }
        $taskCount = 0;
        $data['tasks'] = array();
        foreach ($tasks as $task) {
            if (version_compare($serendipity['versionInstalled'], $task['version'], '<')) {
                $data['tasks'][] = $task;
                $taskCount++;
            }
        }
        $data['taskCount'] = $taskCount;
    }
}
$data['get']['action'] = $serendipity['GET']['action'];
// don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime
$data['templatePath'] = $serendipity['templatePath'];
if (!is_object($serendipity['smarty'])) {
    serendipity_smarty_init();
}
/* see on top */
#$serendipity['smarty']->registerPlugin('function', 'serendipity_upgraderResultDiagnose', 'serendipity_smarty_backend_upgraderResultDiagnose');
echo serendipity_smarty_show('admin/upgrader.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:smoeding,项目名称:Serendipity,代码行数:31,代码来源:upgrader.inc.php

示例10: serendipity_strftime

                if ($plugin->serendipity_owner == '0' || $plugin->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers')) {
                    serendipity_plugin_api::remove_plugin_instance($key);
                }
            }
        }
    }
    if (isset($_POST['SAVE'])) {
        $data['save'] = true;
        $data['timestamp'] = serendipity_strftime('%H:%M:%S');
    }
    ob_start();
    serendipity_plugin_api::hook_event('backend_pluginlisting_header', $null);
    $data['backend_pluginlisting_header'] = ob_get_contents();
    ob_end_clean();
    ob_start();
    serendipity_plugin_api::hook_event('backend_plugins_sidebar_header', $serendipity);
    $data['backend_plugins_sidebar_header'] = ob_get_contents();
    ob_end_clean();
    $data['sidebar_plugins'] = show_plugins(false, $sidebars);
    ob_start();
    serendipity_plugin_api::hook_event('backend_plugins_event_header', $serendipity);
    $data['backend_plugins_event_header'] = ob_get_contents();
    ob_end_clean();
    $data['event_plugins'] = show_plugins(true);
    if (count($serendipity['memSnaps']) > 0) {
        $data['$memsnaps'] = $serendipity['memSnaps'];
    }
    $data['updateAllMsg'] = isset($serendipity['GET']['updateAllMsg']);
}
echo serendipity_smarty_show('admin/plugins.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:vonnordmann,项目名称:Serendipity,代码行数:31,代码来源:plugins.inc.php

示例11: array

            $data['perms'][$perm]['permission'] = false;
        } else {
            $data['perms'][$perm]['permission'] = true;
        }
    }
    if ($serendipity['enablePluginACL']) {
        $data['enablePluginACL'] = true;
        $allplugins =& serendipity_plugin_api::get_event_plugins();
        $allhooks = array();
        $data['allplugins'] = $allplugins;
        foreach ($allplugins as $plugid => $currentplugin) {
            foreach ($currentplugin['b']->properties['event_hooks'] as $hook => $set) {
                $allhooks[$hook] = array();
            }
            $data['allplugins'][$plugid]['has_permission'] = serendipity_hasPluginPermissions($plugid, $from['id']);
        }
        ksort($allhooks);
        $data['allhooks'] = $allhooks;
        foreach ($allhooks as $hook => $set) {
            $data['allhooks'][$hook]['has_permission'] = serendipity_hasPluginPermissions($hook, $from['id']);
        }
    }
} elseif ($serendipity['GET']['adminAction'] == 'delete') {
    $data['delete'] = true;
    $group = serendipity_fetchGroup($serendipity['GET']['group']);
    $data['group_id'] = $serendipity['GET']['group'];
    $data['group'] = $group;
    $data['formToken'] = serendipity_setFormToken();
}
echo serendipity_smarty_show('admin/groups.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:vonnordmann,项目名称:Serendipity,代码行数:31,代码来源:groups.inc.php

示例12: serendipity_printConfigTemplate

/**
 * Parses the configuration array and displays the configuration screen
 *
 * @access public
 * @param   array       Configuration superarray
 * @param   array       The previous values submitted by the user
 * @param   boolean     If true, no HTML FORM container will be emitted
 * @param   boolean     If true, the configuration sections will all be folded
 * @param   boolean     If true, the user can turn config sections on and off
 * @param   boolean     If true, the user can NOT display possibly dangerous options
 * @return null
 */
function serendipity_printConfigTemplate($config, $from = false, $noForm = false, $folded = true, $allowToggle = true, $showDangerous = false)
{
    global $serendipity;
    $data = array();
    $data['noForm'] = $noForm;
    $data['formToken'] = serendipity_setFormToken();
    $data['allowToggle'] = $allowToggle;
    foreach ($config as &$category) {
        foreach ($category['items'] as &$item) {
            $value = $from[$item['var']];
            /* Calculate value if we are not installed, how clever :) */
            if ($from == false) {
                $value = serendipity_query_default($item['var'], $item['default']);
            }
            /* Check for installOnly flag */
            if (in_array('installOnly', $item['flags']) && IS_installed === true) {
                continue;
            }
            if (in_array('hideValue', $item['flags'])) {
                $value = '';
            }
            if (!$showDangerous && $item['view'] == 'dangerous') {
                continue;
            }
            if (in_array('config', $item['flags']) && isset($from['authorid'])) {
                $value = serendipity_get_user_config_var($item['var'], $from['authorid'], $item['default']);
            }
            if (in_array('parseDescription', $item['flags'])) {
                $item['description'] = serendipity_replaceEmbeddedConfigVars($item['description']);
            }
            if (in_array('probeDefault', $item['flags'])) {
                $item['default'] = serendipity_probeInstallation($item['var']);
            }
            if (in_array('ifEmpty', $item['flags']) && empty($value)) {
                $value = serendipity_query_default($item['var'], $item['default']);
            }
            $item['guessedInput'] = serendipity_guessInput($item['type'], $item['var'], $value, $item['default']);
        }
    }
    $data['config'] = $config;
    return serendipity_smarty_show('admin/config_template.tpl', $data);
}
开发者ID:smoeding,项目名称:Serendipity,代码行数:54,代码来源:functions_installer.inc.php

示例13: array

<?php

$data = array();
// do not move to end of switch, since this will change smarty assignment scope
ob_start();
include S9Y_INCLUDE_PATH . 'include/admin/import.inc.php';
$data['importMenu'] = ob_get_contents();
ob_end_clean();
switch ($serendipity['GET']['adminAction']) {
    case 'integrity':
        $data['action'] = "integrity";
        if (!is_readable(S9Y_INCLUDE_PATH . 'checksums.inc.php') || 0 == filesize(S9Y_INCLUDE_PATH . 'checksums.inc.php')) {
            $data['noChecksum'] = true;
            break;
        }
        $data['badsums'] = serendipity_verifyFTPChecksums();
        break;
    case 'runcleanup':
        // The smarty method clearCompiledTemplate() clears all compiled smarty template files in templates_c
        // Since there may be other compiled template files in templates_c too, we have to restrict this call() to clear the blogs template only,
        // to not have the following automated recompile, force the servers memory to get exhausted,
        // when using plugins like serendipity_event_gravatar plugin, which can eat up some MB...
        // Restriction to template means: leave the page we are on: ../admin/index.tpl and all others, which are set, included and compiled by runtime. (plugins, etc. this can be quite some..!)
        if (method_exists($serendipity['smarty'], 'clearCompiledTemplate')) {
            $data['cleanup_finish'] = (int) $serendipity['smarty']->clearCompiledTemplate(null, $serendipity['template']);
            $data['cleanup_template'] = $serendipity['template'];
        }
        break;
}
echo serendipity_smarty_show('admin/maintenance.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:vonnordmann,项目名称:Serendipity,代码行数:31,代码来源:maintenance.inc.php

示例14: serendipity_set_config_var

                }
                if (serendipity_checkConfigItemFlags($item, 'configuration')) {
                    serendipity_set_config_var($item['var'], $_POST[$item['var']], $serendipity['authorid']);
                }
            }
            $pl_data = array('id' => $serendipity['POST']['authorid'], 'authorid' => $serendipity['POST']['authorid'], 'username' => $_POST['username'], 'realname' => $_POST['realname'], 'email' => $_POST['email']);
            serendipity_updatePermalink($pl_data, 'author');
            serendipity_plugin_api::hook_event('backend_users_edit', $pl_data);
        }
        if ($serendipity['authorid'] === $_SESSION['serendipityAuthorid']) {
            if (is_null($serendipity['detected_lang'])) {
                $_SESSION['serendipityLanguage'] = $serendipity['lang'];
            }
        }
        $from = $_POST;
    }
}
$data['formToken'] = serendipity_setFormToken();
$template = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
$user = serendipity_fetchUsers($serendipity['authorid']);
$from = $user[0];
$from['groups'] = serendipity_getGroups($serendipity['authorid']);
unset($from['password']);
$data['config'] = serendipity_printConfigTemplate($template, $from, true, false);
$add = array('internal' => true);
serendipity_plugin_api::hook_event('backend_sidebar_entries_event_display_profiles', $from, $add);
if (!is_object($serendipity['smarty'])) {
    serendipity_smarty_init();
}
echo serendipity_smarty_show('admin/personal.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:vonnordmann,项目名称:Serendipity,代码行数:31,代码来源:personal.inc.php

示例15: elseif

        $class = 'serendipity_admin_list_item_' . ($i % 2 == 0 ? 'even' : 'uneven');
        if ($comment['status'] == 'pending') {
            $class .= ' serendipity_admin_comment_pending';
            $header_class = 'serendipityAdminMsgNote serendipity_admin_comment_pending_header';
        } elseif (strstr($comment['status'], 'confirm')) {
            $class .= ' serendipity_admin_comment_pending serendipity_admin_comment_confirm';
            $header_class = 'serendipityAdminMsgNote serendipity_admin_comment_pending_header serendipity_admin_comment_confirm_header';
        } else {
            $header_class = '';
        }
        $comment['class'] = $class;
        $comment['header_class'] = $header_class;
        if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://' && substr($comment['url'], 0, 8) != 'https://') {
            $comment['url'] = 'http://' . $comment['url'];
        }
        // include all comment vars back into upper array to assign to Smarty
        $comments[] = $comment;
    }
}
$data['comments'] = $comments;
$data['errormsg'] = $errormsg;
$data['msg'] = $msg;
$data['urltoken'] = serendipity_setFormToken('url');
$data['formtoken'] = serendipity_setFormToken();
$data['get']['filter'] = $serendipity['GET']['filter'];
// don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime
if (!is_object($serendipity['smarty'])) {
    serendipity_smarty_init();
}
echo serendipity_smarty_show('admin/comments.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */
开发者ID:amirchrist,项目名称:Serendipity,代码行数:31,代码来源:comments.inc.php


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