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


PHP bb_is_user_logged_in函数代码示例

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


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

示例1: mod_notification_profile

function mod_notification_profile()
{
    global $user_id, $mods;
    if (bb_is_user_logged_in() && is_moderator($user_id)) {
        $checked = "";
        $no_check = ' checked="checked"';
        if (mod_notification_is_activated($user_id)) {
            $checked = ' checked="checked"';
            $no_check = "";
        }
        echo '
			<fieldset>
				<legend>All Posts Notification</legend>
				<p>Select to receive an email when a new post is added by a member to any topic.</p>
				<table width="100%">
					<tr>
						<th width="21%" scope="row">Activate:</th>
						<td width="79%">
							Yes <input name="mod_notification" id="mod_notification" type="radio" value="1"' . $checked . ' />
							No <input name="mod_notification" id="mod_notification_no" type="radio" value="0"' . $no_check . ' />
						</td>
					</tr>
				</table>
			</fieldset>';
    }
}
开发者ID:achorg,项目名称:DH-Answers,代码行数:26,代码来源:moderator_notification.php

示例2: thanks_output

function thanks_output()
{
    global $bb_post, $DEFAULTS;
    $logged_in = bb_is_user_logged_in();
    $post_id = $bb_post->post_id;
    $user = bb_get_current_user();
    $uid = $logged_in ? (int) $user->ID : false;
    echo "<div class=\"thanks-output\" id=\"thanks-" . $post_id . "\">";
    echo thanks_output_details($post_id, $uid, $logged_in);
    echo "</div>";
}
开发者ID:achorg,项目名称:DH-Answers,代码行数:11,代码来源:thanks.php

示例3: em_reply_link

/**
 * Add reply link below each post
 *
 * @param $post_links Array of the links
 * @param $args Array of args
 */
function em_reply_link($post_links = array(), $args = array())
{
    global $em_plugopts;
    if ($em_plugopts['reply-link'] == 1 && $em_plugopts['reply-text'] && bb_is_topic() && topic_is_open() && (bb_is_user_logged_in() || function_exists('bb_is_login_required') && !bb_is_login_required())) {
        /* Check if link is needed */
        $text = str_replace("%%POSTLINK%%", get_post_link(), str_replace("%%USERNAME%%", get_post_author(), $em_plugopts['reply-text']));
        $js = "var ema=document.getElementById('post_content');var emb=ema.value;if(emb!='')emb+='\\n\\n';ema.value=emb+'" . $text . "\\n\\n';ema.focus();void(0);";
        $post_links[] = $args['before_each'] . '<a class="reply_link" style="cursor:pointer" onclick="' . $js . '">' . __('Reply', 'easy-mentions') . '</a>' . $args['after_each'];
    }
    return $post_links;
}
开发者ID:achorg,项目名称:DH-Answers,代码行数:17,代码来源:public.php

示例4: bb_quote_link

function bb_quote_link($link_text = 'Quote')
{
    global $bb, $page, $topic, $forum, $bb_post;
    $add = topic_pages_add();
    if (!topic_is_open($bb_post->topic_id) || !bb_is_user_logged_in()) {
        return;
    }
    $post_id = get_post_id();
    $last_page = get_page_number($topic->topic_posts + $add);
    echo '<a href="' . get_topic_link(0, $last_page) . '&quote=' . $post_id . '#postform" id="quote_' . $post_id . '">' . __($link_text) . '</a>';
}
开发者ID:achorg,项目名称:DH-Answers,代码行数:11,代码来源:quote.php

示例5: notification_profile

function notification_profile()
{
    global $user_id, $bb_current_user;
    if (bb_is_user_logged_in()) {
        $checked = "";
        $no_check = "checked='checked'";
        if (notification_is_activated($user_id)) {
            $checked = "checked='checked'";
            $no_check = "";
        }
        echo "<fieldset>\n<legend>Favorite Notification</legend>\n<p> " . __('Select to receive an email when a new post is added to a topic in your favorites list.') . "</p>\n<table>\n<tr>\n<th scope=\"row\">" . __('Activate') . "</th>\n<td>\nYes <input name=\"favorite_notification\" id=\"favorite_notification\" type=\"radio\" value=\"1\"" . $checked . " />\nNo <input name=\"favorite_notification\" id=\"favorite_notification_no\" type=\"radio\" value=\"0\"" . $no_check . " /></td>\n</tr>\n</table>\n</fieldset>\n\n";
    }
}
开发者ID:achorg,项目名称:DH-Answers,代码行数:13,代码来源:notification.php

