protected function RenderContent() { $pages = Page::Get(); $count = count($pages); ?> <div class="Panel"> <h3 class="PanelTitle">Pages (<?php echo $count; ?> )</h3> <div class="PanelContent"> <div class="ProfilePage"> <div class="ProfileTitle"> <span class="ProfileUserName"> <?php echo "There "; if ($count == 1) { echo "is "; } else { echo "are "; } echo $count; if ($count == 1) { echo " page"; } else { echo " pages"; } echo "."; ?> </span> <span class="ProfileControlBox"> <a href="<?php echo System::ExpandRelativePath("~/community/pages/create.mmo"); ?> " onclick="DisplayCreatePageDialog();">Create Page</a> </span> </div> <div class="ProfileContent"> <?php $grpPages = new ButtonGroup("grpPages"); foreach ($pages as $item) { $grpPages->Items[] = new ButtonGroupButton(null, $item->Title, null, "~/community/pages/" . $item->Name . "/images/thumbnail.png", "~/community/pages/" . $item->Name, "PageInformationDialog.ShowDialog(" . $item->ID . ");"); } $grpPages->Render(); ?> </div> </div> </div> </div> <?php }
<div class="Card"> <div class="Title"><i class="fa fa-user"></i><span class="Text"><?php echo LanguageString::GetByName("friends"); ?> </span></div> <div class="Content"> <div class="IconList"> <?php $friends = $thisuser->GetFriends(true, 5); if (count($friends) > 0) { $btng = new ButtonGroup("btngFriends"); $btng->ButtonSize = 64; foreach ($friends as $friend) { $btng->Items[] = new ButtonGroupButton(null, $friend->User->LongName, null, "~/community/members/" . $friend->User->ShortName . "/images/preview.png", "~/community/members/" . $friend->User->ShortName, "UserInformationDialog.Show(User.GetByID(" . $friend->User->ID . "));"); } $btng->Render(); } else { echo "<div style=\"text-align: center;\">This user does not have any friends. <a href=\"#\">Introduce yourself</a>!</div>"; } ?> </div> </div> </div> </div> <?php } ?> </div> <?php $page->EndContent(); break;
protected function RenderContent() { ?> <div class="Panel"> <?php $groups = Group::Get(); $count = count($groups); ?> <h3 class="PanelTitle">Groups (<?php echo $count; ?> )</h3> <div class="PanelContent"> <div class="ProfilePage"> <div class="ProfileTitle"> <script type="text/javascript"> function RefreshList() { $.ajax( { type: "GET", url: "<?php echo System::$Configuration["Application.BasePath"]; ?> /ajax/search.php?type=group&query=" + txtFilter.value + "&order=" + orderByColumnName + "&all=0", dataType: "json", success: function(data) { if (data.result == "success") { var html = ""; for (var i = 0; i < data.content.length; i++) { var group = data.content[i]; html += "<a target=\"_blank\" href=\"/community/groups/" + group.name + "\" class=\"ButtonGroupButton\">"; html += "<img class=\"ButtonGroupButtonImage\" src=\"/community/members/" + group.name + "/images/avatar/thumbnail.png\" />"; html += "<span class=\"ButtonGroupButtonText\">" + group.title + "</span>"; html += "</a>"; } btngGroupList.innerHTML = html; } else { // dlgError.ShowDialog(); } } }); } var orderByColumnName = 'member_longname'; function OrderBy(columnName) { orderByColumnName = columnName; var lnkOrderBy_member_longname = document.getElementById("lnkOrderBy_member_longname"); var lnkOrderBy_member_date_registered = document.getElementById("lnkOrderBy_member_date_registered"); if (orderByColumnName == "member_longname") { lnkOrderBy_member_longname.className = "Selected"; lnkOrderBy_member_date_registered.className = ""; } else if (orderByColumnName == "member_date_registered") { lnkOrderBy_member_longname.className = ""; lnkOrderBy_member_date_registered.className = "Selected"; } RefreshList(); } var txtFilter = document.getElementById("txtFilter"); var timeout = null; txtFilter.onkeyup = function() { if (timeout != null) { window.clearTimeout(timeout); } timeout = window.setTimeout(function() { var btngGroupList = document.getElementById("btngGroupList"); RefreshList(); }, 50); }; </script> <span class="ProfileControlBox"> <a href="<?php echo System::ExpandRelativePath("~/community/groups/create.mmo"); ?> " onclick="DisplayCreateGroupDialog();">Create Group</a> </span> </div> <div class="ProfileContent"> <?php $grpMembers = new ButtonGroup("grpMembers"); foreach ($groups as $group) { $grpMembers->Items[] = new ButtonGroupButton(null, $group->Title, null, "~/community/groups/" . $group->Name . "/images/avatar/thumbnail.png", "~/community/groups/" . $group->Name, "GroupInformationDialog.ShowDialog(" . $group->ID . ");"); } $grpMembers->Render(); ?> </div> </div> </div> </div> <?php }