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


PHP elgg_autop函数代码示例

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


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

示例1: embed_page_handler

/**
 * Page handler for embeds
 * 
 * @param array $page
 */
function embed_page_handler($page)
{
    $params = array('output' => '', 'status' => 0, 'system_messages' => array('error' => array(), 'success' => array()));
    $container_guid = get_input('container_guid');
    if ($container_guid && get_entity($container_guid)) {
        elgg_set_page_owner_guid($container_guid);
    }
    switch ($page[0]) {
        default:
        case 'tab':
            $default_tab = elgg_is_active_plugin('file') ? 'file' : 'content_items';
            $embed_tab = elgg_extract(1, $page, $default_tab);
            $title = elgg_echo("embed:embed");
            $filter = elgg_view('embed/filter', array('filter_context' => $embed_tab));
            $view = "embed/tab/{$embed_tab}";
            if (elgg_view_exists($view)) {
                $content = elgg_view($view);
            } else {
                $embed_tab = elgg_get_config('embed_tab');
                if ($embed_tab instanceof \ElggMenuItem) {
                    $view = $embed_tab->getData('view');
                    $options = $embed_tab->getData('options');
                    if ($view) {
                        $content = elgg_view($view);
                    } else {
                        if ($options) {
                            $content = elgg_view('embed/get_list', array('options' => $options));
                        }
                    }
                }
            }
            if (empty($content)) {
                $content = elgg_autop(elgg_echo('embed:section:invalid'));
            }
            $params['output'] = elgg_view_layout('one_column', array('title' => $title, 'content' => $filter . $content, 'class' => 'embed-wrapper'));
            break;
    }
    $system_messages = system_messages(NULL, "");
    if (isset($system_messages['success'])) {
        $params['system_messages']['success'] = $system_messages['success'];
    }
    if (isset($system_messages['error'])) {
        $params['system_messages']['error'] = $system_messages['error'];
        $params['status'] = -1;
    }
    // We do not want to serve this page via non-xhr requests
    if (!elgg_is_xhr()) {
        register_error(elgg_echo('embed:error:non_xhr_request'));
        return false;
    }
    echo json_encode($params);
    exit;
}
开发者ID:hypejunction,项目名称:hypeembed,代码行数:58,代码来源:page_handlers.php

示例2: autop

/**
 * Create paragraphs from text with line spacing
 *
 * @param string $string The string
 * @return string
 * @deprecated 1.9 Use elgg_autop instead
 **/
function autop($string)
{
    elgg_deprecated_notice('autop has been deprecated in favor of elgg_autop', '1.9');
    return elgg_autop($string);
}
开发者ID:gzachos,项目名称:elgg_ellak,代码行数:12,代码来源:deprecated-1.9.php

示例3: get_input

 *
 * @package Elgg.Core.Plugin
 * @subpackage UserValidationByEmail.Administration
 */
$limit = get_input('limit', 10);
$offset = get_input('offset', 0);
// can't use elgg_list_entities() and friends because we don't use the default view for users.
$ia = elgg_set_ignore_access(TRUE);
$hidden_entities = access_get_show_hidden_status();
access_show_hidden_entities(TRUE);
$options = array('type' => 'user', 'wheres' => uservalidationbyemail_get_unvalidated_users_sql_where(), 'limit' => $limit, 'offset' => $offset, 'count' => TRUE);
$count = elgg_get_entities($options);
if (!$count) {
    access_show_hidden_entities($hidden_entities);
    elgg_set_ignore_access($ia);
    echo elgg_autop(elgg_echo('uservalidationbyemail:admin:no_unvalidated_users'));
    return TRUE;
}
$options['count'] = FALSE;
$users = elgg_get_entities($options);
access_show_hidden_entities($hidden_entities);
elgg_set_ignore_access($ia);
// setup pagination
$pagination = elgg_view('navigation/pagination', array('base_url' => 'admin/users/unvalidated', 'offset' => $offset, 'count' => $count, 'limit' => $limit));
$bulk_actions_checkbox = '<label><input type="checkbox" id="uservalidationbyemail-checkall" />' . elgg_echo('uservalidationbyemail:check_all') . '</label>';
$validate = elgg_view('output/url', array('href' => 'action/uservalidationbyemail/validate/', 'text' => elgg_echo('uservalidationbyemail:admin:validate'), 'title' => elgg_echo('uservalidationbyemail:confirm_validate_checked'), 'class' => 'uservalidationbyemail-submit', 'is_action' => true, 'is_trusted' => true));
$resend_email = elgg_view('output/url', array('href' => 'action/uservalidationbyemail/resend_validation/', 'text' => elgg_echo('uservalidationbyemail:admin:resend_validation'), 'title' => elgg_echo('uservalidationbyemail:confirm_resend_validation_checked'), 'class' => 'uservalidationbyemail-submit', 'is_action' => true, 'is_trusted' => true));
$delete = elgg_view('output/url', array('href' => 'action/uservalidationbyemail/delete/', 'text' => elgg_echo('uservalidationbyemail:admin:delete'), 'title' => elgg_echo('uservalidationbyemail:confirm_delete_checked'), 'class' => 'uservalidationbyemail-submit', 'is_action' => true, 'is_trusted' => true));
$bulk_actions = <<<___END
\t<ul class="elgg-menu elgg-menu-general elgg-menu-hz float-alt">
\t\t<li>{$resend_email}</li><li>{$validate}</li><li>{$delete}</li>
开发者ID:tjcaverly,项目名称:Elgg,代码行数:31,代码来源:bulk_action.php

