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


PHP SocialManager::setSocialUserBlock方法代码示例

本文整理汇总了PHP中SocialManager::setSocialUserBlock方法的典型用法代码示例。如果您正苦于以下问题:PHP SocialManager::setSocialUserBlock方法的具体用法?PHP SocialManager::setSocialUserBlock怎么用?PHP SocialManager::setSocialUserBlock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SocialManager的用法示例。


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

示例1: get_lang

        $social_right_content .= get_lang('YouNeedToHaveFriendsInYourSocialNetwork');
    } else {
        $social_right_content .= get_lang('YouAlreadyInviteAllYourContacts');
    }
    $social_right_content .= '<div>';
    $social_right_content .= '<a href="search.php">' . get_lang('TryAndFindSomeFriends') . '</a>';
    $social_right_content .= '</div>';
}
$form = new FormValidator('invitation', 'post', api_get_self() . '?id=' . $group_id);
$form->addHidden('form_sent', 1);
$form->addHidden('id', $group_id);
$group_members_element = $form->addElement('advmultiselect', 'invitation', get_lang('Friends'), $nosessionUsersList, 'style="width: 280px;"');
$form->addButtonSave(get_lang('InviteUsersToGroup'));
$social_right_content .= $form->returnForm();
// Current group members
$members = $usergroup->get_users_by_group($group_id, false, array(GROUP_USER_PERMISSION_PENDING_INVITATION));
if (is_array($members) && count($members) > 0) {
    foreach ($members as &$member) {
        $image = UserManager::getUserPicture($member['user_id']);
        $member['image'] = '<img src="' . $image . '"  width="50px" height="50px"  />';
    }
    $social_right_content .= '<h3>' . get_lang('UsersAlreadyInvited') . '</h3>';
    $social_right_content .= Display::return_sortable_grid('invitation_profile', array(), $members, array('hide_navigation' => true, 'per_page' => 100), array(), false, array(true, false, true, true));
}
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'groups', $group_id);
$social_menu_block = SocialManager::show_social_menu('member_list', $group_id);
$tpl->addGlobal('social_menu_block', $social_menu_block);
//$tpl->setHelp('Groups');
$tpl->addGlobal('social_right_content', $social_right_content);
echo $tpl->render('@template_style/social/add_groups.html.twig');
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:group_invitation.php

示例2: array

    if (count($grid_newest_groups) > 0) {
        $newest_content = Display::return_sortable_grid('mygroups', array(), $grid_newest_groups, array('hide_navigation' => true, 'per_page' => 100), $query_vars, false, array(true, true, true, false));
    }
    if (count($grid_pop_groups) > 0) {
        $popular_content = Display::return_sortable_grid('mygroups', array(), $grid_pop_groups, array('hide_navigation' => true, 'per_page' => 100), $query_vars, false, array(true, true, true, true, true));
    }
}
if (!empty($create_group_item)) {
    $social_right_content .= Display::page_subheader($create_group_item);
}
$headers = array(get_lang('Newest'), get_lang('Popular'), get_lang('MyGroups'));
$social_right_content .= Display::tabs($headers, array($newest_content, $popular_content, $my_group_content), 'tab_browse');
$show_message = null;
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'show_message' && isset($_REQUEST['msg']) && $_REQUEST['msg'] == 'topic_deleted') {
    $show_message = Display::return_message(get_lang('Deleted'), 'success');
}
$tpl = new Template(null);
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, $user_id, $show_menu);
$show_menu = 'browse_groups';
if (isset($_GET['view']) && $_GET['view'] == 'mygroups') {
    $show_menu = $_GET['view'];
}
$social_menu_block = SocialManager::show_social_menu($show_menu);
$templateName = 'social/groups.tpl';
$tpl->setHelp('Groups');
$tpl->assign('message', $show_message);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template($templateName);
$tpl->display($social_layout);
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:groups.php

