Skip to content

Instantly share code, notes, and snippets.

View alfrekjv's full-sized avatar

Alfredo Juárez alfrekjv

View GitHub Profile
<?php $view->extend('::base.html.php'); ?>
<?php $view['slots']->start('include_css') ?>
<link rel="stylesheet" href="<?php echo $view['assets']->getUrl('foursquare/css/index.css') ?>"/>
<?php $view['slots']->stop(); ?>
<section class='pp-foursquare-tutorial'>
<h1>Learning how to use the Modules Component on the PPI framework.</h1>
<div class="map" id="map"></div>
@alfrekjv
alfrekjv / Index.js
Last active December 10, 2015 18:08
var map = null,
latitude = null,
longitude = null,
infoWindow = null;
$(document).ready(function ($) {
//check if the geolocation object is supported, if so get position
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
var map = null,
latitude = null,
longitude = null,
infoWindow = null;
$(document).ready(function ($) {
//check if the geolocation object is supported, if so get position
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
latitude = position.coords.latitude;
<?php
namespace FourSquareModule\Controller;
use FourSquareModule\Controller\Shared as SharedController;
class Index extends SharedController
{
public function indexAction()
{
<?php
namespace FourSquareModule\Classes;
class ApiHandler
{
protected $secret;
protected $key;
protected $cache;
@alfrekjv
alfrekjv / gist:3976604
Created October 29, 2012 21:18
UserMetaEntity
<?php
namespace UserModule\Entity;
class UserMeta
{
protected $_id = null;
protected $_user_id = null;
protected $_user_key = null;
@alfrekjv
alfrekjv / DownloadEntry.php
Created October 14, 2012 16:43
DownloadEntry
<?php
namespace Application\Storage;
use Application\Storage\Base as BaseStorage;
use Application\Entity\DownloadEntry as DownloadEntryEntity;
class DownloadEntry extends BaseStorage
{
protected $_meta = array(
'conn' => 'main',
$.get(ppi.baseUrl + 'blog/get_recent_comments', {}, function(response) {
var content;
if (response.comments.length == 0) {
content = '<li><p>No Recent Comments</p></li>';
} else {
content = Mustache.render($('#recent-comments-template').html(), response);
}
public function getRecentCommentsAction()
{
$recentCommentsHelper = new \BlogModule\Classes\RecentComments($this->getService('blog.cache'));
$recentComments = $recentCommentsHelper->getComments();
return json_encode(array('comments' => $recentComments));
}
@alfrekjv
alfrekjv / RecentComments.php
Created September 11, 2012 19:21
RecentComments Class
<?php
namespace BlogModule\Classes;
class RecentComments {
public $cache = NULL;
public function __construct($cache)
{