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
{% 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> |
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
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') |
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
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 | |
} |
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
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' |
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
<? | |
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; |
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 getPageAccessToken($pageId) | |
{ | |
$this->getFacebook(); | |
$accessToken = $this->facebook->api('/'. $pageId .'?fields=access_token'); | |
return $accessToken; | |
} |
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 getFacebookPages() | |
{ | |
$this->getFacebook(); | |
$fbPage = Array(); | |
$pages = $this->facebook->api('/me/accounts'); | |
foreach($pages['data'] as $page){ | |
if($page['category'] != 'Application'){ |
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 | |
/** | |
* @Route("/test", name="uploads3") | |
* @Template() | |
*/ | |
public function testAction(){ | |
$document = new FBPost(); | |
$form = $this->createFormBuilder($document) |