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


PHP autop函数代码示例

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


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

示例1: autop

<?php

/**
 * Elgg system settings on initial installation
 *
 * @package Elgg
 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 *
 */
echo "<p>" . autop(elgg_echo("installation:settings:description")) . "</p>";
echo elgg_view("settings/system", array("action" => "action/systemsettings/install"));
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:13,代码来源:install.php

示例2: autop

<?php

/**
 * Elgg .htaccess not found message
 * Is saved to the errors register when the main .htaccess cannot be found
 * 
 * @package Elgg
 * @subpackage Core
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.org/
 */
echo autop(elgg_echo('installation:error:htaccess'));
?>
<textarea cols="120" rows="30"><?php 
echo $vars['.htaccess'];
?>
</textarea>
开发者ID:eokyere,项目名称:elgg,代码行数:19,代码来源:htaccess.php

示例3: get_input

 *
 * @package Elgg.Core.Plugin
 * @subpackage uservalidationbyadmin.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' => uservalidationbyadmin_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 autop(elgg_echo('uservalidationbyadmin: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="uservalidationbyadmin-checkall" />' . elgg_echo('uservalidationbyadmin:check_all') . '</label>';
$validate = elgg_view('output/url', array('href' => 'action/uservalidationbyadmin/validate/', 'text' => elgg_echo('uservalidationbyadmin:admin:validate'), 'title' => elgg_echo('uservalidationbyadmin:confirm_validate_checked'), 'class' => 'uservalidationbyadmin-submit', 'is_action' => true, 'is_trusted' => true));
/*
$resend_email = elgg_view('output/url', array(
	'href' => 'action/uservalidationbyadmin/resend_validation/',
	'text' => elgg_echo('uservalidationbyadmin:admin:resend_validation'),
	'title' => elgg_echo('uservalidationbyadmin:confirm_resend_validation_checked'),
开发者ID:nizaranand,项目名称:Elgg-uservalidationbyadmin,代码行数:31,代码来源:bulk_action.php

示例4: foreach

 $i = 0;
 if (!empty($vars['items'])) {
     foreach ($vars['items'] as $item) {
         // echo elgg_view_river_item($item);
         if (elgg_view_exists($item->view, 'default')) {
             $body = elgg_view($item->view, array('item' => $item), false, false, 'default');
             $time = date("r", $item->posted);
             if ($entity = get_entity($item->object_guid)) {
                 $url = htmlspecialchars($entity->getURL());
             } else {
                 $url = $vars['url'];
             }
             $title = strip_tags($body);
             $jsonitem = $item;
             $jsonitem->url = $url;
             $jsonitem->description = autop($body);
             $jsonitem->title = $title;
             unset($jsonitem->view);
             if ($subject = get_entity($item->subject_guid)) {
                 elgg_view_entity($subject);
             }
             if ($object = get_entity($item->object_guid)) {
                 elgg_view_entity($object);
             }
             $jsonexport['activity'][] = $jsonitem;
         }
         $i++;
         if ($i >= $vars['limit']) {
             break;
         }
     }
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:list.php

示例5: date

echo date("r", $vars['entity']->time_created);
?>
</pubDate>
	<link><?php 
echo $vars['entity']->getURL();
?>
#<?php 
echo $vars['annotation']->id;
?>
</link>
	<title><![CDATA[<?php 
echo $title;
?>
]]></title>
	<description><![CDATA[<?php 
echo autop($vars['annotation']->value);
?>
]]></description>
	<?php 
$owner = get_entity($vars['entity']->owner);
if ($owner) {
    ?>
	<dc:creator><?php 
    echo $owner->name;
    ?>
</dc:creator>
<?php 
}
?>
	<?php 
if ($vars['entity'] instanceof Locatable && $vars['entity']->getLongitude() && $vars['entity']->getLatitude()) {
开发者ID:ashwiniravi,项目名称:Elgg-Social-Network-Single-Sign-on-and-Web-Statistics,代码行数:31,代码来源:default.php

示例6: elgg_echo

 * @subpackage Core
 * @author Curverider Ltd
 * @link http://elgg.org/
 */
if ($vars['settings.php']) {
    echo elgg_echo('installation:settings:dbwizard:savefail');
    ?>
<div>
	<textarea rows="50" cols="120"><?php 
    echo $vars['settings.php'];
    ?>
</textarea>
</div>
<?php 
} else {
    echo autop(elgg_echo('installation:error:settings'));
    ?>
<div>
	<h2><?php 
    echo elgg_echo('installation:settings:dbwizard:prompt');
    ?>
</h2>
	<form method="POST">
		<table cellpadding="0" cellspacing="10" style="background:#f1f1f1;">
			<tr><td valign="top"><?php 
    echo elgg_echo('installation:settings:dbwizard:label:user');
    ?>
</td><td valign="top"> <input type="text" name="db_install_vars[CONFIG_DBUSER]" /></td></tr>
			<tr><td valign="top"><?php 
    echo elgg_echo('installation:settings:dbwizard:label:pass');
    ?>
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:settings.php

示例7: elgg_echo

}
?>