示例4: elgg_view

$screenshots = elgg_view('object/plugin_project/screenshots', array('entity' => $project));
$stable_downloads = elgg_view('object/plugin_project/release_table', array('entity' => $project, 'stable' => true));
?>


<h4>
	<?php 
echo elgg_view('output/text', array('value' => $project->summary));
?>
</h4>
<?php 
$image = elgg_view_entity_icon($project_owner, 'tiny');
$author_link = elgg_view('output/url', array('href' => "/plugins/developer/{$project_owner->username}", 'text' => $project_owner->name, 'encode_text' => TRUE));
$tags = elgg_view('output/tags', array('value' => $project->tags));
$by_author = elgg_echo('plugins:author:byline', array($author_link));
$last_updated = elgg_echo('plugins:last:updated', array($updated));
$body = <<<DETAILS
\t<div class="elgg-subtext">{$by_author}</div>
\t<div class="elgg-subtext">{$last_updated}</div>
DETAILS;
echo elgg_view_image_block($image, $body);
echo $screenshots;
echo $stable_downloads;
?>

<div class="elgg-output">
<?php 
echo elgg_autop($project->description);
?>
</div>
开发者ID:lorea,项目名称:Hydra-dev,代码行数:30,代码来源:plugins.php

示例5: foreach

$body .= '<thead>';
$body .= '<tr>';
foreach ($header as $h) {
    $body .= '<th>' . $h . '</th>';
}
$body .= '</tr>';
$body .= '</thead>';
$body .= '<tbody>';
foreach ($report as $record) {
    if ($record['__upload_users_status'] == 'complete') {
        $class = 'upload-users-success';
    } else {
        $class = 'upload-users-error';
    }
    $body .= "<tr class=\"{$class}\">";
    foreach ($record as $k => $value) {
        if (is_array($value)) {
            $value = implode('<br />', $value);
        }
        $body .= '<td>' . elgg_autop($value) . '</td>';
    }
    $body .= '</tr>';
}
$body .= '</tbody>';
$body .= '</table>';
$body .= '</div>';
$body .= '<div class="elgg-foot mtl">';
$body .= elgg_view('output/url', array('text' => elgg_echo('upload_users:continue:download_report'), 'href' => "upload_users/report?guid={$file->guid}", 'class' => 'elgg-button elgg-button-action'));
$body .= elgg_view('output/url', array('text' => elgg_echo('upload_users:delete'), 'href' => "action/upload_users/delete?guid={$file->guid}", 'is_action' => true, 'class' => 'elgg-button elgg-button-action'));
$body .= '</div>';
echo elgg_view_module('aside', $title, $body, array('class' => 'mam'));
开发者ID:arckinteractive,项目名称:upload_users,代码行数:31,代码来源:import.php

示例6: elgg_autop

<?php

/**
 * No results from search
 */
echo elgg_autop(elgg_echo('search:no_results'));
开发者ID:ibou77,项目名称:elgg,代码行数:6,代码来源:no_results.php

示例7: elgg_autop

<?php

/**
 * Install database page
 *
 * @uses $vars['failure'] Settings file exists but something went wrong
 */
if (isset($vars['failure']) && $vars['failure']) {
    echo elgg_autop(elgg_echo('install:database:error'));
    $vars['refresh'] = TRUE;
    $vars['advance'] = FALSE;
    echo elgg_view('install/nav', $vars);
} else {
    echo elgg_autop(elgg_echo('install:database:instructions'));
    $vars['type'] = 'database';
    $url = current_page_url();
    $form_vars = array('action' => $url, 'disable_security' => TRUE);
    echo elgg_view_form('install/template', $form_vars, $vars);
}
开发者ID:gzachos,项目名称:elgg_ellak,代码行数:19,代码来源:database.php

示例8: elgg_autop

<?php

/**
 * Install welcome page
 */
echo elgg_autop(elgg_echo('install:welcome:instructions'));
echo elgg_view('install/nav', $vars);
开发者ID:ibou77,项目名称:elgg,代码行数:7,代码来源:welcome.php

