Skip to content

Commit 8093aa1

Browse files
committed
Merge branch 'master' into prod
* master: Adding the new teaser home page. Move 2011 conference pages into a 2011/ directory. Remove legacy code to include $page. Include the port number, if it's not 80. Ignoring a logs/ directory. try to make sizes consistent
2 parents 7ac6ae3 + 688fc07 commit 8093aa1

File tree

13 files changed

+181
-153
lines changed

13 files changed

+181
-153
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.DS_Store
22
.*.swp
33
cache/*
4+
logs/

.htaccess

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Redirect temp /about /2011/about
2+
Redirect temp /location /2011/location
3+
Redirect temp /schedule /2011/schedule
4+
Redirect temp /speakers /2011/speakers
5+
Redirect temp /sponsorships /2011/sponsorships
6+
Redirect temp /subscribe /2011/subscribe
7+
18
<IfModule mod_rewrite.c>
29
RewriteEngine On
310
#RewriteBase /~ramsey/phpcon-web/

index.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@
44
ini_set('display_errors', 0);
55

66
$uri = $_SERVER['REQUEST_URI'];
7-
//echo "uri is: ".$uri."<br>";
87
$base = dirname($_SERVER['SCRIPT_NAME']);
9-
//echo "base is: ".$base."<br>";
108
$path = substr($uri, strlen($base));
11-
//echo "path is: ".$path."<br>";
12-
$parsedUrl = parse_url(basename($path));
13-
//echo "parsedUrl is: ";
14-
//var_dump ($parsedUrl);
15-
//echo "<br>";
9+
$parsedUrl = parse_url($path);
1610
$requestedPage = $parsedUrl['path'];
17-
//echo "requestedPage is: ".$requestedPage."<br>";
1811

1912
if (strtolower(substr($requestedPage, -5)) == '.html') {
2013
header('Location: ' . $base . (substr($base, -1) == '/' ? '' : '/') . substr($requestedPage, 0, -5), true, 302);
@@ -27,11 +20,16 @@
2720
if (!$requestedPage) {
2821
$requestedPage = 'home';
2922
}
30-
if (!ctype_alnum($requestedPage)) {
23+
if (preg_match('/^(\d{4})\/?$/', $requestedPage, $matches)) {
24+
$requestedPage = $matches[1] . '/home';
25+
}
26+
if (!preg_match('/[A-Za-z0-9\/]/', $requestedPage)) {
3127
$requestedPage = '404';
3228
}
3329

34-
$baseHref = '//' . $_SERVER['SERVER_NAME'] . $base . (substr($base, -1) == '/' ? '' : '/');
30+
$serverName = $_SERVER['SERVER_NAME'];
31+
$serverName .= ($_SERVER['SERVER_PORT'] != 80) ? ':' . $_SERVER['SERVER_PORT'] : '';
32+
$baseHref = '//' . $serverName . $base . (substr($base, -1) == '/' ? '' : '/');
3533

3634
if (!(include 'resources/' . $requestedPage . '.html')) {
3735
header('HTTP/1.0 404 Not Found');

resources/about.html renamed to resources/2011/about.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ <h1>PHP Community
99
<span>Conference</span></h1>
1010
<div id="nav">
1111
<ul>
12-
<li><a href="home">Home</a></li>
13-
<li><a href="schedule">Schedule</a></li>
14-
<li><a href="location">Location</a></li>
12+
<li><a href="2011/home">Home</a></li>
13+
<li><a href="2011/schedule">Schedule</a></li>
14+
<li><a href="2011/location">Location</a></li>
1515
<li>About</li>
1616
</ul>
1717
</div>

resources/2011/home.html

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?php
2+
$title = "";
3+
ob_start();
4+
?>
5+
<div id="container" class="home">
6+
<div class="header">
7+
<div id="social">
8+
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.phpcon.org%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;colorscheme=light&amp;height=21" style="border:none; overflow:hidden; width:80px; height:21px;" id="fbLike"></iframe>
9+
<p class="twitter">Follow Us: <a href="http://twitter.com/phpcomcon">PHPCOMCON</a></p>
10+
</div>
11+
<h1>PHP Community
12+
<span>Conference</span></h1>
13+
<h2>April 21 <span>&amp;</span> 22</h2>
14+
<h3>Nashville,<span>&nbsp;</span>TN</h3>
15+
<div id="nav">
16+
<ul>
17+
<li>Home</li>
18+
<li><a href="2011/schedule">Schedule</a></li>
19+
<li><a href="2011/location">Location</a></li>
20+
<li><a href="2011/about">About</a></li>
21+
</ul>
22+
</div>
23+
</div>
24+
<div class="aside">
25+
<p>A conference for people who care about PHP and what they make with it.</p>
26+
</div>
27+
<div class="section" id="main">
28+
<h4>The PHP Community Conference is Sold Out!</h4>
29+
<p>Thanks to our phenomenal sponsors, speakers, and attendees,
30+
and everyone else that has had kind things to say about our
31+
efforts, we have sold out the first PHP Community
32+
Conference!</p>
33+
</div>
34+
35+
<div class="sectionWide">
36+
<h1>The Conference</h1>
37+
<p>Inspired by conferences like Webstock and Brooklyn Beta, we want to make a friendly conference for us. Together with our friends and peers, we aim to inspire you to make great things with PHP.</p>
38+
39+
<p>The PHP Community Conference is a two-day event. We kick
40+
things off with a tutorial day that will introduce you to tools
41+
and ideas that you can use in your code right away. The second
42+
day will consist of presentations that will inspire you to
43+
create something new with PHP. With the help of our sponsors, we
44+
are able to offer admission to the entire event for $300. We'll
45+
provide lunch and snacks on both days. On Friday night, we'll
46+
finish off the conference with a party featuring pecha kucha
47+
talks by our awesome attendees. The best pecha kucha talks
48+
will have a chance at winning one of two iPad 2s sponsored by
49+
CakeDC!</p>
50+
</div>
51+
52+
<div id="sponsors" class="sectionWide">
53+
<h1>Our Sponsors</h1>
54+
<h2>Platinum Sponsors</h2>
55+
<div>
56+
<a href="http://cakedc.com"><img src="images/sponsor-cakedcplat2.png" alt="CakeDC"/></a>
57+
</div>
58+
<h2>Gold Sponsors</h2>
59+
<div>
60+
<a href="http://www.facebook.com/opensource/"><img src="images/sponsor-facebook.png" alt="Facebook"/></a>
61+
<a href="http://microsoft.com/web/webmatrix/"><img src="images/sponsor-webmatrix.png" alt="Microsoft Web Matrix"/></a>
62+
<a href="http://www.redventures.com/"><img src="images/sponsor-redventures.jpg" alt="Red Ventures"/></a>
63+
<a href="http://tropo.com/"><img src="images/sponsor-tropo.jpg" alt="Tropo"/></a>
64+
<a href="http://iostudio.com/"><img
65+
src="images/sponsor-iostudio.jpg" alt="ioStudio"/></a>
66+
</div>
67+
<h2>Silver Sponsors</h2>
68+
<div>
69+
<a href="http://servergrove.com/"><img src="images/servergrove.png" alt="ServerGrove"/></a>
70+
<a href="http://vaco.com/"><img src="images/vaco.png" alt="Vaco"/></a>
71+
<a href="http://moontoast.com/"><img
72+
src="images/sponsor-moontoast.jpg"/></a>
73+
</div>
74+
<h2>Community Sponsors</h2>
75+
<div>
76+
<?php
77+
// require the Twitter access class
78+
require_once('lib/Twitter.php');
79+
80+
// array of community_sponsors member Twitter handles
81+
$community_sponsors = array('croscon', 'cakephp', 'wonderproxy',
82+
'lisamusing','thezippykid',
83+
'companyfiftytwo','binarypress','zend','urvew','emmaemail');
84+
85+
// array of Twitter data for each community_sponsors member
86+
$data['community_sponsors'] = array();
87+
foreach ($community_sponsors as $username) {
88+
$data['community_sponsors'][] = Twitter::profile($username);
89+
}
90+
91+
foreach ($data['community_sponsors'] as $key => $person) {
92+
// create temp array of first names for sorting with later
93+
$cnames[$key] = strtolower($person['name']);
94+
$data['community_sponsors'][$key]['description'] = htmlentities($person['description'], ENT_QUOTES, 'UTF-8');
95+
}
96+
97+
// Sort people by first name using temporary arrays of first names.
98+
array_multisort($cnames, $data['community_sponsors']);
99+
foreach ($data['community_sponsors'] as $person) {
100+
?>
101+
<div class="communitySponsor">
102+
<a href="<?php echo $person['url'];?>">
103+
<img src="<?php echo $person['profile_image_url'];?>">
104+
<?php echo $person['name'];?>
105+
</a>
106+
</div>
107+
<?php
108+
}
109+
?>
110+
</div>
111+
<h2>Media Sponsors</h2>
112+
<div>
113+
<a href="http://phpdeveloper.org"><img src="http://phpdeveloper.org/Test/public/img/ads/phpdeveloper-media.jpg" width="150" style="border: 0;" /></a>
114+
</div>
115+
</div>
116+
</div>
117+
<?php
118+
$body = ob_get_clean();

resources/location.html renamed to resources/2011/location.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ <h1>PHP Community
88
<span>Conference</span></h1>
99
<div id="nav">
1010
<ul>
11-
<li><a href="home">Home</a></li>
12-
<li><a href="schedule">Schedule</a></li>
11+
<li><a href="2011/home">Home</a></li>
12+
<li><a href="2011/schedule">Schedule</a></li>
1313
<li>Location</li>
14-
<li><a href="about">About</a></li>
14+
<li><a href="2011/about">About</a></li>
1515
</ul>
1616
</div>
1717
<div id="social">

resources/schedule.html renamed to resources/2011/schedule.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ <h1>PHP Community
88
<span>Conference</span></h1>
99
<div id="nav">
1010
<ul>
11-
<li><a href="home">Home</a></li>
11+
<li><a href="2011/home">Home</a></li>
1212
<li>Schedule</li>
13-
<li><a href="location">Location</a></li>
14-
<li><a href="about">About</a></li>
13+
<li><a href="2011/location">Location</a></li>
14+
<li><a href="2011/about">About</a></li>
1515
</ul>
1616
</div>
1717
<div id="social">
@@ -51,11 +51,11 @@ <h1>PHP Community
5151
<td class="hour">10</td>
5252
<td class="minute">00</td>
5353
<td rowspan="12"><a
54-
href="speakers/#mitchell">Lorna Mitchell
54+
href="2011/speakers#mitchell">Lorna Mitchell
5555
- Web Services</a></td>
56-
<td rowspan="12"><a href="speakers/#ophinney">Matthew Weier O'Phinney - Mastering
56+
<td rowspan="12"><a href="2011/speakers#ophinney">Matthew Weier O'Phinney - Mastering
5757
Zend Framework 2 Patterns</a></td>
58-
<td colspan="2" rowspan="4"><a href="speakers/#lerdorf">Rasmus Lerdorf - Opening
58+
<td colspan="2" rowspan="4"><a href="2011/speakers#lerdorf">Rasmus Lerdorf - Opening
5959
Keynote</a></td>
6060
</tr>
6161
<tr>
@@ -82,9 +82,9 @@ <h1>PHP Community
8282
<tr>
8383
<td class="hour">11</td>
8484
<td class="minute">30</td>
85-
<td width="25%" rowspan="3"><a href="speakers/#moon">Brian Moon -
85+
<td width="25%" rowspan="3"><a href="2011/speakers#moon">Brian Moon -
8686
Phorum</a></td>
87-
<td width="25%" rowspan="3"><a href="speakers/#mclellan">Drew Mclellan - The Original Hypertext
87+
<td width="25%" rowspan="3"><a href="2011/speakers#mclellan">Drew Mclellan - The Original Hypertext
8888
Preprocessor</a></td>
8989
</tr>
9090
<tr>
@@ -116,9 +116,9 @@ <h1>PHP Community
116116
<tr>
117117
<td class="hour">13</td>
118118
<td class="minute">15</td>
119-
<td rowspan="3"><a href="speakers/#finkler">Ed Finkler
119+
<td rowspan="3"><a href="2011/speakers#finkler">Ed Finkler
120120
- The Story of Spaz</a></td>
121-
<td rowspan="3"><a href="speakers/#reinheimer">Paul Reinheimer - XHProf &amp;
121+
<td rowspan="3"><a href="2011/speakers#reinheimer">Paul Reinheimer - XHProf &amp;
122122
Wonderproxy</a></td>
123123
</tr>
124124
<tr>
@@ -132,9 +132,9 @@ <h1>PHP Community
132132
<tr>
133133
<td class="hour">14</td>
134134
<td class="minute">00</td>
135-
<td rowspan="12"><a href="speakers/#securityoverride">Helgi Þorbjörnsson - Frontend Caching:
135+
<td rowspan="12"><a href="2011/speakers#securityoverride">Helgi Þorbjörnsson - Frontend Caching:
136136
The New Frontier</a></td>
137-
<td rowspan="12"><a href="speakers/#perras">Jöel Perras
137+
<td rowspan="12"><a href="2011/speakers#perras">Jöel Perras
138138
- Lithium</a></td>
139139
<td rowspan="2" colspan="2" class="break">Break</td>
140140
</tr>
@@ -145,9 +145,9 @@ <h1>PHP Community
145145
<tr>
146146
<td class="hour">14</td>
147147
<td class="minute">30</td>
148-
<td rowspan="3"><a href="speakers/#denker">Laura Beth Lincoln Denker - Is It
148+
<td rowspan="3"><a href="2011/speakers#denker">Laura Beth Lincoln Denker - Is It
149149
Handmade Code If You Use Power Tools?</a></td>
150-
<td rowspan="3"><a href="speakers/#coates">Sean Coates - Gimme Bar</a></td>
150+
<td rowspan="3"><a href="2011/speakers#coates">Sean Coates - Gimme Bar</a></td>
151151
</tr>
152152
<tr>
153153
<td class="hour">14</td>
@@ -169,10 +169,10 @@ <h1>PHP Community
169169
<tr>
170170
<td class="hour">15</td>
171171
<td class="minute">45</td>
172-
<td rowspan="3"><a href="speakers/#zmievski">Andrei Zmievski - The Good, The Bad
172+
<td rowspan="3"><a href="2011/speakers#zmievski">Andrei Zmievski - The Good, The Bad
173173
&amp; The Ugly: What Happened to Unicode in PHP
174174
6</a></td>
175-
<td rowspan="3"><a href="speakers/#esser">Marcel Esser - From Earth to Jupiter
175+
<td rowspan="3"><a href="2011/speakers#esser">Marcel Esser - From Earth to Jupiter
176176
With NASA</a></td>
177177
</tr>
178178
<tr>
@@ -197,7 +197,7 @@ <h1>PHP Community
197197
<td class="minute">00</td>
198198
<td rowspan="12" colspan="2"></td>
199199
<td rowspan="4" colspan="2"><a
200-
href="speakers/#chay">Terry Chay - Closing
200+
href="2011/speakers#chay">Terry Chay - Closing
201201
Keynote</a></td>
202202
</tr>
203203
<tr>

resources/speakers.html renamed to resources/2011/speakers.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ <h1>PHP Community
88
<span>Conference</span></h1>
99
<div id="nav">
1010
<ul>
11-
<li><a href="home">Home</a></li>
12-
<li><a href="schedule">Schedule</li>
13-
<li><a href="location">Location</a></li>
14-
<li><a href="about">About</a></li>
11+
<li><a href="2011/home">Home</a></li>
12+
<li><a href="2011/schedule">Schedule</li>
13+
<li><a href="2011/location">Location</a></li>
14+
<li><a href="2011/about">About</a></li>
1515
</ul>
1616
</div>
1717
<div id="social">

resources/sponsorships.html renamed to resources/2011/sponsorships.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ <h1>PHP Community
99
<span>Conference</span></h1>
1010
<div id="nav">
1111
<ul>
12-
<li><a href="home">Home</a></li>
13-
<li><a href="schedule">Schedule</a></li>
14-
<li><a href="location">Location</a></li>
15-
<li><a href="about">About</a></li>
12+
<li><a href="2011/home">Home</a></li>
13+
<li><a href="2011/schedule">Schedule</a></li>
14+
<li><a href="2011/location">Location</a></li>
15+
<li><a href="2011/about">About</a></li>
1616
</ul>
1717
</div>
1818
<div id="social">

resources/subscribe.html renamed to resources/2011/subscribe.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ <h1>PHP Community
99
<span>Conference</span></h1>
1010
<div id="nav">
1111
<ul>
12-
<li><a href="home">Home</a></li>
13-
<li><a href="schedule">Schedule</a></li>
14-
<li><a href="location">Location</a></li>
15-
<li><a href="about">About</a></li>
12+
<li><a href="2011/home">Home</a></li>
13+
<li><a href="2011/schedule">Schedule</a></li>
14+
<li><a href="2011/location">Location</a></li>
15+
<li><a href="2011/about">About</a></li>
1616
</ul>
1717
</div>
1818
<div id="social">

0 commit comments

Comments
 (0)