FletchCon 2010 on RolePlayGateway.

"">

The effects of my "vacation" to FletchCon 2010 on RolePlayGateway.

annotatedfletchconchart.png

The effects of my "vacation" to FletchCon 2010 on RolePlayGateway.

http://www.ericmartindale.com/2010/06/11/ccp-is-inspired-by-iceland/


CCP explains why they are inspired by Iceland, which is where their headquarters is located.

Display Foursquare Badges in Chyrp without using Javascript

If you notice, I currently display my Foursquare badges over in the right hand side. I'm not sure about how long I'll display them specifically, so here's a screenshot:

I recently received an email inquiring about how I accomplished this. Well, since I use Chyrp, here's how I did it:

  1. In includes/controller/Main.php, add the following, somewhere around line 715 (immediately after $this->context["sql_queries"] =& SQL::current()->queries;):
    // BEGIN Foursquare Badges
    $cURL = curl_init();
    curl_setopt($cURL, CURLOPT_URL, "http://api.foursquare.com/v1/user.json?badges=1");

    curl_setopt($cURL, CURLOPT_HEADER, 0);
    curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($cURL, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    curl_setopt($cURL, CURLOPT_USERPWD, "your@email.com:your_password_here");

    $strPage = curl_exec($cURL);
    curl_close($cURL);

    $foursquare = json_decode($strPage);

    $badges = $foursquare->user->badges;

    foreach ($badges as $badge) {
    $this->context['foursquare_badges'] .= '<img src="'.$badge->icon.'" title="'.$badge->description.'" />';
    }
    // END Foursquare Badges

  2. In themes/your_theme_name/content/sidebar.twig, wherever you want to display your foursquare tags, simply add:
    <div>
    <h1>Foursquare Badges</h1>
    $foursquare_badges
    </div></code>

    You can display this wherever you like, in any part of your Chyrp template.

Be aware that this requires PHP's CURL module. I encourage you to enable Chyrp's caching module as well, so every page load does not incur a single API request (I have a feeling that they probably won't appreciate it). The benefit of this is that your Foursquare badges will now be output by your server, so they are both indexable by search engines and degrade very gracefully when the client doesn't have Javascript enabled (NoScript users, particularly).

Enjoy!

http://www.ericmartindale.com/2010/06/10/video.1000/


In the following video, the founder of 4chan, a controversial, uncensored online imageboard, describes its subculture, some of the Internet “memes” it has launched, and the incident in which its users managed a very public, precision hack of a mainstream media website. The talk raises questions about the power — and price — of anonymity.

Wishlist Item: RSS Feed Icon Pillow

RSS Feed Icon Pillow

A pillow that is a physical representation of the ubiquitous RSS Feed Icon. Do want!

Buy or view this item

0 Comments · Tags:

The Decline of Human Civilization

what.jpg

The Decline of Human Civilization

Sublime – Caress Me Down

http://www.last.fm/music/Sublime

0 Comments · Tags:
← Previous Next → Page 3 of 35