示例3: array

                    dialog.dialog({
                        modal	: true,
                        width	: 520,
                        height	: 400,
                    });
				});
	            //prevent the browser to follow the link
	            return false;
	        });
        });
</script>';
$this_section = SECTION_SOCIAL;
$interbreadcrumb[] = array('url' => 'groups.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' => 'group_view.php?id=' . $group_id, 'name' => Security::remove_XSS($group_info['name']));
$interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Discussions'));
$social_left_content = SocialManager::show_social_menu('member_list', $group_id);
$show_message = null;
if (!empty($show_message)) {
    $social_right_content .= Display::return_message($show_message, 'confirmation');
}
$social_right_content .= MessageManager::display_message_for_group($group_id, $topic_id, $is_member, $message_id);
$social_menu_block = SocialManager::show_social_menu('member_list', $group_id);
$tpl = new Template(null);
$tpl->setHelp('Groups');
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, $user_id, 'groups', $group_id);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$tpl->assign('content', $content);
$social_layout = $tpl->get_template('social/home.tpl');
$tpl->display($social_layout);
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:group_topics.php

示例4: api_not_allowed

    api_not_allowed();
}
$table_message = Database::get_main_table(TABLE_MESSAGE);
$usergroup = new UserGroup();
$form = new FormValidator('add_group');
$usergroup->setGroupType($usergroup::SOCIAL_CLASS);
$usergroup->setForm($form, 'add', array());
if ($form->validate()) {
    $values = $form->exportValues();
    $values['group_type'] = UserGroup::SOCIAL_CLASS;
    $values['relation_type'] = GROUP_USER_PERMISSION_ADMIN;
    $groupId = $usergroup->save($values);
    Display::addFlash(DIsplay::return_message(get_lang('GroupAdded')));
    header('Location: group_view.php?id=' . $groupId);
    exit;
}
$nameTools = get_lang('AddGroup');
$this_section = SECTION_SOCIAL;
$interbreadcrumb[] = array('url' => 'home.php', 'name' => get_lang('Social'));
$interbreadcrumb[] = array('url' => 'groups.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' => '#', 'name' => $nameTools);
$social_avatar_block = SocialManager::show_social_avatar_block('group_add');
$social_menu_block = SocialManager::show_social_menu('group_add');
$social_right_content = $form->returnForm();
$tpl = new Template(null);
SocialManager::setSocialUserBlock($tpl, $user_id, null, null);
$tpl->setHelp('Groups');
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template('social/add_groups.tpl');
$tpl->display($social_layout);
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:group_add.php

示例5: get_lang

    $social_group_block .= '<div class="list-group-newest">';
    $social_group_block .= '<div class="group-title">' . get_lang('Popular') . '</div>';
    for ($i = 0; $i < $list; $i++) {
        $social_group_block .= '<div class="row">';
        $social_group_block .= '<div class="col-md-2">' . $groups_pop[$i][0] . '</div>';
        $social_group_block .= '<div class="col-md-4">' . $groups_pop[$i][1];
        $social_group_block .= $groups_pop[$i][2] . '</div>';
        $social_group_block .= "</div>";
    }
    $social_group_block .= "</div>";
}
// My friends
$friend_html = SocialManager::listMyFriendsBlock($user_id, '', $show_full_profile);
//Block Social Sessions
$social_session_block = null;
$user_info = api_get_user_info($user_id);
$sessionList = SessionManager::getSessionsFollowedByUser($user_id, $user_info['status']);
if (count($sessionList) > 0) {
    $social_session_block = $sessionList;
}
$social_group_block = Display::panel($social_group_block, get_lang('Group'));
$tpl = new Template(get_lang('SocialNetwork'));
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'home');
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_friend_block', $friend_html);
$tpl->assign('sessionList', $social_session_block);
$tpl->assign('social_search_block', $social_search_block);
$tpl->assign('social_skill_block', SocialManager::getSkillBlock($user_id));
$tpl->assign('social_group_block', $social_group_block);
$social_layout = $tpl->get_template('social/home.tpl');
$tpl->display($social_layout);
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:home.php

