本文整理汇总了PHP中Articles::allow_message方法的典型用法代码示例。如果您正苦于以下问题:PHP Articles::allow_message方法的具体用法?PHP Articles::allow_message怎么用?PHP Articles::allow_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Articles
的用法示例。
在下文中一共展示了Articles::allow_message方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strip_tags
}
$id = strip_tags($id);
// get the item from the database
$item = Articles::get($id);
// get the related anchor, if any
$anchor = NULL;
if (isset($item['anchor'])) {
$anchor = Anchors::get($item['anchor']);
}
// get the related overlay, if any
$overlay = NULL;
if (isset($item['overlay'])) {
$overlay = Overlay::load($item, 'article:' . $item['id']);
}
// owners can proceed
if (Articles::allow_message($item, $anchor)) {
$permitted = TRUE;
} else {
$permitted = FALSE;
}
// load the skin, maybe with a variant
load_skin('articles', $anchor, isset($item['options']) ? $item['options'] : '');
// clear the tab we are in, if any
if (is_object($anchor)) {
$context['current_focus'] = $anchor->get_focus();
}
// path to this page
$context['path_bar'] = Surfer::get_path_bar($anchor);
if (isset($item['id']) && $item['title']) {
$context['path_bar'] = array_merge($context['path_bar'], array(Articles::get_permalink($item) => $item['title']));
}
示例2: array
// count
if ($users_count) {
$box['bar'] += array('_count' => sprintf(i18n::ns('%d participant', '%d participants', $users_count), $users_count));
}
// add to the watch list -- $in_watch_list is set in sections/view.php
if (Surfer::get_id() && !$in_watch_list) {
Skin::define_img('TOOLS_WATCH_IMG', 'tools/watch.gif');
$box['bar'] += array(Users::get_url('article:' . $item['id'], 'track') => TOOLS_WATCH_IMG . i18n::s('Watch this page'));
}
// invite participants, for owners
if (Articles::is_owned($item, $anchor) && isset($context['with_email']) && $context['with_email'] == 'Y') {
Skin::define_img('ARTICLES_INVITE_IMG', 'articles/invite.gif');
$box['bar'] += array(Articles::get_url($item['id'], 'invite') => ARTICLES_INVITE_IMG . i18n::s('Invite participants'));
}
// notify participants
if ($count > 1 && Articles::allow_message($item, $anchor) && isset($context['with_email']) && $context['with_email'] == 'Y') {
Skin::define_img('ARTICLES_EMAIL_IMG', 'articles/email.gif');
$box['bar'] += array(Articles::get_url($item['id'], 'mail') => ARTICLES_EMAIL_IMG . i18n::s('Notify participants'));
}
// manage editors, for owners
if (Articles::is_owned($item, $anchor, TRUE) || Surfer::is_associate()) {
Skin::define_img('ARTICLES_ASSIGN_IMG', 'articles/assign.gif');
$box['bar'] += array(Users::get_url('article:' . $item['id'], 'select') => ARTICLES_ASSIGN_IMG . i18n::s('Manage participants'));
// leave this page, for editors
} elseif (Articles::is_assigned($item['id'])) {
Skin::define_img('ARTICLES_ASSIGN_IMG', 'sections/assign.gif');
$box['bar'] += array(Users::get_url('article:' . $item['id'], 'leave') => ARTICLES_ASSIGN_IMG . i18n::s('Leave this page'));
}
// headers
$headers = array(i18n::s('Person'), i18n::s('Watcher'), i18n::s('Editor'), i18n::s('Owner'));
// layout columns