示例9: elgg_format_element

echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:search_types_menu_format:info'));
echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:combine_search_results'));
echo elgg_view('input/dropdown', ['name' => 'params[combine_search_results]', 'options_values' => $combine_search_results_options, 'value' => $plugin->combine_search_results, 'class' => 'mls']);
echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:combine_search_results:info'));
echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:search_with_loader'));
echo elgg_view('input/dropdown', ['name' => 'params[search_with_loader]', 'options_values' => $noyes_options, 'value' => $plugin->search_with_loader, 'class' => 'mls']);
echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:search_with_loader:info'));
// search hooks settings
echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:search_hooks_enabled'));
echo elgg_view('input/dropdown', ['name' => 'params[search_hooks_enabled]', 'options_values' => $yesno_options, 'value' => $plugin->search_hooks_enabled, 'class' => 'mls']);
echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:search_hooks_enabled:info'));
echo '<div class="mls plm mbm elgg-divide-left">';
echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:enable_multi_tag'));
echo elgg_view('input/dropdown', ['name' => 'params[enable_multi_tag]', 'options_values' => $noyes_options, 'value' => $plugin->enable_multi_tag, 'class' => 'mls']);
echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:enable_multi_tag:info'));
echo elgg_format_element('label', [], elgg_echo('search_advanced:settings:multi_tag_separator'));
echo elgg_view('input/dropdown', ['name' => 'params[multi_tag_separator]', 'options_values' => $separator_options, 'value' => $plugin->multi_tag_separator, 'class' => 'mls']);
echo elgg_format_element('div', ['class' => 'elgg-subtext'], elgg_echo('search_advanced:settings:multi_tag_separator:info'));
echo '</div>';
$body = '';
$body .= elgg_format_element('div', ['class' => 'elgg-admin-notices'], elgg_autop(elgg_echo('search_advanced:settings:profile_fields:disclaimer')));
if (elgg_is_active_plugin('groups')) {
    elgg_require_js('search_advanced/settings');
    $tabs = array('tabs' => array(array('text' => elgg_echo('search_advanced:settings:profile_fields:user'), 'href' => '#', 'selected' => true), array('text' => elgg_echo('search_advanced:settings:profile_fields:group'), 'href' => '#')), 'class' => 'search-advanced-settings-tabs');
    $body .= elgg_view('navigation/tabs', $tabs);
}
$body .= elgg_format_element('div', ['class' => 'search-advanced-settings-profile-fields'], elgg_view('search_advanced/settings/user_profile_fields', $vars));
if (elgg_is_active_plugin('groups')) {
    $body .= elgg_format_element('div', ['class' => 'search-advanced-settings-profile-fields hidden'], elgg_view('search_advanced/settings/group_profile_fields', $vars));
}
echo elgg_view_module('inline', elgg_echo('search_advanced:settings:profile_fields'), $body);
开发者ID:lorea,项目名称:Hydra-dev,代码行数:31,代码来源:settings.php