示例6: add_twitter_to_profile_edit

function add_twitter_to_profile_edit()
{
    global $user_id, $bb_current_user, $bb_twitter;
    if (bb_current_user_can('edit_profile', $user->ID) && bb_is_user_logged_in()) {
        $twitter = fetch_user_twitter($user_id);
        $user = bb_get_user($user_id);
        $tweets_on = $user->twitter_on;
        $tweets_on_post = $user->twitter_on_post;
        ?>
<fieldset>
<legend><?php 
        _e('Twitter');
        ?>
</legend>
<table border=0>
<tr>
<th>Twitter username : </th><td><input type="text" name="twitter" value="<?php 
        echo $twitter;
        ?>
 " size="25"/></td>
</tr>
<?php 
        if (false) {
            ?>
	<tr>
	<td>Show your latest <em>tweet</em> in your profile?</td><td>
	<input name="show_tweets" value="tweets_on" type="checkbox" checked="checked"/></td>
	<input name="show_tweets" value="tweets_on" type="checkbox"/></td>
	</tr>
	<tr>
	<td>Show your latest <em>tweet</em> under each post?</td><td>
	<input name="show_tweets_post" value="tweets_on_post" type="checkbox" checked="checked"/></td>
	<input name="show_tweets_post" value="tweets_on_post" type="checkbox"/></td>
<?php 
        }
        ?>
</tr>
</table>
</fieldset>
<?php 
    }
}
开发者ID:achorg,项目名称:DH-Answers,代码行数:42,代码来源:bb-twitter.php

示例7: auto_add_favorit_profile

function auto_add_favorit_profile()
{
    global $user_id;
    if (bb_is_user_logged_in()) {
        $checked = "";
        $user = bb_get_user($user_id);
        if (!empty($user->auto_add_favorit)) {
            $checked = ' checked="checked"';
        }
        echo '
			<fieldset>
				<legend>Add my threads automatically to my favorites</legend>
				<p>Check this option to add all your threads or threads where you have posted something to your favorite list.</p>
				<table width="100%">
					<tr>
						<th width="21%" scope="row">Activate:</th>
						<td width="79%">
							<input name="edit_auto_add_favorit" id="edit_auto_add_favorit" type="checkbox" value="1"' . $checked . ' />
						</td>
					</tr>
				</table>
			</fieldset>';
    }
}
开发者ID:achorg,项目名称:DH-Answers,代码行数:24,代码来源:auto_add_favorites.php

示例8: printf

<ul class="topicmeta">
	<li><?php 
printf(__('Asked %1$s ago by %2$s'), get_topic_start_time(), get_topic_author());
?>
</li>
<?php 
if (1 < get_topic_posts()) {
    ?>
	<li><?php 
    printf(__('<a href="%1$s">Latest answer</a> from %2$s'), esc_attr(get_topic_last_post_link()), get_topic_last_poster());
    ?>
</li>
<?php 
}
if (bb_is_user_logged_in()) {
    ?>
	<li<?php 
    echo $class;
    ?>
 id="favorite-toggle"><?php 
    user_favorites_link();
    ?>
</li>
<?php 
}
do_action('topicmeta');
?>
</ul>
</div>
开发者ID:achorg,项目名称:DH-Answers,代码行数:29,代码来源:topic.php

示例9: bb_is_user_authorized

 function bb_is_user_authorized()
 {
     return bb_is_user_logged_in();
 }
开发者ID:abc2mit,项目名称:abc2mit.github.io,代码行数:4,代码来源:functions.bb-pluggable.php

示例10: bb_send_headers

function bb_send_headers()
{
    if (bb_is_user_logged_in()) {
        nocache_headers();
    }
    @header('Content-Type: ' . bb_get_option('html_type') . '; charset=' . bb_get_option('charset'));
    do_action('bb_send_headers');
}
开发者ID:nxtclass,项目名称:NXTClass,代码行数:8,代码来源:functions.bb-core.php

示例11: bb_template_scripts

function bb_template_scripts()
{
    if (bb_is_topic() && bb_is_user_logged_in()) {
        wp_enqueue_script('topic');
    } elseif (bb_is_profile() && bb_is_user_logged_in()) {
        global $self;
        if ($self == 'profile-edit.php') {
            wp_enqueue_script('profile-edit');
        }
    }
}
开发者ID:abc2mit,项目名称:abc2mit.github.io,代码行数:11,代码来源:functions.bb-template.php

