Skip to content

Instantly share code, notes, and snippets.

{% load i18n %}
<p>{% blocktrans with user=user.first_name|default:"User" %}Hello {{user}},{% endblocktrans %}</p>
<p>{% blocktrans with entrypoint_name=entrypoint.name %}Welcome to Discovery Social!</p>
<p>Interact with stars of the show, your friends and others, while watching Discovery on TV. You can join the conversation from your mobile, tablet or computer. No download required.</p>
<p>This message was sent to you by Discovery Social. <br/> For questions, please contact us [email protected]</p>
if fb_user:
user, is_new = User.objects.get_or_create(username=fb_user['uid'])
entrypoint_user, eu_created = EntrypointUser.objects.get_or_create(user=user,
entrypoint=request.entrypoint)
if is_new:
# Create User Profile
UserProfile.objects.get_or_create(user=user)
graph = facebook.GraphAPI(fb_user['access_token'])
me = graph.get_object('me')
def welcome_notifications(user, entrypoint):
# ===== Welcome email =====
subject = _('Welcome to %(entrypoint_name)s') % {'entrypoint_name': entrypoint.name}
from_email = settings.DEFAULT_FROM_EMAIL
to = user.email
context = {
'user': user,
'entrypoint': entrypoint
}
View = require './view'
Application = require '../application'
module.exports = class PromoPostView extends View
className: 'promo-wrapper'
template: require "./templates/#{socialshows.device}/promo_post"
events:
'click a.promo-post-review-button': 'review'
<?
if(unserialize(base64_decode($_COOKIE["geolocation"])) == "PR" || unserialize(base64_decode($_COOKIE["geolocation"])) == "US"){ ?>
<div id="minBox" style="position:absolute; width: 312px; height: 129px; top: 4px; left: -1px;">
<script language="javascript">
function validate() {
var mobile2, Carriers;
mobile2 = document.getElementById("mobile2").value;
Carriers = document.getElementById("Carriers").value;
public function getPageAccessToken($pageId)
{
$this->getFacebook();
$accessToken = $this->facebook->api('/'. $pageId .'?fields=access_token');
return $accessToken;
}
public function getFacebookPages()
{
$this->getFacebook();
$fbPage = Array();
$pages = $this->facebook->api('/me/accounts');
foreach($pages['data'] as $page){
if($page['category'] != 'Application'){
@mikehenriquezf
mikehenriquezf / DefaultController.php
Created August 17, 2012 19:25
File Upload Don't work
<?php
/**
* @Route("/test", name="uploads3")
* @Template()
*/
public function testAction(){
$document = new FBPost();
$form = $this->createFormBuilder($document)