示例10: add_metastring

    if (!$id) {
        $id = add_metastring($string);
    }
    $map[$string] = $id;
}
$dbprefix = elgg_get_config('dbprefix');
$access = get_access_sql_suffix('e', $user->guid);
$subtype_id = get_subtype_id('object', 'messages');
if (!$subtype_id) {
    $subtype_id = add_subtype('object', 'messages');
}
$query = "SELECT COUNT(DISTINCT md.value_id) AS count\n\t\t\tFROM {$dbprefix}metadata md\n\t\t\tJOIN {$dbprefix}entities e ON e.guid = md.entity_guid\n\t\t\tJOIN {$dbprefix}metadata md2 ON md2.entity_guid = md.entity_guid AND md2.name_id = {$map['msgType']}\n\t\t\tWHERE e.type = 'object' AND e.subtype = {$subtype_id}\n\t\t\t\tAND md.name_id = {$map['msgHash']}\n\t\t\t\tAND md2.value_id = {$map[$message_type]}\n\t\t\t\tAND e.owner_guid = {$user->guid}\n\t\t\t\tAND {$access}";
$count = get_data($query);
$count = $count[0]->count;
if (!$count) {
    echo elgg_autop(elgg_echo('hj:inbox:nomessages'));
    return;
}
$query = "SELECT DISTINCT md.value_id\n\t\t\tFROM {$dbprefix}metadata md\n\t\t\tJOIN {$dbprefix}entities e ON e.guid = md.entity_guid\n\t\t\tJOIN {$dbprefix}metadata md2 ON md2.entity_guid = md.entity_guid AND md2.name_id = {$map['msgType']}\n\t\t\tWHERE e.type = 'object' AND e.subtype = {$subtype_id}\n\t\t\t\tAND md.name_id = {$map['msgHash']}\n\t\t\t\tAND md2.value_id = {$map[$message_type]}\n\t\t\t\tAND e.owner_guid = {$user->guid}\n\t\t\t\tAND {$access}\n\t\t\tORDER BY e.time_created DESC";
$hashes = get_data($query);
$options = array('owner_guids' => $user->guid, 'order_by' => 'e.time_created DESC', 'limit' => 1);
if ($read !== 'all') {
    $options['joins'][] = "JOIN {$dbprefix}metadata msg_readYet on e.guid = msg_readYet.entity_guid";
    $options['wheres'][] = "msg_readYet.name_id='{$map['readYet']}' AND msg_readYet.value_id='{$read}'";
}
if ($message_type !== 'all') {
    $options['joins'][] = "JOIN {$dbprefix}metadata msg_type on e.guid = msg_type.entity_guid";
    $options['wheres'][] = "msg_type.name_id='{$map['msgType']}' AND msg_type.value_id='{$map[$message_type]}'";
}
foreach ($hashes as $hash) {
    $tmp_options = $options;
开发者ID:amcfarlane1251,项目名称:portal,代码行数:31,代码来源:inbox.php

示例11: get_class

<?php

/**
 * Elgg exception
 * Displays a single exception
 *
 * @package Elgg
 * @subpackage Core
 *
 * @uses $vars['object'] An exception
 */
?>
<!--
<?php 
echo get_class($vars['object']);
?>
: <?php 
echo elgg_autop($vars['object']->getMessage());
?>


<?php 
if (elgg_get_config('debug')) {
    echo print_r($vars['object'], true);
}
?>

-->
开发者ID:duanhv,项目名称:mdg-social,代码行数:28,代码来源:exception.php

示例12: elgg_extract

<?php

namespace Elgg\Roles\UI;

$role = elgg_extract('entity', $vars);
if (!elgg_instanceof($role, 'object', 'role')) {
    $name = get_input('role');
    $role = roles_get_role_by_name($name);
}
if (!elgg_instanceof($role, 'object', 'role')) {
    echo elgg_autop(elgg_echo(PLUGIN_ID . ':norole', array($name)));
    return;
}
echo elgg_view_title($role->title);
echo '<br />';
$extends = $role->extends;
if ($extends && !is_array($extends)) {
    $extends = array($extends);
}
if (count($extends)) {
    echo '<div class="roles-ui-extends">';
    echo '<h3>' . elgg_echo(PLUGIN_ID . ':extends') . '</h3>';
    echo '<ul class="elgg-list">';
    foreach ($extends as $rname) {
        echo '<li>';
        echo elgg_view('output/url', array('text' => $rname, 'href' => "admin/roles/permissions?role={$rname}"));
        echo '</li>';
    }
    echo '</ul>';
    echo '</div>';
}
开发者ID:royalterra,项目名称:roles_ui,代码行数:31,代码来源:permissions.php

示例13: elgg_autop

<?php

echo elgg_autop(elgg_echo('install:settings:instructions'));
$vars['type'] = 'settings';
$url = current_page_url();
$form_vars = array('action' => $url, 'disable_security' => TRUE);
echo elgg_view_form('install/template', $form_vars, $vars);
开发者ID:ibou77,项目名称:elgg,代码行数:7,代码来源:settings.php

示例14: elgg_autop

<?php

/**
 * Reset user password form
 */
echo elgg_autop(elgg_echo('user:resetpassword:reset_password_confirm'));
echo elgg_view('input/hidden', array('name' => 'u', 'value' => $vars['guid']));
echo elgg_view('input/hidden', array('name' => 'c', 'value' => $vars['code']));
echo elgg_view('input/submit', array('value' => elgg_echo('resetpassword')));
开发者ID:tjcaverly,项目名称:Elgg,代码行数:9,代码来源:passwordreset.php

示例15: event_calendar_get_formatted_full_items

 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 */
$title = $vars['entity']->title;
$event_items = event_calendar_get_formatted_full_items($vars['entity']);
$items = array();
foreach ($event_items as $item) {
    if (trim($item->value)) {
        $items[] = '<b>' . $item->title . '</b>: ' . $item->value;
    }
}
$description = '<p>' . implode('<br />', $items) . '</p>';
if ($vars['entity']->long_description) {
    $description .= '<p>' . elgg_autop($vars['entity']->long_description) . '</p>';
} else {
    $description .= '<p>' . $vars['entity']->description . '</p>';
}
?>

	<item>
		<guid isPermaLink='true'><?php 
echo htmlspecialchars($vars['entity']->getURL());
?>
</guid>
		<link><?php 
echo htmlspecialchars($vars['entity']->getURL());
?>
</link>
		<title><![CDATA[<?php 
开发者ID:iionly,项目名称:event_calendar,代码行数:31,代码来源:event_calendar.php


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