-
Notifications
You must be signed in to change notification settings - Fork 1
/
homebeta.php
95 lines (82 loc) · 3.24 KB
/
homebeta.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
84
85
86
87
88
89
90
91
92
93
94
95
<?php
/*
Template Name: homebeta
*/
?>
<?php
get_header();
query_posts('posts_per_page=50');
?>
<div id="container">
<div id="content" role="main">
<div class="introductionbeta">
<p>
Calligra aims to deliveer a suite of applications and technologies for Office applications (texts, spreadsheets, presentations, plans, flowcharts, databases...) and Creative applications (vectors, images).
</p>
<div class="navigation">
<div class="alignright"><a href="learn-more">Learn more</a></div>
</div>
</div>
<div class="newsbeta">
<h3>Announcements</h3>
<?php
function showpost($category)
{
rewind_posts();
while (have_posts()) :
the_post();
# if the post is in the category we want to exclude from the startpage but should show up in the category archives, we just skip to the next post.
if (!in_category($category)) continue; ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h3 class="small-entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<div style="text-align: right"><div class="entry-meta"><?php the_time('F jS, Y') ?></div></div>
</div>
<?php
break;
endwhile;
}
?>
<?php
showpost('stable');
showpost('unstable');
?>
<div class="navigation">
<div class="alignright"><a href="/news/announcements">Read more announcements</a></div>
</div>
<h3 style="margin-top:20px;">News</h3>
<?php
rewind_posts();
if (have_posts()) :
$counter = 0;
while (have_posts()) :
the_post();
# if the post is in the category we want to exclude from the startpage but should show up in the category archives, we just skip to the next post. -->
if (!in_category('news') && !has_tag('frontpage') ) continue;
if (in_category("announcements")) continue;
?>
<div class="post" id="post-<?php the_ID(); ?>">
<h3 class="small-entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<div class="text-align: right"><div class="entry-meta"><?php the_time('F jS, Y') ?></div></div>
</div>
<?php
$counter += 1;
if ($counter > 2) break;
endwhile; ?>
<div class="navigation">
<div class="alignright"><a href="/news">Read more news</a></div>
</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
</div>
<div class="lifestreambeta">
<?php
include("lifestream.php");
lifestream("Life stream", array_merge($BlogFeeds, $ForumFeeds, $MicrobloggingFeeds) );
?>
</div>
</div><!-- #content -->
</div><!-- #container -->
<?php get_footer(); ?>