First real commit

This commit is contained in:
squeek 2015-03-19 23:09:39 -07:00
parent 184eebd9ee
commit ed290694c6
33 changed files with 3869 additions and 150 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/config.php
/media

13
.htaccess Normal file
View file

@ -0,0 +1,13 @@
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
# RewriteBase /
</IfModule>
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([^/\.]+)$ ?page=$1 [QSA,L]
RewriteRule ^([^/\.]+)/(.*)$ ?page=$1&rest=$2 [QSA,L]

View file

@ -22,7 +22,7 @@ p, blockquote, q, pre, address, hr, code, samp, dl, ol, ul, form, table, fieldse
/* TYPOGRAPHY */ /* TYPOGRAPHY */
/* Composed to a scale of 12px, 14px, 16px, 18px, 21px, 24px, 36px, 48px, 60px and 72px */ /* Composed to a scale of 12px, 14px, 16px, 18px, 21px, 24px, 36px, 48px, 60px and 72px */
h1, h2, h3, h4, h5, h6 {font-family:Futura, "Century Gothic", AppleGothic, sans-serif;color:#222;text-shadow:1px 1px 1px rgba(0,0,0,.10)} h1, h2, h3, h4, h5, h6 {font-family:"Cabin",Helvetica,arial,freesans,clean,sans-serif;color:#222;text-shadow:1px 1px 1px rgba(0,0,0,.10)}
h1 {margin: 0; font-size: 3.75em; line-height: 1.2em; margin-bottom: 0.4em} /* 60px / 72px */ h1 {margin: 0; font-size: 3.75em; line-height: 1.2em; margin-bottom: 0.4em} /* 60px / 72px */
h2 {margin: 0; font-size: 3em; line-height: 1em; margin-bottom: 0.5em} /* 48px / 48px */ h2 {margin: 0; font-size: 3em; line-height: 1em; margin-bottom: 0.5em} /* 48px / 48px */
h3 {margin: 0; font-size: 2.25em; line-height: 1.3333333333333333333333333333333em; margin-bottom: 0.6667em} /* 36px / 48px */ h3 {margin: 0; font-size: 2.25em; line-height: 1.3333333333333333333333333333333em; margin-bottom: 0.6667em} /* 36px / 48px */
@ -30,6 +30,7 @@ h4 {margin: 0; font-size: 1.5em; line-height: 1em; margin-bottom: 1em} /* 24px /
h5 {margin: 0; font-size: 1.3125em; line-height: 1.1428571428571428571428571428571em; margin-bottom: 1.1428571428571428571428571428571em} /* 21px / 24px */ h5 {margin: 0; font-size: 1.3125em; line-height: 1.1428571428571428571428571428571em; margin-bottom: 1.1428571428571428571428571428571em} /* 21px / 24px */
h6 {margin: 0; font-size: 1.125em; line-height: 1.3333333333333333333333333333333em; margin-bottom: 1.3333333333333333333333333333333em} /* 18px / 24px */ h6 {margin: 0; font-size: 1.125em; line-height: 1.3333333333333333333333333333333em; margin-bottom: 1.3333333333333333333333333333333em} /* 18px / 24px */
p, ul, blockquote, pre, td, th, label {margin: 0; font-size: 1em; line-height: 1.5em; margin-bottom: 1.5em} /* 16px / 24px */ p, ul, blockquote, pre, td, th, label {margin: 0; font-size: 1em; line-height: 1.5em; margin-bottom: 1.5em} /* 16px / 24px */
p { margin-bottom: 0.5em; }
small, p.small {margin: 0; font-size: 0.875em; line-height: 1.7142857142857142857142857142857em; margin-bottom: 1.7142857142857142857142857142857em} /* 14px / 24px */ small, p.small {margin: 0; font-size: 0.875em; line-height: 1.7142857142857142857142857142857em; margin-bottom: 1.7142857142857142857142857142857em} /* 14px / 24px */
/* CODE */ /* CODE */
@ -68,7 +69,7 @@ dl dd {margin-left: 1.5em}
dt {font-family:Futura, "Century Gothic", AppleGothic, sans-serif} dt {font-family:Futura, "Century Gothic", AppleGothic, sans-serif}
/* HYPERLINKS */ /* HYPERLINKS */
a {text-decoration: none; color:#c47529} a {text-decoration: none; color:#5080A8}
a:hover {text-decoration: underline} a:hover {text-decoration: underline}
a:focus {outline: thin dotted} a:focus {outline: thin dotted}
a:hover, a:active {outline: none} /* Better CSS Outline Suppression */ a:hover, a:active {outline: none} /* Better CSS Outline Suppression */
@ -84,11 +85,11 @@ abbr[title], dfn[title] {border-bottom: 1px dotted #333; cursor: help}
/* MARKED/INSERTED/DELETED AND SELECTED TEXT */ /* MARKED/INSERTED/DELETED AND SELECTED TEXT */
ins, mark {text-decoration: none} ins, mark {text-decoration: none}
mark {background: #c47529} mark {background: #5080A8}
ins {background: #d49855} ins {background: #d49855}
del {text-decoration: line-through} del {text-decoration: line-through}
::-moz-selection {background: #c47529; color: #fff; text-shadow: none} /* selected text */ ::-moz-selection {background: #5080A8; color: #fff; text-shadow: none} /* selected text */
::selection {background: #c47529; color: #fff; text-shadow: none} /* selected text */ ::selection {background: #5080A8; color: #fff; text-shadow: none} /* selected text */
/* OTHERS */ /* OTHERS */
strong, b, dt { font-weight: bold} strong, b, dt { font-weight: bold}
@ -105,11 +106,11 @@ span.amp{font-family:Adobe Caslon Pro,Baskerville,"Goudy Old Style","Palatino","
.cf {zoom:1} /* For IE 6/7 (trigger hasLayout) */ .cf {zoom:1} /* For IE 6/7 (trigger hasLayout) */
/* DEFAULT MOBILE STYLE */ /* DEFAULT MOBILE STYLE */
body {width: 92%; margin: 0 auto} /* Center page without wrapper */ .page-margined {width: 92%; margin: 0 auto} /* Center page without wrapper */
/* column grid */ /* column grid */
.g1,.g2,.g3{display:block; position: relative; margin-left: 1%; margin-right: 1%} .g1,.g2,.g3,.g1-2{display:block; position: relative; margin-left: 1%; margin-right: 1%}
/* 1 column grid */ /* 1 column grid */
.g1,.g2,.g3{width:98.0%} .g1,.g2,.g3,.g1-2{width:98.0%}
/* media Queries /* media Queries
@ -149,12 +150,13 @@ Change widths as necessary
} }
/* COLUMN GRID */ /* COLUMN GRID */
.g1,.g2,.g3 {display:inline; float: left} .g1,.g2,.g3,.g1-2 {display:inline; float: left}
/* 2 COLUMN GRID */ /* 2 COLUMN GRID */
.g1 {width:48.0%} .g1 {width:48.0%}
.g2 {width:48.0%} .g2 {width:48.0%}
.g3 {width:98.0%} .g3 {width:98.0%}
.g1-2 {width:48%;}
} }
/* LANDSCAPE TABLET/NETBOOK/LAPTOP */ /* LANDSCAPE TABLET/NETBOOK/LAPTOP */
@ -167,6 +169,7 @@ Change widths as necessary
.g1 {width:31.333%} .g1 {width:31.333%}
.g2 {width:64.667%;} .g2 {width:64.667%;}
.g3 {width:98.0%} .g3 {width:98.0%}
.g1-2 {width:48%;}
} }
@media only screen and (min-width: 1280px) { @media only screen and (min-width: 1280px) {
@ -179,7 +182,7 @@ Change widths as necessary
/* WIDESCREEN */ /* WIDESCREEN */
/* Increased body size for legibility */ /* Increased body size for legibility */
@media only screen and (min-width: 1400px) { @media only screen and (min-width: 1400px) {
body {max-width:1440px} /* 18.5px / 28px */ .page-margined {max-width:1440px} /* 18.5px / 28px */
} }
@ -197,4 +200,334 @@ Change widths as necessary
@page {margin: 0.5cm} @page {margin: 0.5cm}
p, h2, h3 {orphans: 3; widows: 3} p, h2, h3 {orphans: 3; widows: 3}
h2, h3{page-break-after: avoid} h2, h3{page-break-after: avoid}
}
/* FF SPECIFIC */
ul { margin-top: 1em; }
.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
nav { position:relative; clear:both; margin-bottom: .75em; }
nav ul { list-style: none; margin: 0; }
nav ul li { float: left; position: relative; margin:0 .5em; }
nav > ul > li:first-child { }
nav ul li a { display: block; padding:.25em .55em; background: #eee; margin-bottom: .5em; }
nav .current-page { background: #86929C; color: #fff; }
.billboard nav a { color: #5080A8; }
.billboard nav a.current-page { color: #fff; }
div.top {background-color: #CDD7DD; position:relative;}
div.bottom { padding-top: 2em; padding-bottom: 2em; position:relative; }
.padded { padding: 1em 1.5em; }
.no-margin { margin: 0; }
.article h4, .article h3 { margin-bottom: .25em; }
.article .author { margin-bottom: 1em; }
.article .info { margin-bottom: 1em; }
.article { margin-bottom: 2em; }
.pull-right { float:right; }
.pull-left { float:left; }
.article .author img {
vertical-align: middle;
margin-top: -2px;
margin-right: 1px;
margin-left: 1px;
margin-bottom: 0;
}
.article ul { margin: 0; margin-left: 1em; }
header img.logo {
margin-bottom: 0;
position:absolute;
top: .56em;
left: 0;
opacity: 0.65;
}
header h1 a {
padding-left: 2.4em;
margin-right: 1em;
}
header nav { font-size: 1.125em; line-height: 1.3333333333333333333333333333333em; margin: 0; }
header nav ul { margin-top: .75em; margin-bottom: .5em; }
header { margin-bottom: 1em;}
header h1 {font-size: 1.3125em; line-height: 1.1428571428571428571428571428571em; padding: .25em 0em; margin: 0; margin-top: .5em; color:#59656f;}
header h1 a {display: block; color:inherit;}
header h1 a:hover {text-decoration:none;}
.highlight { background-color: rgba(134,146,156,.1); padding:.05em .25em; }
.center-text {
text-align:center;
}
.header-half {width: auto; position:relative; float: none; height: auto; margin: 1%; padding: 1em 0em; }
.billboard { background-image: url("http://www.fortress-forever.com/bg_slashes.gif"); background-color: #86929C; color: #fff; }
.billboard a { color: #CDD7DD; }
.billboard .highlight { background-color: rgba(0,0,0,.1); padding:.05em .25em; }
.billboard.padded { padding-top: 2.5em; padding-bottom: 1.5em; }
.billboard p { margin-bottom: 1.5em; }
.billboard h1, .billboard h2, .billboard h3, .billboard h4 { color: #eee; }
.billboard .header-half h3 { margin: 0; }
.billboard #download-btn a { color: #5080A8; display: inline-block; padding:.25em .55em; background: #eee; margin-bottom: .1em; }
.billboard .header-half p { margin: .5em; }
.billboard a.more-info { display: inline-block; padding:.1em .55em; margin-bottom: .5em; }
.class-lineup { padding-top: 10%; }
@media only screen and (min-width: 468px) {
.class-lineup { background-image: url("../images/ClassLineup.png"); background-repeat:no-repeat; background-position: center bottom; padding-top: 23%; padding-bottom: 5%; background-size: 100%; max-width: 500px; margin: 0 auto; }
}
@media only screen and (min-width: 768px) {
.class-lineup { padding-top: 19%; }
}
@media only screen and (min-width: 870px) {
.class-lineup { padding-top: 18%; }
.header-half {width: 48%; position:relative; float: left; height: 400px; margin-left: 1%; margin-right: 1%;}
.header-half.pull-left {width: 40%; margin-left: 5%; margin-right: 5%;}
.abs-center {
position: relative;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
}
@media only screen and (min-width: 1024px) {
.class-lineup { padding-top: 21%; }
}
@media only screen and (min-width: 1280px) {
.class-lineup { padding-top: 23%; }
}
@media only screen and (min-width: 768px) {
ul.developer-list li { float: left; position: relative; margin: .25em 1%; width: 48%; padding: 0; }
}
@media only screen and (min-width: 1024px) {
ul.developer-list li { width: 31.33333333331%; }
}
footer { background-color: #CDD7DD; padding-top: 1.5em; }
#activity {margin-bottom: 1.5em;}
.activity-list {margin-bottom: 0.5em; list-style:none;}
.activity-list li {margin-bottom: 1px;}
.activity-list li:last-child {margin:0;}
.activity {padding: .5em 1em; color: inherit; line-height: 1.1428571428571428571428571428571em; padding-left: 48px; padding-right: 16px; display:block; background-image: url('../images/ff-24-black.png'); background-repeat: no-repeat; background-position: 8px center; }
.activity:hover { background-color: #CDD7DD; text-decoration: none; }
.activity-time { display:inline-block; margin:0; margin-left: 1em; font-size:0.75em; color: #888; }
.activity-list li ul { margin-left: 48px; padding-left: 16px; font-size: 0.75em; list-style:none; border-left: 1px solid #aaa; margin-bottom: 1em; }
#contribute {margin-top: 1.5em; position:relative;}
/*#contribute { padding-top: .5em; background-image: url('../images/github-64-black.png'); background-repeat: no-repeat; background-position: top right;}*/
#contribute .github-logo {position:absolute; top:-.5em; right:0; height: 64px; width: 64px; opacity: .75;}
#contribute .github-logo:hover {opacity: 1;}
.gh-username { font-weight: bold; font-family:"Cabin",Helvetica,arial,freesans,clean,sans-serif; }
.gh-repo { font-size: 0.875em; font-family:"Cabin",Helvetica,arial,freesans,clean,sans-serif; }
.gh-text { font-style: italic; }
.gh-issuetitle { font-size: 0.875em; }
.gh-commitsha { font-family: monospace; display: inline-block; padding: 0 .5em; background: #eee; margin-right: 0.5em; }
.gh-branch { border-bottom: 1px solid #ccc; }
.act-github { background-image: url('../images/github-24-black.png'); }
.act-facebook { background-image: url('../images/facebook-24-black.png'); }
.act-youtube { background-image: url('../images/youtube-24-black.png'); }
.developer-list { position:relative; clear:both; }
ul.developer-list { list-style: none; }
.dev-team-member { font-weight: bold; font-family:"Cabin",Helvetica,arial,freesans,clean,sans-serif; }
.pages{padding:.25em;text-align:center;margin-top:1em;}
.pages a, .pages span{display:inline-block; cursor:pointer; text-decoration: none; margin-top: 0.5em;}
.pages .gap, .pages .gap:hover {color: #aaa; background:transparent;cursor:default;}
.pages a{background:#eee;padding:2px 6px;margin-right:5px;min-width:15px;}
.pages a.current{background:#fff;color:#000;}
.pages a:hover, .pages a:focus{background:#86929C;color:#fff;}
.pages a.disabled{color:#bbb;background:transparent;cursor:default;}
.pages a.out-of-range{color:#7D0407; cursor:default; font-style:italic;}
.pages a.out-of-range:hover{color:#bbb;background:transparent;cursor:default;}
.t_subheader { margin-bottom: 1.5em; font-style: italic;}
.simple-icon-link { line-height: 32px;}
.simple-icon { margin: 0; display: inline-block; vertical-align: middle; }
.simple-icon-link img { margin-right: 0.5em; opacity: 0.75; margin-left: -0.25em; }
.simple-icon-link:hover img { opacity: 1; }
@media not print {
.z-depth-1 {
z-index: 100;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); }
.z-depth-1-half {
z-index: 150;
-webkit-box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);
box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15); }
.z-depth-2 {
z-index: 200;
-webkit-box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
-moz-box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); }
.z-depth-3 {
z-index: 300;
-webkit-box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
-moz-box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19); }
.z-depth-4 {
z-index: 400;
-webkit-box-shadow: 0 16px 28px 0 rgba(0, 0, 0, 0.22), 0 25px 55px 0 rgba(0, 0, 0, 0.21);
-moz-box-shadow: 0 16px 28px 0 rgba(0, 0, 0, 0.22), 0 25px 55px 0 rgba(0, 0, 0, 0.21);
box-shadow: 0 16px 28px 0 rgba(0, 0, 0, 0.22), 0 25px 55px 0 rgba(0, 0, 0, 0.21); }
.z-depth-5 {
z-index: 500;
-webkit-box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22);
-moz-box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22);
box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22); }
}
.jcarousel-wrapper {
margin: 0 auto;
margin-bottom: 1em;
position: relative;
width: 100%;
height: 400px;
}
@media only screen and (min-width: 768px) {
.jcarousel-wrapper { width: 75%; }
}
/*
This is the visible area of you carousel.
Set a width here to define how much items are visible.
The width can be either fixed in px or flexible in %.
Position must be relative!
*/
.jcarousel {
position: relative;
overflow: hidden;
}
/*
This is the container of the carousel items.
You must ensure that the position is relative or absolute and
that the width is big enough to contain all items.
*/
.jcarousel ul {
width: 20000em;
position: relative;
/* Optional, required in this case since it's a <ul> element */
list-style: none;
margin: 0;
padding: 0;
}
/*
These are the item elements. jCarousel works best, if the items
have a fixed width and height (but it's not required).
*/
.jcarousel li {
/* Required only for block elements like <li>'s */
float: left;
height: 400px;
}
.jcarousel li img { max-width: 100%; max-height: 100%; }
.jcarousel-prev,
.jcarousel-next {
position: absolute;
top: 200px;
width: 30px;
height: 30px;
text-align: center;
background: #fff;
color: #59656F !important;
text-decoration: none;
font: 24px/27px Arial, sans-serif;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
cursor: pointer;
}
.jcarousel-prev {
left: 2em;
}
.jcarousel-next {
right: 2em;
}
@media only screen and (min-width: 768px) {
.jcarousel-prev {
left: -10%;
}
.jcarousel-next {
right: -10%;
}
}
.jcarousel-prev:hover,
.jcarousel-next:hover {
text-decoration: none;
background: #86929C;
color: #fff !important;
}
.jcarousel-prev:hover span,
.jcarousel-next:hover span {
display: block;
}
.jcarousel-prev.inactive,
.jcarousel-next.inactive {
opacity: .5;
cursor: default;
}
/** Carousel Pagination **/
.jcarousel-pagination {
width: 100%;
position: absolute;
text-align: center;
bottom: 0em;
}
.jcarousel-pagination a {
width: 11px;
height: 11px;
display: inline-block;
background: none;
cursor: pointer;
text-indent: -9999px;
box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.25) inset;
border-radius: 20px;
margin: 0 0.25em;
background: #CDD7DD;
}
.jcarousel-pagination a:hover {
background: #86929C;
}
.jcarousel-pagination a.active {
background: #86929C;
color: #fff;
opacity: 1;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75);
} }

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
images/ClassLineup.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

BIN
images/facebook-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

BIN
images/ff-24-black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

BIN
images/ff-24-white.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

BIN
images/ff-mid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/github-24-black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

BIN
images/github-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

BIN
images/github-64-black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

BIN
images/icon-calendar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
images/steam-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

BIN
images/twitter-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

BIN
images/youtube-24-black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

BIN
images/youtube-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

212
inc/functions.php Normal file
View file

@ -0,0 +1,212 @@
<?php
function GetLink($path)
{
return FF_HOST . "/" . $path;
}
function GetForumLink($path)
{
return "http://forums.fortress-forever.com" . "/" . $path;
}
function PrintActivityList($activities, $allow_nested_lists = true, $print_comments = false)
{
foreach ($activities as $activity)
{
extract($activity);
$act_link_text = $print_comments ? $act_html : $act_html_short;
$act_nested_list = "";
$nested_list_pos = strpos($act_link_text, "<ul");
if ($nested_list_pos !== false)
{
if ($allow_nested_lists)
{
$act_nested_list = substr($act_link_text, $nested_list_pos);
}
$act_link_text = substr($act_link_text, 0, $nested_list_pos);
}
$act_link_text = str_replace("\"gh-repo\">fortressforever/", "\"gh-repo\">", $act_link_text);
echo "<li><a class=\"activity act-$act_source cf\" href=\"$act_url\">$act_link_text <small class=\"activity-time pull-right\">".ElapsedTime($act_date)."</small></a>";
echo "$act_nested_list";
echo "</li>";
}
}
// also borrowed from webfroot.co.nz's shoutbox
// *BOB* --- Rewritten by Bob - sorry, I like this coding better! ;)
function ParseEmoticons ($text) {
$emoticons = array();
$emoticons[] = array(":EEK:", "<img src='img/smileys/graybigeek.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":ROLLEYES:", "<img src='img/smileys/grayrolleyes.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":MAD:", "<img src='img/smileys/graymad.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":CONFUSED:", "<img src='img/smileys/grayconfused.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":SIGH:", "<img src='img/smileys/graysigh.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":YES:", "<img src='img/smileys/grayyes.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":NO:", "<img src='img/smileys/grayno.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":SLEEP:", "<img src='img/smileys/graysleep.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":UPSET:", "<img src='img/smileys/grayupset.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":SHY:", "<img src='img/smileys/grayshy.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":NONE:", "<img src='img/smileys/graynone.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":LAUGH:", "<img src='img/smileys/graylaugh.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":DEAD:", "<img src='img/smileys/graydead.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":CRY:", "<img src='img/smileys/graycry.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":eek:", "<img src='img/smileys/graybigeek.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":rolleyes:", "<img src='img/smileys/grayrolleyes.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":mad:", "<img src='img/smileys/graymad.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":confused:", "<img src='img/smileys/grayconfused.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":sigh:", "<img src='img/smileys/graysigh.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":yes:", "<img src='img/smileys/grayyes.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":no:", "<img src='img/smileys/grayno.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":sleep:", "<img src='img/smileys/graysleep.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":upset:", "<img src='img/smileys/grayupset.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":shy:", "<img src='img/smileys/grayshy.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":laugh:", "<img src='img/smileys/graylaugh.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":dead:", "<img src='img/smileys/graydead.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":cry:", "<img src='img/smileys/graycry.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":)", "<img src='img/smileys/graysmile.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":(", "<img src='img/smileys/graysad.gif' alt='' align='absmiddle'>");
$emoticons[] = array(";)", "<img src='img/smileys/graysmilewinkgrin.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":|", "<img src='img/smileys/graynone.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":-)", "<img src='img/smileys/graysmile.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":-(", "<img src='img/smileys/graysad.gif' alt='' align='absmiddle'>");
$emoticons[] = array(";-)", "<img src='img/smileys/graysmilewinkgrin.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":-|", "<img src='img/smileys/graynone.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":0", "<img src='img/smileys/graybigeek.gif' alt='' align='absmiddle'>");
$emoticons[] = array("B)", "<img src='img/smileys/graycool.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":D", "<img src='img/smileys/graybiggrin.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":P", "<img src='img/smileys/graybigrazz.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":B", "<img src='img/smileys/graybigrazz.gif' alt='' align='absmiddle'>");
$emoticons[] = array("B-)", "<img src='img/smileys/graycool.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":-D", "<img src='img/smileys/graybiggrin.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":-P", "<img src='img/smileys/graybigrazz.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":O", "<img src='img/smileys/graybigeek.gif' alt='' align='absmiddle'>");
$emoticons[] = array("b)", "<img src='img/smileys/graycool.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":d", "<img src='img/smileys/graybiggrin.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":p", "<img src='img/smileys/graybigrazz.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":b", "<img src='img/smileys/graybigrazz.gif' alt='' align='absmiddle'>");
$emoticons[] = array("b-)", "<img src='img/smileys/graycool.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":-d", "<img src='img/smileys/graybiggrin.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":-p", "<img src='img/smileys/graybigrazz.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":-b", "<img src='img/smileys/graybigrazz.gif' alt='' align='absmiddle'>");
$emoticons[] = array(":o", "<img src='img/smileys/graybigeek.gif' alt='' align='absmiddle'>");
$emoticons[] = array("o_O", "<img src='img/smileys/graybigeek.gif' alt='' align='absmiddle'>");
$emoticons[] = array("O_o", "<img src='img/smileys/graybigeek.gif' alt='' align='absmiddle'>");
$emoticons[] = array("o_o", "<img src='img/smileys/graybigeek.gif' alt='' align='absmiddle'>");
$emoticons[] = array("O_O", "<img src='img/smileys/graybigeek.gif' alt='' align='absmiddle'>");
foreach ($emoticons as $emoticon) {
$text = str_replace($emoticon[0],$emoticon[1],$text);
}
return $text;
}
function ParseBBCode($text){
$text = str_ireplace('<', '&lt;', $text);
$text = str_ireplace('>', '&gt;', $text);
$text = mb_eregi_replace("\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]","<font color=\"\\1\">\\2</font>",$text);
$text = mb_eregi_replace("\\[size=([^\\[]*)\\]([^\\[]*)\\[/size\\]","<font size=\"\\1\">\\2</font>",$text);
$text = mb_eregi_replace("\\[font=([^\\[]*)\\]([^\\[]*)\\[/font\\]","<font face=\"\\1\">\\2</font>",$text);
$text = mb_eregi_replace("\\[img]([^\\[]*)\\[/img\\]","<img src=\"\\1\">",$text);
$text = mb_eregi_replace("\\[imgb]([^\\[]*)\\[/imgb\\]","<img src=\"\\1\" class=\"imgborder\">",$text);
$text = mb_eregi_replace("\\[align=([^\\[]*)\\]([^\\[]*)\\[/align\\]","<p align=\"\\1\">\\2</p>",$text);
$text = str_ireplace("[center]", "<center>", $text);
$text = str_ireplace("[/center]", "</center>", $text);
$text = str_ireplace("[left]", "<div align=\"left\">", $text); // replace these with floats
$text = str_ireplace("[/left]", "</div>", $text);
$text = str_ireplace("[right]", "<div align=\"right\">", $text);
$text = str_ireplace("[/right]", "</div>", $text);
$text = str_ireplace("[hr]", "<hr>", $text);
$text = str_ireplace("[sub]", "<sub>", $text);
$text = str_ireplace("[/sub]", "</sub>", $text);
$text = str_ireplace("[sup]", "<sup>", $text);
$text = str_ireplace("[/sup]", "</sup>", $text);
$text = str_ireplace("[s]", "<s>", $text);
$text = str_ireplace("[/s]", "</s>", $text);
$text = str_ireplace("[b]", "<b>", $text);
$text = str_ireplace("[/b]", "</b>", $text);
$text = str_ireplace("[i]", "<i>", $text);
$text = str_ireplace("[/i]", "</i>", $text);
$text = str_ireplace("[u]", "<u>", $text);
$text = str_ireplace("[/u]", "</u>", $text);
$text = str_ireplace("[*]", "<li>", $text);
$text = str_ireplace("[olist]", "<ol>", $text);
$text = str_ireplace("[/olist]", "</ol>", $text);
$text = str_ireplace("[list]", "<ul>", $text);
$text = str_ireplace("[/list]", "</ul>", $text);
//$text = eregi_replace("\\[email\\]([^\\[]*)\\[/email\\]", "<a href=\"mailto:\\1\">\\1</a>",$text);
//$text = eregi_replace("\\[email=([^\\[]*)\\]([^\\[]*)\\[/email\\]", "<a href=\"mailto:\\1\">\\2</a>",$text);
$text = str_ireplace("[code]","<code><pre>",$text);
$text = str_ireplace("[/code]","</pre></code>",$text);
$text = mb_eregi_replace("\\[url\\]www.([^\\[]*)\\[/url\\]", "<a href=\"http://www.\\1\" target=\"_blank\">\\1</a>",$text);
$text = mb_eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=\"_blank\">\\1</a>",$text);
$text = mb_eregi_replace("\\[url=([^\\[]*)\\]([^\\[]*)\\[/url\\]","<a href=\"\\1\" target=\"_blank\">\\2</a>",$text);
$text = mb_eregi_replace("(^|[>[:space:]\n])([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])([<[:space:]\n]|$)","\\1<a href=\"\\2://\\3\\4\" target=\"_blank\">\\2://\\3\\4</a>\\5", $text);
$text = mb_eregi_replace("\\[youtube]([^\\[]*)\\[/youtube\\]","<object width=\"425\" height=\"349\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\1&hl=en&fs=1&color1=0x3a3a3a&color2=0x999999&border=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"http://www.youtube.com/v/\\1&hl=en&fs=1&color1=0x3a3a3a&color2=0x999999&border=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"425\" height=\"349\"></embed></object>",$text);
$text = mb_eregi_replace("\\[vimeo]([^\\[]*)\\[/vimeo\\]","<object width=\"400\" height=\"300\"><param name=\"quality\" value=\"best\" /><param name=\"allowfullscreen\" value=\"true\" /><param name=\"scale\" value=\"showAll\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=\\1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=\\1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" quality=\"best\" scale=\"showAll\" allowscriptaccess=\"always\" width=\"400\" height=\"300\"></embed></object><br><a href=\"http://www.vimeo.com/\\1\" target=\"_blank\">vimeo.com/\\1</a>",$text);
$text = mb_eregi_replace("\\[vimeohd]([^\\[]*)\\[/vimeohd\\]","<object width=\"533\" height=\"300\"><param name=\"quality\" value=\"best\" /><param name=\"allowfullscreen\" value=\"true\" /><param name=\"scale\" value=\"showAll\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id=\\1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id=\\1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffffff&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" quality=\"best\" scale=\"showAll\" allowscriptaccess=\"always\" width=\"533\" height=\"300\"></embed></object><br><a href=\"http://www.vimeo.com/\\1\" target=\"_blank\">vimeo.com/\\1</a>",$text);
$text = mb_eregi_replace("\\[gamevee]([^\\[]*)\\[/gamevee\\]","<object type=\"application/x-shockwave-flash\" data=\"http://www.gamevee.com/public/gameveeplayer.swf?video_id=\\1&embed=on&vidview=on\" width=\"480\" height=\"420\"><param name=\"movie\" value=\"http://www.gamevee.com/public/gameveeplayer.swf?video_id=\\1&embed=on&vidview=on\" /><param name=\"allowfullscreen\" value=\"true\"/><param name=\"bgcolor\" value=\"#FFFFFF\"/></object>",$text);
$text = mb_eregi_replace("\\[gameveehd]([^\\[]*)\\[/gameveehd\\]","<object type=\"application/x-shockwave-flash\" data=\"http://www.gamevee.com/public/gameveeplayerh264_480330.swf?video_id=\\1&embed=on&vidview=on\" width=\"533\" height=\"366\"><param name=\"movie\" value=\"http://www.gamevee.com/public/gameveeplayerh264_480330.swf?video_id=\\1&embed=on&vidview=on\"/><param name=\"allowfullscreen\" value=\"true\"/><param name=\"bgcolor\" value=\"#FFFFFF\"/></object>",$text);
$text = mb_eregi_replace("\\[veoh]([^\\[]*)\\[/veoh\\]","<embed src=\"http://www.veoh.com/veohplayer.swf?permalinkId=\\1&id=anonymous&player=videodetailsembedded&affiliateId=&videoAutoPlay=0\" allowFullScreen=\"true\" width=\"540\" height=\"438\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>",$text);
$text = mb_eregi_replace("\\[veohhd]([^\\[]*)\\[/veohhd\\]","<embed src=\"http://www.veoh.com/veohplayer.swf?permalinkId=\\1&id=anonymous&player=videodetailsembedded&affiliateId=&videoAutoPlay=0\" allowFullScreen=\"true\" width=\"540\" height=\"340\" bgcolor=\"#FFFFFF\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed>",$text);
$text = mb_eregi_replace("\\[digg]([^\\[]*)\\[/digg\\]","<div style=\"float: right; margin-left: 10px; margin-bottom: 2px;\"><script type=\"text/javascript\">digg_url = '\\1';</script><script src=\"http://digg.com/tools/diggthis.js\" type=\"text/javascript\"></script></div>",$text);
$text = ParseBBCode_Quotes($text);
return $text;
}
function ParseBBCode_Quotes( $text )
{
$tablo=explode("[quote",$text);
$text="";
$text.=$tablo[0];
foreach($tablo as $cle=>$valeur)
{
$tablo1=explode("[/quote]",$valeur);
if(isset($tablo1[1]))
{
foreach($tablo1 as $cle1=>$valeur1)
{
if($cle1==0)
{
$postedby = "";
if ($valeur1[0] == "=")
{
$user = substr($valeur1, 1, strpos($valeur1, "]")-1);
$postedby = "<span class=\"quotehead\">Originally posted by <strong>$user</strong></span>";
$valeur1 = substr($valeur1, strpos($valeur1, "]")+1);
}
elseif ($valeur1[0] == "]")
{
$valeur1 = substr($valeur1, 1);
}
$valeur1="<blockquote>$postedby".$valeur1."</blockquote>";
}
$text.=$valeur1;
}
}
}
return $text;
}
function ElapsedTime($timestamp, $precision = 1) {
if (!$timestamp) { return 'just now'; }
if (ctype_digit($timestamp)) { $time = (int)$timestamp; }
elseif (is_string($timestamp)) { $time = strtotime($timestamp); }
$time = time() - $time;
if ($time <= 0) return 'just now';
$a = array('decade' => 315576000, 'year' => 31557600, 'month' => 2629800, 'week' => 604800, 'day' => 86400, 'hour' => 3600, 'min' => 60, 'sec' => 1);
$i = 0;
foreach($a as $k => $v) {
$$k = floor($time/$v);
if ($$k) $i++;
$time = $i >= $precision ? 0 : $time - $$k * $v;
$s = $$k > 1 ? 's' : '';
$$k = $$k ? $$k.' '.$k.$s.($time ? ',' : '').' ' : '';
@$result .= $$k;
}
return $result ? $result.'ago' : 'just now';
}

233
inc/sqkPaginator.php Normal file
View file

@ -0,0 +1,233 @@
<?php
namespace sqkPaginator;
class Page
{
public $page_num;
public $is_current;
public $out_of_range;
public function __construct($page_num, $is_current = false, $out_of_range = false)
{
$this->page_num = $page_num;
$this->is_current = $is_current;
$this->out_of_range = $out_of_range;
}
public function __tostring()
{
$str = $this->is_current ? "({$this->page_num})" : "{$this->page_num}";
return $this->out_of_range ? "<$str>" : $str;
}
}
class Gap
{
public $start_page;
public $end_page;
public $out_of_range;
public function __construct($start_page, $end_page, $out_of_range = false)
{
$this->start_page = $start_page;
$this->end_page = $end_page;
$this->out_of_range = $out_of_range;
}
public function length()
{
return $end_page - $start_page;
}
public function __tostring()
{
$str = "[{$this->start_page}...{$this->end_page}]";
return $this->out_of_range ? "<$str>" : $str;
}
}
class Navigator
{
public $page_num;
public $delta;
const INVALID_PAGE = -1;
public function __construct($start_page, $delta)
{
if ($start_page === Navigator::INVALID_PAGE)
$this->page_num = $start_page;
else
$this->page_num = $start_page + $delta;
$this->delta = $delta;
}
public function isValid()
{
return $this->page_num !== Navigator::INVALID_PAGE;
}
public function __tostring()
{
return $this->isValid() ? "[&#916;{$this->delta}]" : "{&#916;{$this->delta}}";
}
}
class Paginator
{
private $total_results;
private $results_per_page;
private $current_page;
private $total_pages;
public function __construct($total_results, $results_per_page, $current_page)
{
$this->total_results = $total_results;
$this->results_per_page = $results_per_page;
$this->current_page = intval($current_page);
$this->total_pages = ceil($this->total_results / $this->results_per_page);
}
public function getPage($page_num)
{
return new Page($page_num, intval($page_num) === $this->current_page, $page_num > $this->total_pages);
}
public function getPageRange($start_page, $end_page)
{
$pages = array();
for ($i=$start_page; $i <= $end_page; $i++)
{
$pages[] = $this->getPage($i);
}
return $pages;
}
public function getPages($adjacent_links = 7, $detached_links = 3)
{
$pagination = array();
$total_pages = ceil($this->total_results / $this->results_per_page);
$max_num_detached = $detached_links * 2;
$max_adjacents = $adjacent_links * 2;
$num_links = $max_num_detached + $max_adjacents;
$links_per_side = $num_links / 2;
$out_of_range = $this->current_page > $total_pages;
//previous button
if ($total_pages > 0 && $this->current_page > 1)
$pagination[] = new Navigator(!$out_of_range ? $this->current_page : $this->total_pages + 1, -1);
else
$pagination[] = new Navigator(Navigator::INVALID_PAGE, -1);
if ($total_pages <= $num_links)
{
$pagination = array_merge($pagination, $this->getPageRange(1, $total_pages));
}
else
{
$num_skipped_pre = $this->current_page - $links_per_side - 1;
$num_skipped_post = $total_pages - $this->current_page - $links_per_side;
if ($num_skipped_pre < 0)
{
$num_skipped_post += $num_skipped_pre;
$num_skipped_pre = 0;
}
if ($num_skipped_post < 0)
{
$num_skipped_pre += $num_skipped_post;
$num_skipped_post = 0;
}
$pre_start = 1;
$pre_end = $detached_links;
$post_start = $total_pages - $detached_links + 1;
$post_end = $total_pages;
$mid_start = $pre_end + $num_skipped_pre + 1;
$mid_end = $post_start - $num_skipped_post - 1;
$pagination = array_merge($pagination, $this->getPageRange($pre_start, $pre_end));
if ($num_skipped_pre > 0)
$pagination[] = new Gap($pre_end + 1, $mid_start - 1);
$pagination = array_merge($pagination, $this->getPageRange($mid_start, $mid_end));
if ($num_skipped_post > 0)
$pagination[] = new Gap($mid_end + 1, $post_start - 1);
$pagination = array_merge($pagination, $this->getPageRange($post_start, $post_end));
}
if ($this->current_page > $total_pages)
{
$pagination[] = new Gap($total_pages + 1, $this->current_page - 1, true);
$pagination[] = $this->getPage($this->current_page);
}
//next button
if ($total_pages > 0 && $this->current_page < $total_pages)
$pagination[] = new Navigator(!$out_of_range ? $this->current_page : 0, 1);
else
$pagination[] = new Navigator(Navigator::INVALID_PAGE, 1);
return $pagination;
}
}
class PaginationPrinter
{
public $wrapper_class = "pages";
public $wrapper_tag = "div";
public $default_class = "default";
public $out_of_range_class = "out-of-range";
public $disabled_class = "disabled";
public $current_class = "current";
public $gap_class = "gap";
public $back_string = "Prev";
public $next_string = "Next";
public $gap_string = " ... ";
public $href;
public function __construct($href = "___pagenum___")
{
$this->href = $href;
}
public function getHref($page_num)
{
return str_replace("___pagenum___", $page_num, $this->href);
}
public function getHTML($pages)
{
$html = "";
$html .= "<{$this->wrapper_tag} class=\"{$this->wrapper_class}\">";
foreach ($pages as $page)
{
if ($page instanceof Page)
{
$classes = array();
if ($page->out_of_range)
$classes[] = $this->out_of_range_class;
$classes[] = $page->is_current ? $this->current_class : $this->default_class;
$classes = implode(" ", $classes);
$html .= "<a href=\"".$this->getHref($page->page_num)."\" class=\"$classes\">{$page->page_num}</a>";
}
elseif ($page instanceof Gap)
{
$classes = $page->out_of_range ? "{$this->out_of_range_class} {$this->gap_class}" : "{$this->gap_class}";
$html .= "<a class=\"$classes\">{$this->gap_string}</a>";
}
elseif ($page instanceof Navigator)
{
$str = $page->delta > 0 ? $this->next_string : $this->back_string;
if (!$page->isValid())
$html .= "<a class=\"{$this->disabled_class}\">$str</a>";
else
$html .= "<a href=\"".$this->getHref($page->page_num)."\" class=\"{$this->default_class}\">$str</a>";
}
}
$html .= "</{$this->wrapper_tag}>\n";
return $html;
}
}

View file

@ -1,140 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<!--
*****************************************************************
Fluid Baseline Grid v1.0.0
Designed & Built by Josh Hopkins and 40 Horse, http://40horse.com
Licensed under Unlicense, http://unlicense.org/
*****************************************************************
-->
<title>Fortress Forever</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="description" content="" />
<meta name="author" content="">
<meta name="keywords" content="" />
<!-- Optimized mobile viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in root directory -->
<link href="css/style.css" rel="stylesheet" />
<style>
ul { margin-top: 1em; }
.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
nav { position:relative; clear:both; margin-bottom: .75em; }
nav ul { list-style: none; background: #333; margin: 0; }
nav ul li { float: left; position: relative; margin:0 .5em; }
nav > ul > li:first-child { margin-left: 0; }
nav ul li a { display: block; padding:.25em .55em; background: #eee; margin-bottom: .5em; }
header nav { font-size: 120%; margin-top: .75em; }
div.top { margin-bottom: 2em; }
div.bottom { }
.article h4 { margin-bottom: .25em; }
.article .author { margin-bottom: 1em; }
.article .info { margin-bottom: .25em; }
.pull-right { float:right; }
.pull-left { float:left; }
</style>
</head>
<body>
<div class="top cf">
<header>
<div class="g1">
<h1>Fortress Forever</h1>
<p>A free Team Fortress mod on the Source Engine</p>
<h3><a href="#" id="download">Download</a></h3>
<div class="embed-container" style="margin-bottom: 1.5em"><iframe src="http://www.youtube.com/embed/-0-6wdDyGLI" frameborder="0" allowfullscreen></iframe></div>
</div>
<div class="g2">
<nav class="cf">
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Development</a></li>
<li><a href="#">Community</a></li>
<li><a href="#">Forums</a></li>
<li><a href="#">Wiki</a></li>
</ul>
</nav>
</div>
</header>
<div class="g2">
<div class="article">
<h4>A Long Overdue Update</h4>
<div class="author">
<span>Posted 4 days, 2 hours ago</span> <span class="pull-right">by Fortress Forever Team</span>
</div>
<div class="info">
It's been nearly a year since Fortress Forever was Greenlit, and there's been a total lack of updates since then. To remedy that, here are two things that will be happening in the coming weeks:
<ul>
<li>The current version of Fortress Forever will be released on Steam</li>
<li>The Fortress Forever code will be made open source on Github</li>
</ul>
<b>Why did it take a year for this to happen?</b>
<br />We didn't think it was possible to release the current version of FF on Steam because we thought that the version of the Source SDK that FF uses was too old. <a href="http://neotokyohq.com/" target="_blank">Neotokyo</a> proved otherwise, and we are able to follow their lead and finally release FF on Steam.
<br />
<br /><b>What does 'released on Steam' mean?</b>
<br />It means that you'll be able to install Fortress Forever directly through Steam and that you will receive updates automatically. As always, Fortress Forever will be completely free.
<br />
<br /><b>Why go open source?</b>
<br />Fortress Forever's development has been largely opaque for a huge majority of the playerbase for a very long time, and the reason for that opaqueness has not always been intentional; attempting to keep everyone informed can be pretty labor intensive. By moving our development entirely into public view, it will be easier for everyone to stay in the loop with what will be happening with the game, and will give everyone a chance to participate directly in the development process.
</div>
<a href="http://alpha.fortress-forever.com/forum/showthread.php?t=24485" class="pull-left">Discuss on the forums →</a>
<a href="http://www.fortress-forever.com/?a=archive" class="pull-right">View all news posts</a>
</div>
</div>
</div>
<div class="bottom cf">
<div class="g1">
<h3>Contribute</h3>
<ul>
<li>Our code is open source on Github. Submit a pull request!</li>
<li>Report any bugs you find</li>
<li>Suggest features</li>
</ul>
</div>
<div class="g2">
<h3>Activity</h3>
<ul>
<li>Github: Commit 'Fix everything' pushed to branch 'beta' by Darn <small>2 hours ago</small></li>
<li>Github: Issue 'Everything is broken' created by DumboJones <small>3 hours ago</small></li>
<li>Twitter: Thing and stuff <small>4 days ago</small></li>
<li>Dev Journal: squeek. <small>7 days ago</small></li>
</ul>
</div>
</div>
<footer class="g3 cf">
<nav class="cf">
<ul>
<li><a href="#">Github</a></li>
<li><a href="#">Youtube</a></li>
<li><a href="#">Twitter</a></li>
<li><a href="#">Facebook</a></li>
<li><a href="#">Steam</a></li>
</ul>
</nav>
</footer>
<!-- JavaScript at the bottom for fast page loading -->
<!-- Minimized jQuery from Google CDN -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<!-- HTML5 IE Enabling Script -->
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<!-- CSS3 Media Queries -->
<script src="js/respond.min.js"></script>
<!-- Optimized Google Analytics. Change UA-XXXXX-X to your site ID -->
<script>var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'))</script>
</body>
</html>

66
index.php Normal file
View file

@ -0,0 +1,66 @@
<?php
require_once __DIR__ . "/config.php";
$page = isset($_GET["page"]) ? $_GET["page"] : "home";
$paramstring = isset($_GET["rest"]) ? $_GET["rest"] : "";
$parameters = explode('/', $paramstring);
$DB = $config["site_db"];
?>
<!DOCTYPE html>
<html>
<head>
<title>Fortress Forever</title>
<base href="<?=FF_HOST?>/" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="description" content="" />
<meta name="author" content="">
<meta name="keywords" content="" />
<!-- Optimized mobile viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='http://fonts.googleapis.com/css?family=Cabin:400,500,600,700' rel='stylesheet' type='text/css'>
<link href="css/style.css" rel="stylesheet" />
</head>
<body>
<div class="top cf z-depth-1">
<header class="cf page-margined">
<nav class="cf g3">
<h1 class="pull-left"><a href="<?=GetLink("");?>"><img src="images/ff-mid.png" class="logo" /> Fortress Forever</a></h1>
<ul class="pull-right">
<li><a href="<?=GetLink("about");?>" class="<?=in_array($page, array("about", "changelogs")) ? "current-page" : ""?>">About</a></li>
<li><a href="<?=GetLink("development");?>" class="<?=in_array($page, array("development", "activity", "dev-journals", "contribute")) ? "current-page" : ""?>">Development</a></li>
<!--<li><a href="<?=GetLink("community");?>" class="<?=$page === "community" ? "current-page" : ""?>">Community</a></li>-->
<li><a href="<?=GetForumLink("");?>">Forums</a></li>
<li><a href="<?=GetLink("wiki");?>">Wiki</a></li>
</ul>
</nav>
</header>
</div>
<?
if (file_exists("pages/".$page.".php"))
{
require_once( "pages/".$page.".php" );
}
else
{
require_once( "pages/404.php" );
}
?>
<footer class="cf">
<div class="page-margined">
<div class="g3">
<nav class="cf">
<ul>
<li><a href="https://github.com/fortressforever" class="simple-icon-link"><img style="background-color: rgb(65,131,196);" class="simple-icon" src="images/github-32.png" />Github</a></li>
<li><a href="http://www.youtube.com/user/fortressforever/" class="simple-icon-link"><img style="background-color: rgb(205,51,45);" class="simple-icon" src="images/youtube-32.png" />Youtube</a></li>
<li><a href="https://twitter.com/FortressForever" class="simple-icon-link"><img style="background-color: rgb(0,172,237);" class="simple-icon" src="images/twitter-32.png" />Twitter</a></li>
<li><a href="https://www.facebook.com/fortressforever" class="simple-icon-link"><img style="background-color: rgb(59,89,152);" class="simple-icon" src="images/facebook-32.png" />Facebook</a></li>
<li><a href="http://steamcommunity.com/groups/FortressForever" class="simple-icon-link"><img style="background-color: rgb(0,0,0);" class="simple-icon" src="images/steam-32.png" />Steam</a></li>
</ul>
</nav>
</div>
</div>
</footer>
</body></html>

4
js/jquery.jcarousel.min.js vendored Normal file

File diff suppressed because one or more lines are too long

4
js/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

15
pages/404.php Normal file
View file

@ -0,0 +1,15 @@
<div class="billboard padded cf">
<div class="page-margined">
<div class="g3">
<h2>404: Page Not Found</h2>
<p>The page you were looking for could not be found</p>
</div>
</div>
</div>
<div class="bottom z-depth-1">
<div class="page-margined cf">
<div class="g3">
<h4><a href="<?=GetLink("")?>">Go to the home page</a></h4>
</div>
</div>
</div>

184
pages/about.php Normal file
View file

@ -0,0 +1,184 @@
<?php
$query = $DB->query(
"SELECT * FROM ff_media
WHERE m_visibility >= 1
ORDER BY RAND()
LIMIT 5"
);
$random_media = $query->fetchAll();
$query = $DB->query(
"SELECT user_id, user_username, profile_realname, ut_name FROM ff_users u
LEFT JOIN ff_users_titles ut ON u.profile_title = ut.ut_id
WHERE ut_type='job' AND user_access>0
ORDER BY user_id ASC, user_username ASC"
);
$current_team = $query->fetchAll();
$query = $DB->query(
"SELECT user_id, user_username, profile_realname, profile_title, ut_name FROM ff_users u
LEFT JOIN ff_users_titles ut ON u.profile_title = ut.ut_id
WHERE ut_type='job' AND user_access=0
ORDER BY user_username ASC"
);
$retired_team = $query->fetchAll();
?>
<div class="cf billboard padded">
<div class="page-margined cf">
<div class="g3">
<div class="jcarousel-wrapper z-depth-2">
<div class="jcarousel">
<ul>
<?php
foreach ($random_media as $media)
{
extract($media);
?>
<li><img src="<?=FF_HOST_BASE?>/media/<?=$m_pubid;?>.jpg" /></li>
<?php
}
?>
</ul>
</div>
<a class="jcarousel-prev z-depth-1">&lsaquo;</a>
<a class="jcarousel-next z-depth-1">&rsaquo;</a>
<p class="jcarousel-pagination"></p>
</div>
</div>
</div>
</div>
<div class="bottom cf z-depth-1">
<div class="page-margined">
<div class="g2">
<h3>About</h3>
<p>Fortress Forever is a Source mod inspired by the earlier versions of the Team Fortress series (Team Fortress Classic and QuakeWorld Team Fortress). Our all-volunteer team has created this mod entirely from scratch and continued to develop it for over 5 years now. It was originally released in September of 2007.</p>
<p>Fortress Forever involves two or more teams, each with 9 available classes, competing in a variety of map-determined objectives (capture the flag, territorial control, invade and defend, etc). Each class has its own unique abilities and strengths that offer extremely varied playstyles. The gameplay ranges from fast-paced, competitive, and deep to absurd and chaotic.</p>
<ul>
<li>Totally free</li>
<li>Fast paced, team- and class-based gameplay</li>
<li>Faithful to the spirit of Team Fortress Classic (TFC) and QuakeWorld Team Fortress (QWTF), meaning Fortress Forever includes offhand grenades, bunnyhopping, etc</li>
<li>10 Classes (9 + Civilian)</li>
<li>Training level and in-game hints</li>
<li>Extensive map scripting/customization using Lua</li>
</ul>
</div>
<div class="g1">
<h3>Patch Notes</h3>
<h4>Pre-Greenlight</h4>
<nav class="cf">
<ul>
<li><a href="<?=GetLink("changelogs/2.46")?>">2.46</a></li>
<li><a href="<?=GetLink("changelogs/2.45")?>">2.45</a></li>
<li><a href="<?=GetLink("changelogs/2.44")?>">2.44</a></li>
<li><a href="<?=GetLink("changelogs/2.43")?>">2.43</a></li>
<li><a href="<?=GetLink("changelogs/2.42")?>">2.42</a></li>
<li><a href="<?=GetLink("changelogs/2.41")?>">2.41</a></li>
<li><a href="<?=GetLink("changelogs/2.4")?>">2.4</a></li>
<li><a href="<?=GetLink("changelogs/2.3")?>">2.3</a></li>
<li><a href="<?=GetLink("changelogs/2.2")?>">2.2</a></li>
<li><a href="<?=GetLink("changelogs/2.1")?>">2.1</a></li>
<li><a href="<?=GetLink("changelogs/2.0")?>">2.0</a></li>
<li><a href="<?=GetLink("changelogs/1.11")?>">1.11</a></li>
<li><a href="<?=GetLink("changelogs/1.1")?>">1.1</a></li>
<li><a href="<?=GetLink("changelogs/1.0")?>">1.0</a></li>
</ul>
</nav>
<br/>
<h3>Contact</h3>
<blockquote>
<div><span class="highlight">fortressforever@gmail.com</span></div>
<div><span class="highlight">#FortressForever</span> on irc.quakenet.org</div>
<div><a class="highlight" href="<?=GetForumLink("")?>">Fortress Forever Forums</a></div>
</blockquote>
</div>
<div class="g3 cf">
<h3>Development Team</h3>
<ul class="developer-list cf">
<?php
foreach($current_team as $team_member)
{
if(isset($team_member["profile_realname"]) && $team_member["profile_realname"] !== "")
{
$exploded_name = explode(" ", $team_member["profile_realname"]);
$first_name = isset($exploded_name[0]) ? $exploded_name[0] : "";
$last_name = isset($exploded_name[1]) ? $exploded_name[1] : "";
$name = $first_name.' "'.$team_member["user_username"].'" '.$last_name;
}
else
$name = $team_member["user_username"];
?>
<li><span class="dev-team-member"><?=$name?></span> <small>(<?=$team_member["ut_name"];?>)</small></li>
<?php
}
?>
</ul>
<h4>Past Members</h4>
<ul class="developer-list cf">
<?php
foreach($retired_team as $team_member)
{
if(isset($team_member["profile_realname"]) && $team_member["profile_realname"] !== "")
{
$exploded_name = explode(" ", $team_member["profile_realname"]);
$first_name = isset($exploded_name[0]) ? $exploded_name[0] : "";
$last_name = isset($exploded_name[1]) ? $exploded_name[1] : "";
$name = $first_name.' "'.$team_member["user_username"].'" '.$last_name;
}
else
$name = $team_member["user_username"];
?>
<li><span class="dev-team-member"><?=$name?></span> <small>(<?=$team_member["ut_name"];?>)</small></li>
<?php
}
?>
</ul>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.jcarousel.min.js"></script>
<script type="text/javascript">
$( window ).load(function() {
$('.jcarousel')
.jcarousel({
wrap: 'circular'
});
$('.jcarousel-prev')
.on('jcarouselcontrol:active', function() {
$(this).removeClass('inactive');
})
.on('jcarouselcontrol:inactive', function() {
$(this).addClass('inactive');
})
.jcarouselControl({
target: '-=1'
});
$('.jcarousel-next')
.on('jcarouselcontrol:active', function() {
$(this).removeClass('inactive');
})
.on('jcarouselcontrol:inactive', function() {
$(this).addClass('inactive');
})
.jcarouselControl({
target: '+=1'
});
$('.jcarousel-pagination')
.on('jcarouselpagination:active', 'a', function() {
$(this).addClass('active');
})
.on('jcarouselpagination:inactive', 'a', function() {
$(this).removeClass('active');
})
.jcarouselPagination({
'item': function(page, carouselItems) {
return '<a>' + page + '</a>';
}
});
});
</script>

47
pages/activity.php Normal file
View file

@ -0,0 +1,47 @@
<?php
$results_per_page = 25;
$current_page = 1;
if ($parameters[0] === "page" && isset($parameters[1]) && is_numeric($parameters[1]))
{
$current_page = max( 1, intval($parameters[1]) );
}
$start = $results_per_page * $current_page - $results_per_page;
$limit = $results_per_page;
$query = $DB->query(
"SELECT COUNT(*) FROM ff_activity"
);
$total_results = $query->fetch();
$total_results = $total_results[0];
$query = $DB->query(
"SELECT * FROM `ff_activity` ORDER BY `act_date` DESC LIMIT $start,$limit"
);
$results = $query->fetchAll();
?>
<div class="billboard padded cf">
<div class="page-margined">
<div class="g3">
<h2>Activity</h2>
</div>
</div>
</div>
<div class="bottom z-depth-1">
<div class="page-margined cf">
<div class="g3">
<ul class="activity-list cf">
<?php
PrintActivityList($results, true);
?>
</ul>
<?php
$paginator = new \sqkPaginator\Paginator($total_results, $results_per_page, $current_page);
$printer = new \sqkPaginator\PaginationPrinter(GetLink("activity/page/___pagenum___"));
echo $printer->getHTML($paginator->getPages());
?>
</div>
</div>
</div>

2392
pages/changelogs.php Normal file

File diff suppressed because it is too large Load diff

66
pages/contribute.php Normal file
View file

@ -0,0 +1,66 @@
<div class="cf billboard padded">
<div class="page-margined cf">
<div class="g3">
<h2>Contributing to Fortress Forever</h2>
<p>If you have any questions or need help getting started, contact us on <a href="http://forums.fortress-forever.com/">our forums</a> or on <a href="http://webchat.quakenet.org/?channels=fortressforever">IRC</a> (<code>#FortressForever</code> on irc.quakenet.org)</p>
</div>
</div>
</div>
<div class="bottom cf z-depth-1">
<div class="page-margined">
<div class="g1">
<h3>Testers</h3>
<ul>
<li>Report any bugs on <a href="https://github.com/fortressforever/fortressforever/issues">our issue tracker</a></li>
<li>Keep up to date with the <a href="http://forums.fortress-forever.com/showthread.php?t=24626">changes in the beta</a></li>
<li>Help test the beta by switching your branch to <code>beta</code> in Steam</li>
</ul>
<h3>Translators</h3>
<ul>
<li>See the <a href="https://github.com/fortressforever/fortressforever-scripts/wiki/Translating-Fortress-Forever">Translating Fortress Forever wiki article</a></li>
</ul>
</div>
<div class="g1">
<h3>Programmers</h3>
<h4>C++</h4>
<ul>
<li>See the <a href="https://github.com/fortressforever/fortressforever#readme">README on Github</a> to get your programming environment set up</li>
<li>Browse the <a href="https://github.com/fortressforever/fortressforever/issues">issue list</a></li>
</ul>
<h4>Lua</h4>
<ul>
<li>See the <a href="https://github.com/fortressforever/fortressforever-scripts">fortressforever-scripts repository</a></li>
<li>Browse the <a href="https://github.com/fortressforever/fortressforever-scripts/issues">scripts repository issue list</a> and/or the <a href="https://github.com/fortressforever/fortressforever/labels/mapping"><code>mapping</code> label of the main repository</a></li>
</ul>
</div>
<div class="g1">
<h3>Modelers/Animators</h3>
<ul>
<li>See the <a href="https://github.com/fortressforever/fortressforever-models">fortressforever-models repository</a></li>
<li>Browse the issues with the <a href="https://github.com/fortressforever/fortressforever/labels/modeling"><code>modeling</code></a> and/or <a href="https://github.com/fortressforever/fortressforever/labels/animation"><code>animation</code></a> labels</li>
</ul>
<h3>Level Designers</h3>
<ul>
<li>Browse the issues with the <a href="https://github.com/fortressforever/fortressforever/labels/mapping"><code>mapping</code> label</a> or contact us on <a href="http://forums.fortress-forever.com/">our forums</a> or on <a href="http://webchat.quakenet.org/?channels=fortressforever">IRC (#FortressForever on Quakenet)</a> to see how you can help</li>
</ul>
</div>
<div class="g1">
<h3>Sound Designers</h3>
<ul>
<li>Browse the issues with the <a href="https://github.com/fortressforever/fortressforever/labels/sound"><code>sound</code> label</a> or contact us on <a href="http://forums.fortress-forever.com/">our forums</a> or on <a href="http://webchat.quakenet.org/?channels=fortressforever">IRC (#FortressForever on Quakenet)</a> to see how you can help</li>
</ul>
</div>
</div>
</div>

84
pages/dev-journals.php Normal file
View file

@ -0,0 +1,84 @@
<?php
$results_per_page = 5;
$current_page = 1;
if (is_numeric($parameters[0]))
{
$id = intval($parameters[0]);
}
else if ($parameters[0] === "page" && isset($parameters[1]) && is_numeric($parameters[1]))
{
$current_page = max( 1, intval($parameters[1]) );
}
$single_post = isset($id);
$where = $single_post ? " AND devj_id=$id" : "";
$start = $single_post ? 0 : ($results_per_page * $current_page - $results_per_page);
$limit = $single_post ? 1 : $results_per_page;
if (!$single_post)
{
$query = $DB->query(
"SELECT COUNT(*) FROM ff_devj
WHERE devj_approved = '1'$where"
);
$total_results = $query->fetch();
$total_results = $total_results[0];
}
?>
<div class="billboard padded cf">
<div class="page-margined">
<div class="g3">
<h2>Developer Journals</h2>
</div>
</div>
</div>
<div class="bottom cf z-depth-1">
<div class="page-margined">
<div class="g3">
<?php
if ($single_post || $current_page * $results_per_page - $results_per_page <= $total_results)
{
$query = $DB->query(
"SELECT dj.devj_id, dj.devj_date, dj.devj_content, dj.devj_threadid, u.user_username, u.profile_title, ut.ut_name FROM ff_devj dj
LEFT JOIN ff_users u ON u.user_id = dj.devj_posterid
LEFT JOIN ff_users_titles ut ON u.profile_title = ut.ut_id
WHERE dj.devj_approved = '1'$where
ORDER BY dj.devj_date DESC LIMIT $start,$limit"
);
$all_devj = $query->fetchAll();
foreach($all_devj as $devj)
{
extract($devj);
$devj_title = "Developer Journal: $user_username";
$devj_content = ParseBBCode($devj_content);
$devj_content = str_replace("\n", "<br />", $devj_content);
?>
<div class="article cf z-depth-1 padded">
<h4><a href="<?=GetLink("dev-journals/$devj_id")?>"><?=$devj_title?></a></h4>
<div class="author cf">
<span class="pull-right" title="<?=$devj_date?>"><img src="images/icon-calendar.png" /> Posted <?=ElapsedTime($devj_date)?></span> <span class="pull-left"><?=$ut_name?></span>
</div>
<div class="info">
<?=$devj_content?>
</div>
<? if ($devj_threadid != 0) { ?><a href="http://forums.fortress-forever.com/showthread.php?t=<?=$devj_threadid?>" class="pull-left">Discuss on the forums →</a><? } ?>
<? if ($single_post) { ?><a href="<?=GetLink("dev-journals")?>" class="pull-right">View all developer journals</a><? } ?>
</div>
<?php
}
}
?>
<?php
if (!$single_post)
{
$paginator = new \sqkPaginator\Paginator($total_results, $results_per_page, $current_page);
$printer = new \sqkPaginator\PaginationPrinter(GetLink("dev-journals/page/___pagenum___"));
echo $printer->getHTML($paginator->getPages());
}
?>
</div>
</div>
</div>

56
pages/development.php Normal file
View file

@ -0,0 +1,56 @@
<?php
$query = $DB->query(
"SELECT * FROM `ff_activity` ORDER BY `act_date` DESC LIMIT 13"
);
$activity_list = $query->fetchAll();
$query = $DB->query(
"SELECT dj.devj_id, dj.devj_date, dj.devj_content, dj.devj_threadid, u.user_username, u.profile_title, ut.ut_name FROM ff_devj dj
LEFT JOIN ff_users u ON u.user_id = dj.devj_posterid
LEFT JOIN ff_users_titles ut ON u.profile_title = ut.ut_id
WHERE dj.devj_approved = '1'
ORDER BY dj.devj_date DESC LIMIT 1"
);
$latest_devj = $query->fetch();
extract($latest_devj);
$devj_title = "Developer Journal: $user_username";
$devj_content = ParseBBCode($devj_content);
$devj_content = str_replace("\n", "<br />", $devj_content);
?>
<div class="cf billboard padded">
<div class="page-margined cf">
<div class="g3">
<h2>Want to help out?</h2>
<p>Fortress Forever is <a class="highlight" href="https://github.com/fortressforever">open source</a> and developed by volunteers within the community. If you have the skill and desire to help move the project forward, you are more than welcome to contribute. We are always looking for more <span class="highlight">programmers</span>, <span class="highlight">modelers/animators</span>, <span class="highlight">texture artists</span>, <span class="highlight">level designers</span>, and more</p>
<a class="highlight more-info" href="<?=GetLink("contribute")?>">Learn how </a>
</div>
</div>
</div>
<div class="bottom cf z-depth-1">
<div class="page-margined">
<div class="g1-2 pull-left">
<h3>Developer Journals</h3>
<div class="article cf">
<h4><?=$devj_title?></h4>
<div class="author cf">
<span class="pull-right" title="<?=$devj_date?>"><img src="images/icon-calendar.png" /> Posted <?=ElapsedTime($devj_date)?></span> <span class="pull-left"><?=$ut_name?></span>
</div>
<div class="info">
<?=$devj_content?>
</div>
<a href="http://forums.fortress-forever.com/showthread.php?t=<?=$devj_threadid?>" class="pull-left">Discuss on the forums </a>
<a href="<?=GetLink("dev-journals")?>" class="pull-right">View all developer journals</a>
</div>
</div>
<div class="g1-2 pull-right" id="activity">
<h3>Activity</h3>
<ul class="activity-list">
<?php
PrintActivityList($activity_list);
?>
</ul>
<a href="<?=GetLink("activity")?>">See more </a>
</div>
</div>
</div>

70
pages/home.php Normal file
View file

@ -0,0 +1,70 @@
<?php
$query = $DB->query(
"SELECT * FROM `ff_activity` ORDER BY `act_date` DESC LIMIT 5"
);
$activity_list = $query->fetchAll();
$query = $DB->query(
"SELECT news_title, news_content, news_poster, news_time, news_parsebbcode, news_parsesmileys, news_discuss FROM ff_news WHERE news_hidepost = '0' ORDER BY news_time DESC LIMIT 0,1"
);
$latest_news = $query->fetch();
extract($latest_news);
$news_content = ParseBBCode($news_content);
$news_content = str_replace("\n", "<br />", $news_content);
?>
<div class="cf billboard center-text">
<div class="">
<div class="page-margined cf">
<div class="header-half pull-left">
<div class="abs-center">
<p><i>Fortress Forever</i> is a <span class="highlight">free</span> game inspired by the earlier versions of the <span class="highlight">Team Fortress</span> series (<i><a href="https://wiki.teamfortress.com/wiki/Team_Fortress_Classic">Team Fortress Classic</a></i> and <i><a href="https://wiki.teamfortress.com/wiki/Team_Fortress">QuakeWorld Team Fortress</a></i>).</p>
<p>Join the fray in this <span class="highlight">high-speed, team-based FPS</span> with classes that range from pure movement to pure firepower (and everything in between).</p>
<a href="<?=GetLink("about")?>" class="more-info highlight">More info </a>
<div class="class-lineup">
<h3 id="download-btn"><a class="z-depth-2" href="<?=GetLink("download")?>" id="download">Download</a></h3>
<span><small>Windows only, requires <a href="http://steampowered.com">Steam</a></small></span>
</div>
</div>
</div>
<div class="header-half pull-right">
<div class="abs-center">
<div class="embed-container z-depth-1"><iframe src="http://www.youtube.com/embed/-0-6wdDyGLI" frameborder="0" allowfullscreen></iframe></div>
</div>
</div>
</div>
</div>
</div>
<div class="bottom cf z-depth-1">
<div class="page-margined">
<div class="g2 pull-right">
<h3>News</h3>
<div class="article cf">
<h4><?=$news_title?></h4>
<div class="author cf">
<span class="pull-right" title="<?=$news_time?>"><img src="images/icon-calendar.png" /> Posted <?=ElapsedTime($news_time)?></span> <span class="pull-left">by <?=$news_poster?></span>
</div>
<div class="info">
<?=$news_content?>
</div>
<a href="http://forums.fortress-forever.com/showthread.php?t=<?=$news_discuss?>" class="pull-left">Discuss on the forums </a>
<a href="<?=GetLink("news")?>" class="pull-right">View all news posts</a>
</div>
</div>
<div class="g1 pull-left" id="activity">
<h3>Activity</h3>
<ul class="activity-list">
<?php
PrintActivityList($activity_list, false);
?>
</ul>
<a href="<?=GetLink("activity")?>">See more </a>
<div id="contribute">
<h3>Contribute</h3>
<a href="https://github.com/fortressforever" class="github-logo"><img src="images/github-64-black.png" /></a>
<p>Fortress Forever is <a class="highlight" href="https://github.com/fortressforever">open source</a> and developed by volunteers within the community. If you have the skill and desire to help move the project forward, you are more than welcome to contribute.</p><p>We are always looking for more <span class="highlight">programmers</span>, <span class="highlight">modelers/animators</span>, <span class="highlight">texture artists</span>, <span class="highlight">level designers</span>, and more</p>
<a href="<?=GetLink("contribute")?>">Learn how </a>
</div>
</div>
</div>
</div>

78
pages/news.php Normal file
View file

@ -0,0 +1,78 @@
<?php
$results_per_page = 5;
$current_page = 1;
if (is_numeric($parameters[0]))
{
$id = intval($parameters[0]);
}
else if ($parameters[0] === "page" && isset($parameters[1]) && is_numeric($parameters[1]))
{
$current_page = max( 1, intval($parameters[1]) );
}
$single_post = isset($id);
$where = $single_post ? " AND news_id=$id" : "";
$start = $single_post ? 0 : ($results_per_page * $current_page - $results_per_page);
$limit = $single_post ? 1 : $results_per_page;
if (!$single_post)
{
$query = $DB->query(
"SELECT COUNT(*) FROM ff_news WHERE news_hidepost = '0'$where"
);
$total_results = $query->fetch();
$total_results = $total_results[0];
}
?>
<div class="billboard padded cf">
<div class="page-margined">
<div class="g3">
<h2>News</h2>
</div>
</div>
</div>
<div class="bottom cf z-depth-1">
<div class="page-margined">
<div class="g3">
<?php
if ($single_post || $current_page * $results_per_page - $results_per_page <= $total_results)
{
$query = $DB->query(
"SELECT news_id, news_title, news_content, news_poster, news_time, news_parsebbcode, news_parsesmileys, news_discuss FROM ff_news WHERE news_hidepost = '0'$where ORDER BY news_time DESC LIMIT $start,$limit"
);
$all_news = $query->fetchAll();
foreach($all_news as $news)
{
extract($news);
$news_content = ParseBBCode($news_content);
$news_content = str_replace("\n", "<br />", $news_content);
?>
<div class="article cf z-depth-1 padded">
<h3><a href="<?=GetLink("news/$news_id")?>"><?=$news_title?></a></h3>
<div class="author cf">
<span class="pull-right" title="<?=$news_time?>"><img src="images/icon-calendar.png" /> Posted <?=ElapsedTime($news_time)?></span> <span class="pull-left">by <?=$news_poster?></span>
</div>
<div class="info">
<?=$news_content?>
</div>
<a href="http://forums.fortress-forever.com/showthread.php?t=<?=$news_discuss?>" class="pull-left">Discuss on the forums </a>
<? if ($single_post) { ?><a href="<?=GetLink("news")?>" class="pull-right">View all news posts</a><? } ?>
</div>
<?php
}
}
?>
<?php
if (!$single_post)
{
$paginator = new \sqkPaginator\Paginator($total_results, $results_per_page, $current_page);
$printer = new \sqkPaginator\PaginationPrinter(GetLink("news/page/___pagenum___"));
echo $printer->getHTML($paginator->getPages());
}
?>
</div>
</div>
</div>