<br /><!-- bit of space at the bottom of the widget gallery -->

</div><!-- /#customise_editpanel_rhs -->
</div><!-- /#widget_picker_gallery -->


<div class="customise_editpanel_instructions">
<h2><?php 
echo elgg_echo('defaultwidgets:' . $context . ':title');
?>
</h2>
<?php 
echo autop(elgg_echo('widgets:add:description'));
?>
</div>


<div id="customise_page_view">

<table cellspacing="0">
  <tr>
    <td colspan="2" align="left" valign="top">
    
    <?php 
if (get_context() == "profile") {
    ?>
    		<h2 class="profile_box"><?php 
    echo elgg_echo("widgets:profilebox");
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:editor.php

示例8: foreach

            $return .= '<div class="clearfix"></div><div id="calendar"></div>';
            $return .= '<ul class="evenstkey"><li class="available"></li><li>Available</li><li class="unavailable"></li><li>Unavailable</li></ul>';
            $return .= '</div>';
            $return .= '</div>';
            $return .= '<div class="col-sm-6">';
            $return .= '<h3>' . (count($mainevents) > 1 ? 'Available Events' : 'Event') . '</h3>';
            foreach ($mainevents as $main) {
                $return .= '<div class="row"><div class="col-sm-2">';
                $return .= '<span class="pointer" data-toggle="lightbox" data-target="' . $main->Event_Poster__c . '" data-alt="' . $main->Name . '"><img src="' . $main->Event_Poster__c . '" alt="' . $main->Name . '" /></span>';
                $return .= '</div><div class="col-sm-10">';
                $return .= '<h4>' . $main->Name . '</h4>';
                $return .= '<p>Starting: ' . $main->Event_Series_Start_Day__c . '</p>';
                $return .= '<p>Ending: ' . $main->Event_Series_End_Day__c . '</p>';
                $return .= '<span class="btn btn-default" onclick="toggle_visibility(\'mainevent-' . $main->ID . '\');">More Details</span>';
                $return .= '<div id="mainevent-' . $main->ID . '" style="display: none;">';
                $return .= autop(nl2br($main->Event_Series_Details__c));
                $return .= '</div></div>';
                $return .= '</div><hr>';
            }
            $return .= '</div>';
            $return .= '</div>';
            $return .= '<div id="couponCode" data-code="' . $post['s'] . '" />';
            $return .= '<div id="activeDate" data-date="' . date("Y-m-d") . '" />';
            $return .= '<div id="availableEvents" data-events=\'' . $jsonevents . '\' />';
        } else {
            $return = '<p class="bs-callout bs-callout-warning">Coupon code has already been redeemed</p>';
        }
    } else {
        $return = '<p class="bs-callout bs-callout-warning">please submit a valid coupon code</p>';
    }
} else {
开发者ID:david-ievents,项目名称:iEvents.com-Dev,代码行数:31,代码来源:search.php

示例9: rembo

/**
 * NOT USED IN CORE - Used for update process - Replace bbcode in text by html tag
 * used in update_065_068.php
 *
 * @param $string string: initial string
 *
 * @return formatted string
**/
function rembo($string)
{
    // Adapte de PunBB
    //Copyright (C)  Rickard Andersson (rickard@punbb.org)
    // If the message contains a code tag we have to split it up
    // (text within [code][/code] shouldn't be touched)
    if (strpos($string, '[code]') !== false && strpos($string, '[/code]') !== false) {
        list($inside, $outside) = split_text($string, '[code]', '[/code]');
        $outside = array_map('trim', $outside);
        $string = implode('<">', $outside);
    }
    $pattern = array('#\\[b\\](.*?)\\[/b\\]#s', '#\\[i\\](.*?)\\[/i\\]#s', '#\\[u\\](.*?)\\[/u\\]#s', '#\\[s\\](.*?)\\[/s\\]#s', '#\\[c\\](.*?)\\[/c\\]#s', '#\\[g\\](.*?)\\[/g\\]#s', '#\\[email\\](.*?)\\[/email\\]#', '#\\[email=(.*?)\\](.*?)\\[/email\\]#', '#\\[color=([a-zA-Z]*|\\#?[0-9a-fA-F]{6})](.*?)\\[/color\\]#s');
    $replace = array('<span class="b">$1</span>', '<em>$1</em>', '<span class="souligne">$1</span>', '<span class="barre">$1</span>', '<div class="center">$1</div>', '<big>$1</big>', '<a href="mailto:$1">$1</a>', '<a href="mailto:$1">$2</a>', '<span style="color: $1">$2</span>');
    // This thing takes a while! :)
    $string = preg_replace($pattern, $replace, $string);
    $string = clicurl($string);
    $string = autop($string);
    // If we split up the message before we have to concatenate it together again (code tags)
    if (isset($inside)) {
        $outside = explode('<">', $string);
        $string = '';
        $num_tokens = count($outside);
        for ($i = 0; $i < $num_tokens; ++$i) {
            $string .= $outside[$i];
            if (isset($inside[$i])) {
                $string .= '<br><br><div class="spaced"><table class="code center"><tr>' . '<td class="punquote"><span class="b">Code:</span><br><br><pre>' . trim($inside[$i]) . '</pre></td></tr></table></div>';
            }
        }
    }
    return $string;
}
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:39,代码来源:update_065_068.php

示例10: elgg_extract

<?php

/**
 * Elgg display long text
 * Displays a large amount of text, with new lines converted to line breaks
 *
 * @package Elgg
 * @subpackage Core
 *
 * @uses $vars['value'] The text to display
 * @uses $vars['parse_urls'] Whether to turn urls into links. Default is true.
 * @uses $vars['class']
 */
$class = 'elgg-output';
$additional_class = elgg_extract('class', $vars, '');
if ($additional_class) {
    $vars['class'] = "{$class} {$additional_class}";
} else {
    $vars['class'] = $class;
}
$parse_urls = elgg_extract('parse_urls', $vars, true);
unset($vars['parse_urls']);
$text = $vars['value'];
unset($vars['value']);
if ($parse_urls) {
    $text = parse_urls($text);
}
$text = filter_tags($text);
$text = autop($text);
$attributes = elgg_format_attributes($vars);
echo "<div {$attributes}>{$text}</div>";
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:longtext.php

示例11: autop

<?php

/**
 * Elgg plugin specific user settings.
 * 
 * @package Elgg
 * @subpackage Core
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd 
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.org/
 */
// Description of what's going on
echo "<div class=\"contentWrapper\">" . autop(elgg_echo("usersettings:plugins:description")) . "</div>";
$limit = get_input('limit', 10);
$offset = get_input('offset', 0);
// Get the installed plugins
$installed_plugins = $vars['installed_plugins'];
$count = count($installed_plugins);
// Display list of plugins
$n = 0;
foreach ($installed_plugins as $plugin => $data) {
    if (is_plugin_enabled($plugin)) {
        echo elgg_view("usersettings/plugins_opt/plugin", array('plugin' => $plugin, 'details' => $data));
    }
}
开发者ID:eokyere,项目名称:elgg,代码行数:26,代码来源:plugins.php

示例12: get_class

/**
 * Elgg exception
 * Displays a single exception
 * 
 * @package Elgg
 * @subpackage Core
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.org/
 * 
 * @uses $vars['object'] An exception
 */
global $CONFIG;
?>
<!-- 
<?php 
echo get_class($vars['object']);
?>
: <?php 
echo autop($vars['object']->getMessage());
?>


<?php 
if ($CONFIG->debug) {
    echo print_r($vars['object'], true);
}
?>
	
-->
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:exception.php

示例13: autop

<?php

/**
 * Elgg standard message
 * Displays a single Elgg system message
 * 
 * @package Elgg
 * @subpackage Core
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2009
 * @link http://elgg.org/
 * 
 * @uses $vars['object'] A system message (string)
 */
?>

	<p>
		<?php 
echo autop($vars['object']);
?>
	</p>
开发者ID:eokyere,项目名称:elgg,代码行数:22,代码来源:message.php

示例14: autop

<?php

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

示例15: promo

function promo($id)
{
    $post_7 = get_post($id);
    $title = $post_7->post_title;
    $content = $post_7->post_content;
    $promo_vid = get_post_meta($id, "rb-promo_vid", true);
    $edit_link = get_edit_post_link($id);
    echo '<div id="maxx-promo">';
    echo '    <h4>' . $title . '</h4>';
    echo '	<div id="promo-video">';
    echo '		<video controls>';
    echo '       	<source src="' . $promo_vid . '" type="video/mp4">';
    echo '        	Your browser does not support the video tag.';
    echo '    	</video>';
    echo '	</div>';
    echo '	<div id="promo-info">';
    echo autop($content);
    if (is_user_logged_in()) {
        echo '<a href="' . $edit_link . '" title="' . $title . '" class="edit-link">Edit Promo</a>';
    }
    echo '	</div>';
    echo '</div>';
}
开发者ID:xyren,项目名称:oceanic-wordpress-theme,代码行数:23,代码来源:functions.php


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