示例6: get_lang

            $item_1 = Display::tag('p', $url_open . $name . $url_close);
            $block_groups .= '
                <div class="col-md-4">
                    <div class="items-user">
                        <div class="items-user-avatar">
                            ' . $group['picture'] . '
                        </div>
                        <div class="user-info">
                            ' . $item_1 . '
                            <p>' . $members . '</p>
                            <p>' . $group['description'] . '</p>
                            <p>' . $tags . '</p>
                            <p>' . $url_open . get_lang('SeeMore') . $url_close . '</p>
                        </div>
                    </div>
                </div>';
        }
        $block_groups .= '</div></div></div>';
    }
    $visibility = array(true, true, true, true, true);
    $block_groups .= Display::return_sortable_grid('groups', null, $grid_groups, array('hide_navigation' => false, 'per_page' => $itemPerPage), $query_vars, false, $visibility, true, array(), $totalGroups);
    $block_search .= Display::panelCollapse(get_lang('Groups'), $block_groups, 'search-groups', null, 'groups-acorderon', 'groups-collapse');
}
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'search');
$tpl->addGlobal('social_menu_block', $social_menu_block);
$tpl->addGlobal('social_search', $block_search);
$tpl->addGlobal('search_form', $searchForm);
$tpl->addGlobal('invitation_form', MessageManager::generate_invitation_form('send_invitation'));
echo $tpl->render('@template_style/social/search.html.twig');
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:search.php

示例7: api_not_allowed

} else {
    $id_message = $_GET['id'];
    $source = 'inbox';
    $show_menu = 'messages_inbox';
}
$message = '';
// LEFT COLUMN
if (api_get_setting('social.allow_social_tool') == 'true') {
    //Block Social Menu
    $social_menu_block = SocialManager::show_social_menu($show_menu);
}
//MAIN CONTENT
$message .= MessageManager::show_message_box($id_message, $source);
if (!empty($message)) {
    $social_right_content .= $message;
} else {
    api_not_allowed();
}
//$tpl = new Template(get_lang('View'));
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), $show_menu);
if (api_get_setting('social.allow_social_tool') == 'true') {
    $tpl->addGlobal('social_menu_block', $social_menu_block);
    $tpl->addGlobal('social_right_content', $social_right_content);
    echo $tpl->render('@template_style/social/inbox.html.twig');
} else {
    $content = $social_right_content;
    echo $actions;
    echo $content;
}
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:view_message.php

示例8: get_lang

                    <div class="card">
                        <div class="avatar">
                            ' . $group['picture'] . '
                        </div>
                        <div class="content">
                            ' . $item_1 . '
                            <p>' . $group['description'] . '</p>
                            <p>' . $tags . '</p>
                            <p>' . $url_open . get_lang('SeeMore') . $url_close . '</p>
                        </div>
                    </div>
                </div>';
        }
        $social_right_content .= '</ul></div></div>';
    }
    $visibility = array(true, true, true, true, true);
    $social_right_content .= Display::return_sortable_grid('groups', null, $grid_groups, array('hide_navigation' => false, 'per_page' => $itemPerPage), $query_vars, false, $visibility, true, array(), $totalGroups);
}
$tpl = new Template($tool_name);
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, $user_id, 'search');
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$tpl->assign('search_form', $searchForm);
$formModalTpl = new Template();
$formModalTpl->assign('messageForm', MessageManager::generate_message_form('send_message'));
$formModalTpl->assign('invitationForm', MessageManager::generate_invitation_form('send_invitation'));
$formModals = $formModalTpl->fetch('default/social/form_modals.tpl');
$tpl->assign('formModals', $formModals);
$social_layout = $tpl->get_template('social/search.tpl');
$tpl->display($social_layout);
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:search.php

