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
<?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> |
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
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) { |
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
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; |
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
<?php | |
namespace FourSquareModule\Controller; | |
use FourSquareModule\Controller\Shared as SharedController; | |
class Index extends SharedController | |
{ | |
public function indexAction() | |
{ |
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
<?php | |
namespace FourSquareModule\Classes; | |
class ApiHandler | |
{ | |
protected $secret; | |
protected $key; | |
protected $cache; |
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
<?php | |
namespace UserModule\Entity; | |
class UserMeta | |
{ | |
protected $_id = null; | |
protected $_user_id = null; | |
protected $_user_key = null; |
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
<?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', |
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
$.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); | |
} |
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
public function getRecentCommentsAction() | |
{ | |
$recentCommentsHelper = new \BlogModule\Classes\RecentComments($this->getService('blog.cache')); | |
$recentComments = $recentCommentsHelper->getComments(); | |
return json_encode(array('comments' => $recentComments)); | |
} |
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
<?php | |
namespace BlogModule\Classes; | |
class RecentComments { | |
public $cache = NULL; | |
public function __construct($cache) | |
{ |