-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathhome.php
83 lines (72 loc) · 3.23 KB
/
home.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php addPackage('forum');
$addJSFiles = Array('postPolls.js');
require_once(FILEROOT . '/includes/HomeManager.class.php');
$homeManager = new HomeManager();
$forumManager = new ForumManager(0);
$forumSearchGames = new ForumSearch('latestGamePosts',array(),$forumManager);
$forumSearchGames->findThreads(1, 5);
?>
<div id="hompageRows">
<?= $homeManager->addTopNotifications();?>
<div class="flexWrapper mob-order-3">
<?= $homeManager->addAnnouncement(3,'ra-gamers-plane','col-1-2 mob-col-1',false,true);?>
<?= $homeManager->addLookingForAGame('col-1-2 mob-col-1');?>
</div>
<div class="flexWrapper mob-order-1">
<div id="latestPosts" class="homeWidget col-1-3 mob-col-1 mob-order-3">
<h3 class="headerbar"><a href="/games/list/"><i class="ra ra-all-for-one"></i> Latest Games</a></h3>
<div class="widgetBody">
<?php $homeManager->addLatestGames(3); ?>
</div>
<?php
$forumSearchPublic = new ForumSearch('latestPublicPosts' , array() , $forumManager);
$forumSearchPublic->findThreads(1,2);
$forumSearchPublic->displayLatestHPWidget('<a href="/forums/search/?search=latestPublicPosts"><i class="ra ra-horn-call"></i> Latest in Public Games</a>','<a href="/forums/search/?search=latestPublicPosts">Latest in Public Games</a>','orange');
?>
</div>
<div id="latestPosts" class="homeWidget col-1-3 mob-col-1 mob-order-2">
<?php
$forumSearchCommunity = new ForumSearch('homepage' , array() , $forumManager);
$forumSearchCommunity->findThreads(1,5);
$forumSearchCommunity->displayLatestHPWidget('<a href="/forums/search/?search=latestPosts"><i class="ra ra-speech-bubble"></i> Community Posts</a>','<a href="/forums/search/?search=latestPosts">All Latest Posts</a>','orange');
?>
</div>
<div id="latestPosts" class="homeWidget col-1-3 mob-col-1 mob-order-1">
<?php
if(!$forumSearchGames->displayLatestHPWidget('<a href="/forums/search/?search=latestGamePosts"><i class="ra ra-d6"></i> Latest Game Posts</a>','<a href="/forums/search/?search=latestGamePosts">Latest Game Posts</a>','red','gamesheaderbar')){
?>
<h3 class="headerbar gamesheaderbar"><i class="ra ra-d6"></i> Find a game</h3>
<div class="noGames">
<p>You're not in any active games.</p>
<div class="noGameLink"><a href="/forums/10/">Join a game!</a></div>
</div>
<h3 class="headerbar"><a href="/forums/10/"><i class="ra ra-beer"></i> Games Tavern</a></h3>
<?php
$homeManager->addLatestPosts($forumManager,10,3);
}
?>
</div>
</div>
<?php $forumManagerGames = new ForumManager(2);
if($forumManagerGames->hasForums(ForumManager::FAVOURITE)) {
?>
<div class="flexWrapper mob-order-2">
<div id="yourGames" class="col-1">
<h3 class="headerbar gamesheaderbar"><a href="/forums/2"><i class="ra ra-bookmark"></i> Bookmarked Games</a></h3>
<?php
$forumManagerGames->displayForum(ForumManager::FAVOURITE);
?>
</div>
</div>
<?php }
if($forumManagerGames->hasForums(ForumManager::NON_FAVOURITE)) { ?>
<div class="flexWrapper mob-order-2">
<div id="yourGames" class="col-1">
<h3 class="headerbar"><a href="/forums/2"><i class="ra ra-d6"></i> Your Games</a></h3>
<?php
$forumManagerGames->displayForum(ForumManager::NON_FAVOURITE);
?>
</div>
</div>
<?php } ?>
</div>