示例9: get_lang

            $more_info .= '<div class="social-actions-message"><strong>' . get_lang('MyPersonalOpenArea') . '</strong></div>';
            $more_info .= '<div class="social-profile-extended">' . $user_info['openarea'] . '</div>';
            $more_info .= '<br />';
        }
        if (!empty($user_info['teach'])) {
            $more_info .= '<div class="social-actions-message"><strong>' . get_lang('MyTeach') . '</strong></div>';
            $more_info .= '<div class="social-profile-extended">' . $user_info['teach'] . '</div>';
            $more_info .= '<br />';
        }
        $socialRightInformation .= SocialManager::social_wrapper_div($more_info, 4);
    }
}
//$tpl = new Template(get_lang('Social'));
$tpl = Container::getTwig();
// Block Avatar Social
SocialManager::setSocialUserBlock($tpl, $user_id, 'shared_profile', 0, $show_full_profile);
$tpl->addGlobal('social_friend_block', $friend_html);
$tpl->addGlobal('social_menu_block', $social_menu_block);
$tpl->addGlobal('social_wall_block', $social_wall_block);
$tpl->addGlobal('social_post_wall_block', $social_post_wall_block);
$tpl->addGlobal('social_extra_info_block', $social_extra_info_block);
$tpl->addGlobal('social_course_block', $social_course_block);
$tpl->addGlobal('social_group_info_block', $social_group_info_block);
$tpl->addGlobal('social_rss_block', $social_rss_block);
$tpl->addGlobal('social_skill_block', SocialManager::getSkillBlock($my_user_id));
$tpl->addGlobal('sessionList', $social_session_block);
$tpl->addGlobal('social_right_information', $socialRightInformation);
$tpl->addGlobal('social_auto_extend_link', $socialAutoExtendLink);
$formModals = Container::getTemplating()->render('@template_style/social/form_modals.html.twig', ['invitation_form' => MessageManager::generate_invitation_form('send_invitation')]);
$tpl->addGlobal('form_modals', $formModals);
echo $tpl->render('@template_style/social/profile.html.twig');
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:profile.php

示例10: count

    $number_friends = count($friends);
    $j = 0;
    for ($k = 0; $k < $number_friends; $k++) {
        while ($j < $number_friends) {
            if (isset($friends[$j])) {
                $friend_html .= '<div class="card">';
                $friend = $friends[$j];
                $user_name = api_xml_http_response_encode($friend['firstName'] . ' ' . $friend['lastName']);
                $userPicture = UserManager::getUserPicture($friend['friend_user_id']);
                $friend_html .= '<div class="avatar" class="image-social-content" id=div_' . $friends[$j]['friend_user_id'] . '>';
                $friend_html .= '<img src="' . $userPicture . '" id="imgfriend_' . $friend['friend_user_id'] . '" title="' . $user_name . '" />                                    ';
                $friend_html .= '</div>';
                $friend_html .= '<div class="content">
                               <a href="profile.php?u=' . $friend['friend_user_id'] . '"> <h5>' . $user_name . '</h5></a>';
                $friend_html .= '<p><button onclick="delete_friend(this)" id=img_' . $friend['friend_user_id'] . '  />' . get_lang('Delete') . '</button></p>
                        		</div>';
                $friend_html .= '</div>';
            }
            $j++;
        }
    }
    $friend_html .= '</div>';
    $social_right_content .= $friend_html;
}
$social_right_content .= '</div>';
$tpl = new Template(get_lang('Social'));
SocialManager::setSocialUserBlock($tpl, $user_id, 'friends');
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template('social/friends.tpl');
$tpl->display($social_layout);
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:friends.php

