本文整理汇总了PHP中op_link_to_member函数的典型用法代码示例。如果您正苦于以下问题:PHP op_link_to_member函数的具体用法?PHP op_link_to_member怎么用?PHP op_link_to_member使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了op_link_to_member函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: op_message_link_to_member
/**
* opMessageHelper.
*
* @package OpenPNE
* @subpackage helper
* @author Maki TAKAHASHI <takahashi@tejimaya.com>
*/
function op_message_link_to_member(sfOutputEscaper $member = null)
{
if (function_exists('op_link_to_member')) {
return op_link_to_member($member);
}
if ($member && $member->id) {
if (sfConfig::get('sf_app') == 'mobile_frontend') {
$internal_uri = '@member_profile';
} else {
$internal_uri = '@obj_member_profile';
}
return link_to($member->name, sprintf('%s?id=%d', $internal_uri, $member->id));
}
return '';
}
示例2: op_mobile_page_title
<?php
op_mobile_page_title($community->getName(), __('Manage member'));
?>
<center>
<?php
op_include_pager_total($pager);
?>
</center>
<?php
$list = array();
foreach ($pager->getResults() as $member) {
$communityMember = Doctrine::getTable('communityMember')->retrieveByMemberIdAndCommunityId($member->getId(), $community->getId());
$list_str = op_link_to_member($member->getId());
$operation = array();
if (!($communityMember->hasPosition(array('admin', 'sub_admin')) || $communityMember->getMemberId() === $sf_user->getMemberId())) {
$operation[] = link_to(__('Drop this member'), 'community/dropMember?id=' . $community->getId() . '&member_id=' . $member->getId());
}
if ($isAdmin) {
if (!$communityMember->hasPosition(array('admin', 'admin_confirm', 'sub_admin'))) {
if ($communityMember->hasPosition('sub_admin_confirm')) {
$operation[] = __("You are requesting this %community%'s sub-administrator to this member now.");
} else {
$operation[] = link_to(__("Request this %community%'s sub-administrator to this member"), 'community/subAdminRequest?id=' . $community->getId() . '&member_id=' . $member->getId());
}
} elseif ($communityMember->hasPosition('sub_admin')) {
$operation[] = link_to(__("Demotion from this %community%'s sub-administrator"), 'community/removeSubAdmin?id=' . $community->getId() . '&member_id=' . $member->getId());
}
if (!$communityMember->hasPosition('admin')) {
示例3: op_mobile_page_title
<?php
op_mobile_page_title($member->getName(), __('Photo'));
?>
<center>
<?php
$images = $member->getMemberImage();
for ($i = 0; $i < 3 && $i < count($images); $i++) {
$image = $images[$i];
echo op_image_tag_sf_image($image->getFile(), array('size' => '120x120', 'format' => 'jpg'));
?>
<br>
<?php
echo '[' . link_to(__('Expansion'), sf_image_path($image->getFile(), array('size' => '320x320', 'format' => 'jpg'))) . ']';
?>
<br><br>
<?php
}
?>
</center>
<?php
slot('op_mobile_footer_menu');
echo op_link_to_member($member, array('link_target' => __("%1%'s Profile", array('%1%' => $member->getName()))));
end_slot();
示例4: include_customizes
<table width="100%" bgcolor="<?php
echo $op_color["core_color_4"];
?>
">
<tr><td colspan="2" align="center">
<?php
include_customizes('menu', 'top');
?>
<hr color="<?php
echo $op_color["core_color_11"];
?>
" size="3">
</td></tr>
<?php
$list = array(__('%community% Name') => $community->getName(), __('%community% Category', array(), 'form_community') => $community->getCommunityCategory(), __('Date Created') => op_format_date($community->getCreatedAt(), 'D'), __('Administrator') => op_link_to_member($community_admin->getId()), __('Count of Members') => $community->countCommunityMembers());
foreach ($community->getConfigs() as $key => $config) {
$list[__($key, array(), 'form_community')] = $config;
}
$list[__('Register policy', array(), 'form_community')] = __($sf_data->getRaw('community')->getRegisterPolicy());
$list[__('%community% Description', array(), 'form_community')] = nl2br($community->getConfig('description'));
foreach ($list as $key => $value) {
?>
<font color="<?php
echo $op_color["core_color_19"];
?>
"><?php
echo $key;
?>
:</font><br>
<?php
示例5: op_mobile_page_title
<?php
op_mobile_page_title($member->getName(), __('Photo'));
?>
<center>
<?php
$images = $member->getMemberImage();
for ($i = 0; $i < 3 && $i < count($images); $i++) {
$image = $images[$i];
echo image_tag_sf_image($image->getFile(), array('size' => '120x120', 'format' => 'jpg'));
?>
<br>
<?php
echo '[' . link_to(__('Expansion'), sf_image_path($image->getFile(), array('size' => '320x320', 'format' => 'jpg'))) . ']';
?>
<br><br>
<?php
}
?>
</center>
<?php
slot('op_mobile_footer_menu');
echo op_link_to_member($member->getId(), '@obj_member_profile', array('link_target' => __("%1%'s Profile", array('%1%' => $member->getName()))));
end_slot();
示例6: op_mobile_page_title
<?php
op_mobile_page_title($community->getName(), __('Manage member'));
?>
<center>
<?php
op_include_pager_total($pager);
?>
</center>
<?php
$list = array();
foreach ($pager->getResults() as $member) {
$communityMember = Doctrine::getTable('communityMember')->retrieveByMemberIdAndCommunityId($member->getId(), $community->getId());
$list_str = op_link_to_member($member);
$operation = array();
if (!($communityMember->hasPosition(array('admin', 'sub_admin')) || $communityMember->getMemberId() === $sf_user->getMemberId())) {
$operation[] = link_to(__('Drop this member'), 'community/dropMember?id=' . $community->getId() . '&member_id=' . $member->getId());
}
if ($isAdmin) {
if (!$communityMember->hasPosition(array('admin', 'admin_confirm', 'sub_admin'))) {
if ($communityMember->hasPosition('sub_admin_confirm')) {
$operation[] = __("You are requesting this %community%'s sub-administrator to this member now.");
} else {
$operation[] = link_to(__("Request this %community%'s sub-administrator to this member"), 'community/subAdminRequest?id=' . $community->getId() . '&member_id=' . $member->getId());
}
} elseif ($communityMember->hasPosition('sub_admin')) {
$operation[] = link_to(__("Demotion from this %community%'s sub-administrator"), 'community/removeSubAdmin?id=' . $community->getId() . '&member_id=' . $member->getId());
}
if (!$communityMember->hasPosition('admin')) {
示例7: slot
<?php
slot('firstRow');
?>
<tr><th><?php
echo __('Photo');
?>
</th><td><?php
echo op_link_to_member($member->getId(), '@obj_member_profile', array('link_target' => image_tag_sf_image($member->getImageFileName(), array('size' => '76x76'))));
?>
</td></tr>
<tr><th><?php
echo __('%nickname%', array('%nickname%' => $op_term['nickname']->titleize()));
?>
</th><td><?php
echo op_link_to_member($member->getId());
?>
</td></tr>
<?php
end_slot();
op_include_form('communityAdminRequest', $form, array('title' => __('Take over the administrator of "%1%"', array('%1%' => $community->getName())), 'firstRow' => get_slot('firstRow')));
示例8: printf
printf('%03d', $comment->number);
?>
]<?php
echo op_format_date($comment->created_at, 'XDateTime');
if ($diary->member_id === $sf_user->getMemberId() || $comment->member_id === $sf_user->getMemberId()) {
?>
[<?php
echo link_to(__('Delete'), 'diary_comment_delete_confirm', $comment);
?>
]
<?php
}
?>
<br>
<?php
echo op_link_to_member($comment->Member);
?>
<br>
<?php
echo op_auto_link_text_for_mobile(nl2br($comment->body));
?>
<br>
<?php
if ($comment->has_images) {
foreach ($comment->getDiaryCommentImagesJoinFile() as $image) {
echo link_to(__('View Image'), sf_image_path($image->File, array('size' => '240x320', 'f' => 'jpg')));
?>
<br>
<?php
}
}
示例9: link_to
<?php
if ($item->isMine()) {
?>
<div class="editLink"><?php
echo link_to(__('Edit'), '@kakiage_edit_date?' . strftime('year=%Y&month=%m&day=%d', strtotime($date)));
?>
</div>
<?php
}
?>
<div class="kakiage_member_image"><p><?php
echo op_image_tag_sf_image($item['Member']->getImageFileName(), array('alt' => sprintf('[%s]', $item['Member']), 'size' => '36x36'));
?>
</p></div>
<div class="kakiage_member"><?php
echo op_link_to_member($item['Member']);
?>
</div>
<div class="kakiage_updated_at">(<?php
echo __('Updated at');
?>
: <?php
echo op_format_date($item['updated_at'], 'XDateTimeJa');
?>
)</div>
<div class="kakiage_body"><?php
echo op_url_cmd(op_decoration(nl2br($item['body'])));
?>
</div>
</div>
<?php
示例10: if
</div>
<div class="box_body">
<p>
<span class="content">
<?php if ($activity->getImages()->count()): ?>
<?php $images = $activity->getImages() ?>
<?php for ($i = 0; $i < $images->count() && $i < 3;$i++): ?>
<?php if ($images[$i]->getFileId()): ?>
<?php echo op_image_tag_sf_image($images[$i]->getFile(), array('size' => '48x48')) ?>
<?php else: ?>
<?php echo op_image_tag($images[$i]->getUri(), array('width' => 48, 'height' => 48)) ?>
<?php endif; ?>
<?php endfor; ?>
<br />
<?php endif; ?>
<strong class="name"><?php echo op_link_to_member($activity->getMember()) ?></strong>
<span class="bodyText"><?php echo op_activity_body_filter($activity) ?></span>
</span>
<span class="info">
<span class="time"><?php echo $time = op_format_activity_time(strtotime($activity->getCreatedAt())) ?>
<?php if ($activity->getSource()): ?>
from <?php echo link_to_if($activity->getSourceUri(), $activity->getSource(), $activity->getSourceUri()) ?>
<?php endif; ?>
</span>
<?php if ($activity->getPublicFlag() != ActivityDataTable::PUBLIC_FLAG_SNS): ?>
<span class="public_flag"><?php echo __('Public flag') ?> : <?php echo $activity->getPublicFlagCaption() ?></span>
<?php endif; ?>
</span>
</p>
</div>
<input type='checkbox' name='activities[]' value='<?php echo $activity->id; ?>'>
示例11: op_mobile_page_title
op_mobile_page_title(__('Search Members'));
?>
<?php
if ($pager->getNbResults()) {
?>
<center>
<?php
op_include_pager_total($pager);
?>
</center>
<?php
$list = array();
foreach ($pager->getResults() as $member) {
$list[] = op_link_to_member($member);
}
$option = array('border' => true);
op_include_list('memberList', $list, $option);
op_include_pager_navigation($pager, '@member_search?page=%d', array('is_total' => false, 'use_current_query_string' => true));
} else {
echo __('Your search queries did not match any members.');
}
?>
<?php
$options = array('url' => url_for('@member_search'), 'button' => __('Search'), 'method' => 'get', 'align' => 'center');
?>
<table width="100%">
<tbody><tr><td bgcolor="<?php
示例12: nl2br
?>
</th><td><?php
echo nl2br($schedule->getBody());
?>
</td></tr>
<?php
}
?>
<tr class="members"><th><?php
echo __('Schedule member');
?>
</th>
<td>
<?php
foreach ($sf_data->getRaw('schedule')->getScheduleMembers() as $scheduleMember) {
echo op_link_to_member($scheduleMember->Member);
?>
<br />
<?php
}
?>
</td></tr>
<?php
if (count($schedule->ScheduleResourceLocks)) {
?>
<tr class="members"><th><?php
echo __('Schedule resource lock');
?>
</th>
<td>
<?php
示例13: __
<div class="row">
<div class="gadget_header span12"><?php
echo __('%community% List', array('%community%' => $op_term['community']->titleize()));
?>
</div>
</div>
<hr class="toumei" />
<div class="row" style="margin-left: 0px;">
<?php
foreach ($pager->getResults() as $member) {
?>
<div class="span3">
<div class="row_memberimg row">
<?php
echo op_link_to_member($member, array('link_target' => op_image_tag_sf_image($member->getImageFileName(), array('size' => '57x57'))));
?>
</div>
<div class="row_membername font10 row">
<?php
echo link_to($member->getName(), '@member_profile?id=' . $member->getId());
?>
</div>
</div>
<?php
}
?>
</div>
<div class="row" style="text-align: right;">
<?php
echo link_to(__('Back to %community% top page', array('%community%' => $community->getName())), '@community_home?id=' . $community->getId());
示例14: link_to
$t->is(op_format_last_login_time($now - 4 * 370 * 86400, $now), '4年以上前');
$t->is(op_format_last_login_time($now - 1000 * 86400, $now), '2年以上前');
//------------------------------------------------------------
$t->diag('op_link_to_member()');
$t->is(op_link_to_member(1), link_to('A', '@obj_member_profile?id=1'), 'link to member 1');
$t->is(op_link_to_member(1, array(), '@obj_friend_unlink'), link_to('A', '@obj_friend_unlink?id=1'), 'link to unlink member 1');
$t->is(op_link_to_member(1, array('link_target' => 'tetetete'), '@obj_member_profile'), link_to('tetetete', '@obj_member_profile?id=1'), 'link to member 1 (free text)');
$member2 = Doctrine::getTable('Member')->find(2);
$t->is(op_link_to_member($member2), link_to($member2->getName(), 'obj_member_profile', $member2), 'set Member object');
$t->is(op_link_to_member(9999), '-', 'set undefine member');
$t->is(op_link_to_member(null), '-', 'set null member');
Doctrine::getTable('SnsConfig')->set('nickname_of_member_who_does_not_have_credentials', 'I am a pen.');
$t->is(op_link_to_member(null), 'I am a pen.', 'set nickname_of_member_who_does_not_have_credentials original setting');
$t->is(op_link_to_member(1, array(), '@obj_member_profile', true), '非公開<br />メンバー', 'Displayed as Private Member');
$t->is(op_link_to_member(1, array(), '@obj_member_profile', false), link_to('A', '@obj_member_profile?id=1'), 'link to member 1(Not Private)');
$t->is(op_link_to_member(1, array('private_text' => 'private_text'), '@obj_member_profile', true), 'private_text', 'display of "private_text"');
//------------------------------------------------------------
$t->diag('op_auto_link_text()');
$t->is(op_auto_link_text('http://example.com/'), '<a href="http://example.com/" target="_blank">http://example.com/</a>');
$t->is(op_auto_link_text('https://example.com/'), '<a href="https://example.com/" target="_blank">https://example.com/</a>', 'protocol');
$t->is(op_auto_link_text('http://sub.example.com/'), '<a href="http://sub.example.com/" target="_blank">http://sub.example.com/</a>', 'subdomain');
$t->is(op_auto_link_text('http://example.com/hoge'), '<a href="http://example.com/hoge" target="_blank">http://example.com/hoge</a>', 'path');
$t->is(op_auto_link_text('http://example.com:8080/'), '<a href="http://example.com:8080/" target="_blank">http://example.com:8080/</a>', 'port');
$t->is(op_auto_link_text('http://example.com/#foo'), '<a href="http://example.com/#foo" target="_blank">http://example.com/#foo</a>', 'anchor');
$t->is(op_auto_link_text('http://example.com/?foo=1&bar=0'), '<a href="http://example.com/?foo=1&bar=0" target="_blank">http://example.com/?foo=1&bar=0</a>', 'query');
$t->is(op_auto_link_text('https://sub.example.com:8080/hoge?foo=1&bar=0#foo'), '<a href="https://sub.example.com:8080/hoge?foo=1&bar=0#foo" target="_blank">https://sub.example.com:8080/hoge?foo=1&bar=0#foo</a>');
$t->is(op_auto_link_text('http://example.com'), '<a href="http://example.com" target="_blank">http://example.com</a>');
$t->is(op_auto_link_text('www.example.com'), '<a href="http://www.example.com" target="_blank">www.example.com</a>');
// see https://trac.openpne.jp/ticket/3553
$t->is(op_auto_link_text('http://example.com/#comment:1'), '<a href="http://example.com/#comment:1" target="_blank">http://example.com/#comment:1</a>');
// see https://redmine.openpne.jp/issues/3289
示例15: include_customizes
">
<tr><td colspan="2" align="center">
<?php
include_customizes('menu', 'top');
?>
<hr color="<?php
echo $op_color["core_color_11"];
?>
" size="3">
</td></tr>
<?php
$list = array(__('%community% Name') => $community->getName(), __('%community% Category', array(), 'form_community') => $community->getCommunityCategory(), __('Date Created') => op_format_date($community->getCreatedAt(), 'D'), __('Administrator') => op_link_to_member($communityAdmin));
$subAdminCaption = array();
foreach ($communitySubAdmins as $m) {
$subAdminCaption[] = op_link_to_member($m);
}
if (count($subAdminCaption)) {
$list[__('Sub Administrator')] = implode("<br>\n", $subAdminCaption);
}
$list[__('Count of Members')] = $community->countCommunityMembers();
foreach ($community->getConfigs() as $key => $config) {
$list[__($key, array(), 'form_community')] = $config;
}
$list[__('Register policy', array(), 'form_community')] = __($sf_data->getRaw('community')->getRegisterPolicy());
$list[__('%community% Description', array(), 'form_community')] = op_auto_link_text_for_mobile(nl2br($community->getConfig('description')));
foreach ($list as $key => $value) {
?>
<font color="<?php
echo $op_color["core_color_19"];
?>