Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
2,389 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php get_header(); ?> | ||
|
||
<div id="main" role="main"> | ||
|
||
<details> | ||
<summary><h1>Not found</h1></summary> | ||
<p><span frown>:(</span></p> | ||
</details> | ||
|
||
</div> | ||
|
||
<?php get_sidebar(); ?> | ||
|
||
<?php get_footer(); ?> |
Submodule WPThumb
added at
57f8bf
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php ?> | ||
|
||
</div> <!--! end of .container --> | ||
|
||
<footer id="terminal-footer"> | ||
|
||
<div class="container"> | ||
|
||
<div class="row"> | ||
|
||
<div class="twelvecol"> | ||
|
||
<p> | ||
<span class="left">The <span class="white">WordPress Zurich Meetup</span> group is organized by <a href="http://www.noeltock.com">Noel Tock</a>, easiest reached via twitter <span style="position:relative !important; top:6px!important"><a href="https://twitter.com/noeltock" class="twitter-follow-button" data-show-count="false">Follow @noeltock</a></span></span> | ||
<span class="right">This site is proudly powered by <a rel="nofollow" href="http://wordpress.org/">WordPress</a></span> | ||
</p> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</footer> | ||
|
||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> | ||
|
||
<script type="text/javascript"> | ||
(function() { | ||
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; | ||
po.src = 'https://apis.google.com/js/plusone.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); | ||
})(); | ||
</script> | ||
|
||
<?php wp_footer(); ?> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
<?php | ||
|
||
/* | ||
* Functions Structure | ||
* | ||
* - Includes (WP-Less, TLC Transients, WP Thumb) - All GitHub Repo's | ||
* - Defines | ||
* - LESS Parsing | ||
* - Meetup Functions | ||
* --- People Output | ||
* --- People Backup (upon transient fail) | ||
* --- Recent Work Output | ||
* --- Recent Work Backup (upon transient fail) | ||
* | ||
*/ | ||
|
||
// Includes | ||
|
||
require_once( 'wp-less/wp-less.php' ); | ||
require_once( 'includes/tlc-transients.php' ); | ||
require_once( 'WPThumb/wpthumb.php' ); | ||
|
||
// Defines | ||
|
||
define( 'MEETUP_API', get_option('meetup_apikey')); | ||
define( 'MEETUP_GROUP', get_option('meetup_group')); | ||
define( 'MEETUP_LIMIT', get_option('meetup_limit', 100)); | ||
|
||
// LESS / CSS | ||
|
||
function meetup_less() { | ||
|
||
if ( ! is_admin() ) | ||
wp_enqueue_style( 'style', get_stylesheet_directory_uri() . '/less/meetup_styles.less' ); | ||
|
||
} | ||
|
||
add_action('wp_print_styles', 'meetup_less'); | ||
|
||
// MEETUP.COM - PEOPLE | ||
//-------------------------------- | ||
|
||
function meetup_people() { | ||
|
||
$api_response = wp_remote_get( 'http://api.meetup.com/members.json?key=' . MEETUP_API . '&sign=true&group_urlname=' . MEETUP_GROUP . '&page=' . MEETUP_LIMIT ); | ||
$mfile = wp_remote_retrieve_body( $api_response ); | ||
$meetup = json_decode(preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $mfile ), true); | ||
|
||
$people = array(); | ||
$peopleindex = array(); | ||
|
||
foreach ($meetup['results'] as $person) { | ||
|
||
// Thumb used for Recent Work | ||
$thumb50 = wpthumb( $person['photo_url'], 'width=50&height=50&crop=1&jpeg_quality=95', false ); | ||
|
||
// Thumb used for Header Background | ||
$thumb80 = wpthumb( $person['photo_url'], 'width=80&height=80&crop=1&jpeg_quality=95', false ); | ||
|
||
// Store for Display | ||
$people[] = array( | ||
'id' => $person['id'], | ||
'name' => $person['name'], | ||
'twitter' => $person['other_services']['twitter']['identifier'], | ||
'photo' => $thumb80, | ||
'link' => $person['link'] | ||
); | ||
|
||
// Store for cross-referencing against Recent Work (Member ID is used as key) | ||
$peopleindex[$id] = array( | ||
'name' => $person['name'], | ||
'twitter' => $person['other_services']['twitter']['identifier'], | ||
'photo' => $thumb50, | ||
'link' => $person['link'] | ||
); | ||
} | ||
|
||
// Store count that is displayed within tagline | ||
update_option('meetup_people_count', count($people)); | ||
|
||
// Store Member ID's as Keys | ||
update_option('meetup_people_index', $peopleindex); | ||
|
||
// Randomize the display of avatars to keep it interesting | ||
shuffle($people); | ||
|
||
// Output Display HTML | ||
|
||
$i = 0; | ||
|
||
foreach ($people as $person) { | ||
|
||
$thumb = $person['photo']; | ||
|
||
// If blank avatar, skip and do not count towards the total | ||
if ( $thumb ) { | ||
$output .= '<div class="home-thumb-person" style="background-image:url(' . $thumb . ')"></div>'; | ||
} else { | ||
$i -= 1; | ||
} | ||
|
||
if (++$i == 100) break; | ||
|
||
} | ||
|
||
$output .= $output; | ||
|
||
// Store in case of transient fail | ||
update_option( 'meetup_people_backup', $output); | ||
|
||
return $output; | ||
|
||
} | ||
|
||
function meetup_people_backup() { | ||
|
||
$pics = get_option('meetup_people_backup'); | ||
if ( $pics ) { echo $pics; } | ||
|
||
} | ||
|
||
// MEETUP.COM - RECENT WORK | ||
//-------------------------------- | ||
|
||
function get_site_title($url){ | ||
|
||
// Get <title>$title</title> from remote url | ||
$str = file_get_contents($url); | ||
if(strlen($str)>0){ | ||
preg_match("/\<title\>(.*)\<\/title\>/",$str,$title); | ||
return $title[1]; | ||
|
||
} | ||
} | ||
|
||
function meetup_recentwork() { | ||
|
||
$i = 0; | ||
|
||
$api_response = wp_remote_get( 'http://api.meetup.com/2/profiles.json?key=' . MEETUP_API . '&sign=true&group_urlname=' . MEETUP_GROUP . '&page=100' ); | ||
$mfile = wp_remote_retrieve_body( $api_response ); | ||
$meetup = json_decode(preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $mfile ), true); | ||
|
||
$recentwork = array(); | ||
|
||
foreach ($meetup['results'] as $person) { | ||
|
||
// Create array from profile question responses | ||
$recentwork[] = array( 'url' => $person['answers'][1]['answer'], 'img'=> $person['answers'][2]['answer'], 'id'=> $person['member_id']); | ||
|
||
} | ||
|
||
// Randomize recent work items to keep it fair & interesting | ||
shuffle($recentwork); | ||
|
||
$profile = get_option('meetup_people_index'); | ||
|
||
$output = '<div class="home-recent-wrap">'; | ||
|
||
foreach ($recentwork as $site) { | ||
|
||
$url = $site['url']; | ||
$img = $site['img']; | ||
|
||
// Skip if questions not answered | ||
if ( $url && $img ) { | ||
|
||
$thumb = wpthumb( $img, 'width=330&height=220&crop=1&jpeg_quality=95', false ); | ||
|
||
$profilepic = $profile[$site['id']]['photo']; | ||
$name = $profile[$site['id']]['name']; | ||
$link = $profile[$site['id']]['link']; | ||
$sitetitle = substr(get_site_title($url), 0, 30) . '...'; | ||
|
||
if ( $thumb ) { | ||
$output .= '<div class="home-thumb-recent" style="background-image:url(' . $thumb . ')"><div class="home-thumb-recent-desc"><a href="' . $link . '"><img src="' . $profilepic . '" /></a><div class="home-recent-title"><a href="' . $url . '" rel="nofollow" target="_blank">' . $sitetitle . '</a></div><div class="home-recent-author"><em>by </em><a href="' . $link . '">' . $name . '</a></div></div></div>'; | ||
} else { | ||
$i -= 1; | ||
} | ||
|
||
} | ||
|
||
if (++$i == 100) break; | ||
|
||
} | ||
|
||
$output .= '</div>'; | ||
|
||
// Store in case of transient fail | ||
update_option( 'meetup_recentwork_backup', $output); | ||
|
||
return $output; | ||
|
||
|
||
} | ||
|
||
function meetup_recentwork_backup() { | ||
|
||
$pics = get_option('meetup_recentwork_backup'); | ||
if ( $pics ) { echo $pics; } | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
// wp-meetup | ||
?> | ||
<!doctype html> | ||
<html lang="en" class="no-js"> | ||
<head> | ||
|
||
<title><?php wp_title(''); ?></title> | ||
|
||
<!-- meta --> | ||
|
||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | ||
|
||
<link rel="shortcut icon" href="/favicon.ico"> | ||
|
||
<!-- css --> | ||
|
||
<link rel="stylesheet" href="<?php echo get_bloginfo( 'template_directory' ); ?>/style.css"> | ||
|
||
<!-- js --> | ||
|
||
<script src="<?php echo get_bloginfo( 'template_directory' ); ?>/js/modernizr.js"></script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | ||
|
||
<!-- pingback --> | ||
|
||
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> | ||
|
||
<!-- wp head --> | ||
|
||
<?php wp_head(); ?> | ||
|
||
</head> | ||
|
||
<!--[if lt IE 7 ]> <body <?php body_class('ie6'); ?>> <![endif]--> | ||
<!--[if IE 7 ]> <body <?php body_class('ie7'); ?>> <![endif]--> | ||
<!--[if IE 8 ]> <body <?php body_class('ie8'); ?>> <![endif]--> | ||
<!--[if IE 9 ]> <body <?php body_class('ie9'); ?>> <![endif]--> | ||
<!--[if (gt IE 9)|!(IE)]><!--> <body <?php body_class('ie6'); ?>> <!--<![endif]--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.onecol { | ||
width: 4.7%; | ||
} | ||
|
||
.twocol { | ||
width: 13.2%; | ||
} | ||
|
||
.threecol { | ||
width: 22.05%; | ||
} | ||
|
||
.fourcol { | ||
width: 30.6%; | ||
} | ||
|
||
.fivecol { | ||
width: 39%; | ||
} | ||
|
||
.sixcol { | ||
width: 48%; | ||
} | ||
|
||
.sevencol { | ||
width: 56.75%; | ||
} | ||
|
||
.eightcol { | ||
width: 61.6%; | ||
} | ||
|
||
.ninecol { | ||
width: 74.05%; | ||
} | ||
|
||
.tencol { | ||
width: 82%; | ||
} | ||
|
||
.elevencol { | ||
width: 91.35%; | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Oops, something went wrong.