示例11: get_lang

                        <div class="thumbnail text-center" id="div_' . $friends[$j]['friend_user_id'] . '">
                            <img src="' . $userPicture . '" class="img-responsive" id="imgfriend_' . $friend['friend_user_id'] . '" title="' . $user_name . '">
                            <div class="caption">
                                <h3>
                                    <a href="profile.php?u=' . $friend['friend_user_id'] . '">' . $user_name . '</a>
                                </h3>
                                <p>
                                    <button class="btn btn-danger" onclick="delete_friend(this)" id=img_' . $friend['friend_user_id'] . '>
                                        ' . get_lang('Delete') . '
                                    </button>
                                </p>
                            </div>
                        </div>
                    </div>
                ';
            }
            $j++;
        }
    }
    $friend_html .= '</div>';
    $social_right_content .= $friend_html;
}
$social_right_content .= '</div>';
//$tpl = new Template(get_lang('Social'));
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'friends');
$tpl->addGlobal('social_menu_block', $social_menu_block);
$tpl->addGlobal('social_right_content', $social_right_content);
$tpl->addGlobal('social_auto_extend_link', '');
$tpl->addGlobal('social_right_information', '');
echo $tpl->render('@template_style/social/friends.html.twig');
开发者ID:feroli1000,项目名称:chamilo-lms,代码行数:31,代码来源:friends.php

示例12: function

    }
}

$(document).on("ready", function () {
    $("#el-finder").elfinder({
        url: "' . api_get_path(WEB_LIBRARY_PATH) . 'elfinder/php/connector.php",
        lang: "' . api_get_language_isocode() . '",
        height: 600,
        resizable: false,
        rememberLastDir: false,
    }).elfinder("instance");
});

</script>';
$show_message = null;
// Social Menu Block
$social_menu_block = SocialManager::show_social_menu('myfiles');
$actions = null;
if (isset($_GET['cidReq'])) {
    $actions = '<a href="' . api_get_path(WEB_CODE_PATH) . 'document/document.php?cidReq=' . Security::remove_XSS($_GET['cidReq']) . '&amp;id_session=' . Security::remove_XSS($_GET['id_session']) . '&amp;gidReq=' . Security::remove_XSS($_GET['gidReq']) . '&amp;id=' . Security::remove_XSS($_GET['parent_id']) . '">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('Documents') . ' (' . get_lang('Course') . ')') . '</a>';
}
$tpl = new Template();
SocialManager::setSocialUserBlock($tpl, $user_id, 'myfiles');
$editor = new \Chamilo\CoreBundle\Component\Editor\Editor();
$editor = $tpl->fetch('default/' . $editor->getEditorStandAloneTemplate());
$tpl->assign('social_right_content', $editor);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('actions', $actions);
$tpl->assign('message', $show_message);
$social_layout = $tpl->get_template('social/myfiles.tpl');
$tpl->display($social_layout);
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:myfiles.php

示例13: array

}
if (count($pending_invitations) > 0) {
    $new_invitation = array();
    $waitingInvitation = '';
    foreach ($pending_invitations as $invitation) {
        $picture = $userGroup->get_picture_group($invitation['id'], $invitation['picture'], 80);
        $img = '<img class="social-groups-image" src="' . $picture['file'] . '" />';
        $invitation['picture_uri'] = '<a href="group_view.php?id=' . $invitation['id'] . '">' . $img . '</a>';
        $invitation['name'] = '<a href="group_view.php?id=' . $invitation['id'] . '">' . cut($invitation['name'], 120, true) . '</a>';
        $invitation['description'] = cut($invitation['description'], 220, true);
        $new_invitation[] = $invitation;
        $waitingInvitation .= '<div class="well"><div class="row">';
        $waitingInvitation .= '<div class="col-md-3">' . $invitation['picture_uri'] . '</div>';
        $waitingInvitation .= '<div class="col-md-9">';
        $waitingInvitation .= '<h4 class="tittle-profile">' . $invitation['name'] . '</h4>';
        $waitingInvitation .= '<div class="description-group">' . $invitation['description'] . '</div>';
        $waitingInvitation .= '<div class="btn-group" role="group">';
        $waitingInvitation .= '<a class="btn btn-success" href="invitations.php?accept=' . $invitation['id'] . '"><em class="fa fa-check"></em> ' . get_lang('AcceptInvitation') . '</a>';
        $waitingInvitation .= '<a class="btn btn-danger" href="invitations.php?deny=' . $invitation['id'] . '"><em class="fa fa-times"></em> ' . get_lang('DenyInvitation') . '</a>';
        $waitingInvitation .= '</div>';
        $waitingInvitation .= '</div></div>';
    }
    $socialInvitationsBlock .= Display::panel($waitingInvitation, get_lang('GroupsWaitingApproval'));
}
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'invitations');
$tpl->addGlobal('social_menu_block', $social_menu_block);
$tpl->addGlobal('social_invitations_block', $socialInvitationsBlock);
$tpl->addGlobal('message', $show_message);
$tpl->addGlobal('content', $content);
echo $tpl->render('@template_style/social/invitations.html.twig');
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:invitations.php