示例12: nospamuser_maybe_set_user_ip_field

function nospamuser_maybe_set_user_ip_field()
{
    if (bb_is_user_logged_in() && !bb_get_usermeta(bb_get_current_user_info('ID'), 'nospamuser_ip')) {
        nospamuser_set_user_ip_field(bb_get_current_user_info('ID'));
    }
}
开发者ID:achorg,项目名称:DH-Answers,代码行数:6,代码来源:bb-nospamuser.php

示例13: bb_current_user

/**
 * Get details of the current user
 */
bb_current_user();
/**
 * Initialise CRON
 */
if (!function_exists('nxt_schedule_single_event')) {
    require_once BACKPRESS_PATH . 'functions.nxt-cron.php';
}
if (!defined('DOING_CRON') || !DOING_CRON) {
    nxt_cron();
}
/**
 * The currently viewed page number
 */
$page = bb_get_uri_page();
/**
 * Initialisation complete API hook
 */
do_action('bb_init');
/**
 * Block user if they deserve it
 */
if (bb_is_user_logged_in() && bb_has_broken_pass()) {
    bb_block_current_user();
}
/**
 * Send HTTP headers
 */
bb_send_headers();
开发者ID:nxtclass,项目名称:NXTClass,代码行数:31,代码来源:bb-settings.php

示例14: _e

    ?>
<p id="post-form-forum-container">
	<label for="forum-id"><?php 
    _e('Forum');
    ?>
		<?php 
    bb_new_topic_forum_dropdown('tab=37');
    ?>
	</label>
</p>
<?php 
}
?>

<?php 
if (bb_is_user_logged_in() && bb_is_subscriptions_active()) {
    ?>
<p id="post-form-subscription-container" class="left">
	<?php 
    bb_user_subscribe_checkbox('tab=38');
    ?>
</p>
<?php 
}
?>

<p id="post-form-submit-container" class="submit">
	<input type="submit" id="postformsub" name="Submit" value="<?php 
esc_attr_e('Send Post &raquo;');
?>
" tabindex="39" />
开发者ID:danielcoats,项目名称:schoolpress,代码行数:31,代码来源:post-form.php

示例15: oid_register

function oid_register()
{
    global $bbdb, $user_id, $openid_options;
    if (!bb_get_location() == "register-page") {
        return;
    }
    if (bb_is_user_logged_in()) {
        return;
    }
    /*
    echo "<p>Session:<br />";
    print_r($_SESSION);
    echo "</p>";
    */
    echo '<fieldset><legend>' . $openid_options['profile_text'] . '</legend>';
    if (!empty($_SESSION['OPENID']) && 0) {
        openid_session();
        $url = $_SESSION['OPENID'];
        $instructions = $openid_options['approved_text'];
        echo '<p>' . $instructions . '</p><table><tr class="form-field"><th scope="row" style="padding-left:20px;background: url(' . $openid_options['icon'] . ') no-repeat  50% 50%;">
		<label>[<a title="' . $openid_options['remove_text'] . '" href="' . add_query_arg('remove_openid', urlencode($url)) . '"><strong>x</strong></a>]</label></th><td> ' . $url . ' </td></tr>';
    } else {
        $value = "";
        $instructions = $openid_options['register_text'];
        if (isset($_GET['openid_error'])) {
            echo "<div  style='color:#000;width:75%;overflow:hidden;padding:3px 10px;background:#FFF6BF;border:1px solid #FFD324;'>" . substr(addslashes(strip_tags($_GET['openid_error'], "<br>")), 0, 200) . "</div>";
        }
        echo '<p>' . $instructions . '</p><table><tr class="form-field"><th scope="row"><label for="openid_url">OpenID</label></th>';
        echo '<td><input value="' . $value . '"  name="openid_identity" id="openid_identity"  style="padding-left:20px;  background: #fff url(' . $openid_options['icon'] . ') no-repeat center left;" type="text" />';
        if ($session_id = session_id()) {
            $session_name = session_name();
            echo '<input tabindex="0" type="hidden" name = "' . $session_name . '" value = "' . $session_id . '" />';
        }
        echo '</td></tr>';
    }
    // session else
    echo '</table></fieldset>';
}
开发者ID:achorg,项目名称:DH-Answers,代码行数:38,代码来源:openidplus.php


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