示例14: api_not_allowed

if (api_get_setting('social.allow_students_to_create_groups_in_social') == 'false' && !api_is_allowed_to_edit()) {
    api_not_allowed();
}
$table_message = Database::get_main_table(TABLE_MESSAGE);
$usergroup = new UserGroup();
$form = new FormValidator('add_group');
$usergroup->setGroupType($usergroup::SOCIAL_CLASS);
$usergroup->setForm($form, 'add', array());
if ($form->validate()) {
    $values = $form->exportValues();
    $values['group_type'] = UserGroup::SOCIAL_CLASS;
    $values['relation_type'] = GROUP_USER_PERMISSION_ADMIN;
    $groupId = $usergroup->save($values);
    Display::addFlash(Display::return_message(get_lang('GroupAdded')));
    header('Location: group_view.php?id=' . $groupId);
    exit;
}
$nameTools = get_lang('AddGroup');
$this_section = SECTION_SOCIAL;
$interbreadcrumb[] = array('url' => 'home.php', 'name' => get_lang('Social'));
$interbreadcrumb[] = array('url' => 'groups.php', 'name' => get_lang('Groups'));
$interbreadcrumb[] = array('url' => '#', 'name' => $nameTools);
$social_avatar_block = SocialManager::show_social_avatar_block('group_add');
$social_menu_block = SocialManager::show_social_menu('group_add');
$social_right_content = $form->returnForm();
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), null, null);
//$tpl->setHelp('Groups');
$tpl->addGlobal('social_menu_block', $social_menu_block);
$tpl->addGlobal('social_right_content', $social_right_content);
echo $tpl->render('@template_style/social/add_groups.html.twig');
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:31,代码来源:group_add.php

示例15: isset

            if (!isset($_POST['group_id'])) {
                $default['users'] = isset($_POST['users']) ? $_POST['users'] : null;
            } else {
                $default['group_id'] = $_POST['group_id'];
            }
            if (isset($_POST['hidden_user'])) {
                $default['users'] = array($_POST['hidden_user']);
            }
            $social_right_content .= manage_form($default);
        } else {
            $social_right_content .= Display::return_message(get_lang('ErrorSendingMessage'), 'error');
        }
    }
}
if (api_get_setting('social.allow_social_tool') == 'true') {
    $social_right_content .= '</div>';
    $social_right_content .= '</div>';
}
//$tpl = new Template(get_lang('ComposeMessage'));
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'messages');
if (api_get_setting('social.allow_social_tool') == 'true') {
    $tpl->addGlobal('social_menu_block', $social_menu_block);
    $tpl->addGlobal('social_right_content', $social_right_content);
    echo $tpl->render('@template_style/social/inbox.html.twig');
} else {
    $content = $social_right_content;
    echo $actions;
    echo $content;
}
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:new_message.php


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