Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Donald Trump can now decide the outcome of a battle #131

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ In order to get started you will want to do the following:
1. Set up your own [github.com account](https://github.com/join) if you don't already have one.
2. Set up a local development environment like [Kalabox](https://github.com/kalamuna/kalaboxv1) or [Kalastack](https://github.com/kalamuna/kalastack).
3. [Create a fork of this](https://github.com/kalamuna/playbox/fork) project.
4. [Import](https://github.com/kalamuna/kalastack/wiki/How-to-import-a-preexisting-Drupal-site-into-kalastack.) this fork into your local dev environment and set up its [files](http://files.kalamuna.com/playbox_dev_2015-03-29T01-44-54_UTC_files.tar.gz) and [database](http://files.kalamuna.com/playbox_dev_2015-03-29T01-44-54_UTC_database.sql.gz).
4. [Import](https://github.com/kalamuna/kalastack/wiki/Usage-Importing-a-preexisting-Drupal-Site) this fork into your local dev environment and set up its [files](http://files.kalamuna.com/playbox_dev_2015-03-29T01-44-54_UTC_files.tar.gz) and [database](http://files.kalamuna.com/playbox_dev_2015-03-29T01-44-54_UTC_database.sql.gz).
5. Set up your git repo for github flow. See [below](#Contributing).
6. Create a branch for the issue you are working on.
7. Commit code and push it up!
Expand Down
8 changes: 8 additions & 0 deletions sites/all/modules/playbox_core/playbox_core.module
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ function playbox_core_field_formatter_view($entity_type, $entity, $field, $insta
}
return $element;
}

/**
* Enables the Trump It! module.
*/
function playbox_core_update_7200() {
// Enable the Trump It! module.
module_enable(array('playbox_trumpit'));
} // playbox_core_update_7200
25 changes: 25 additions & 0 deletions sites/all/modules/playbox_trumpit/ListPhrases.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
- http://www.usmagazine.com/celebrity-news/news/donald-trumps-craziest-quotes-the-2016-presidential-hopeful-speaks-201568

“I’m the worst thing that’s ever happened to ISIS.”
“Donald J. Trump is calling for a total and complete shutdown of Muslims entering the United States.”
“Did you read about Starbucks? No more 'Merry Christmas' at Starbucks. No more. Maybe we should boycott Starbucks."
“Sorry, there is no STAR on the stage tonight!”
“Look at that face! Would anyone vote for that? Can you imagine that, the face of our next president?"
“We have to have a wall. We have to have a border. And in that wall we’re going to have a big fat door where people can come into the country, but they have to come in legally.”
“I’m owned by the people! I mean, I’m telling you, I’m no angel, but I’m gonna do right by them!”
“I think apologizing’s a great thing, but you have to be wrong. I will absolutely apologize, sometime in the hopefully distant future, if I’m ever wrong.”
“When these people walk in the room, they don’t say, ‘Oh, hello! How’s the weather? It’s so beautiful outside. Isn’t it lovely? How are the Yankees doing? Oh they’re doing wonderful. Great.’ [Asians] say, ‘We want deal!’”
“You haven’t been called, go back to Univision.”
“Heidi Klum. Sadly, she's no longer a 10."
“You could see there was blood coming out of her eyes. Blood coming out of her… wherever.”
“He’s not a war hero. He’s a war hero because he was captured. I like people who weren’t captured.”
“No more massive injections. Tiny children are not horses—one vaccine at a time, over time.”
“When Mexico sends its people, they’re not sending the best. They’re sending people that have lots of problems and they’re bringing those problems. They’re bringing drugs, they’re bringing crime. They’re rapists and some, I assume, are good people, but I speak to border guards and they’re telling us what we’re getting.”
“NBC News just called it ‘The Great Freeze’ — coldest weather in years. Is our country still spending money on the GLOBAL WARMING HOAX?”
“I have a great relationship with the blacks. I’ve always had a great relationship with the blacks.”
“Do you know that Hillary Clinton was a birther? She wanted those records and fought like hell. People forgot. Did you know John McCain was a birther? Wanted those records? They couldn’t get the records. Hillary failed. John McCain failed. Trump was able to get him to give something — I don’t know what the hell it was — but it doesn’t matter.”
“Rosie O’Donnell’s disgusting both inside and out. You take a look at her, she’s a slob. She talks like a truck driver, she doesn’t have her facts, she’ll say anything that comes to her mind. Her show failed when it was a talk show, the ratings went very, very, very low and very bad, and she got essentially thrown off television. I mean she’s basically a disaster.”
“It’s like in golf. A lot of people — I don’t want this to sound trivial — but a lot of people are switching to these really long putters, very unattractive. It’s weird. You see these great players with these really long putters, because they can’t sink three-footers anymore. And, I hate it. I am a traditionalist. I have so many fabulous friends who happen to be gay, but I am a traditionalist.”
“I’ve said if Ivanka weren’t my daughter, perhaps I’d be dating her.”
“All of the women on The Apprentice flirted with me — consciously or unconsciously. That’s to be expected.”
“The line of ‘Make America great again,’ the phrase, that was mine, I came up with it about a year ago, and I kept using it, and everybody’s using it, they are all loving it. I don’t know I guess I should copyright it, maybe I have copyrighted it.”
17 changes: 17 additions & 0 deletions sites/all/modules/playbox_trumpit/playbox_trumpit.admin.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* @file
* Admin Settings form for Trump It!
*/
function playbox_trumpit_admin_settings() {
$form['playbox_trumpit_phrases'] = array(
'#type' => 'textarea',
'#title' => t('A list of wonderful quotes from D.T.'),
'#description' => t('This is the list of quotes of wonder and beauty from D.T. that will be used as a signature for each - randomly - decided battle.<br />Originally copied from "<strong><a target="_blank" href="http://www.usmagazine.com/celebrity-news/news/donald-trumps-craziest-quotes-the-2016-presidential-hopeful-speaks-201568">http://www.usmagazine.com/celebrity-news/news/donald-trumps-craziest-quotes-the-2016-presidential-hopeful-speaks-201568</a></strong>".'),
'#default_value' => variable_get('playbox_trumpit_phrases', ''),
'#required' => TRUE,
'#rows' => 30,
);

return system_settings_form($form);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
/**
* @file
* playbox_trumpit.features.field_base.inc
*/

/**
* Implements hook_field_default_field_bases().
*/
function playbox_trumpit_field_default_field_bases() {
$field_bases = array();

// Exported field_base: 'field_playbox_trumped'
$field_bases['field_playbox_trumped'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_playbox_trumped',
'foreign keys' => array(
'format' => array(
'columns' => array(
'format' => 'format',
),
'table' => 'filter_format',
),
),
'indexes' => array(
'format' => array(
0 => 'format',
),
),
'locked' => 0,
'module' => 'text',
'settings' => array(),
'translatable' => 0,
'type' => 'text_long',
);

return $field_bases;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php
/**
* @file
* playbox_trumpit.features.field_instance.inc
*/

/**
* Implements hook_field_default_field_instances().
*/
function playbox_trumpit_field_default_field_instances() {
$field_instances = array();

// Exported field_instance: 'node-playbox_battle-field_playbox_trumped'
$field_instances['node-playbox_battle-field_playbox_trumped'] = array(
'bundle' => 'playbox_battle',
'default_value' => NULL,
'deleted' => 0,
'description' => 'This is the quote that explains why the winner won and the loser lost.',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 9,
),
'featured' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_playbox_trumped',
'label' => 'Trumped',
'required' => 0,
'settings' => array(
'linkit' => array(
'button_text' => 'Search',
'enable' => 0,
'profile' => '',
),
'text_processing' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'rows' => 5,
),
'type' => 'text_textarea',
'weight' => 11,
),
);

// Translatables
// Included for use with string extractors like potx.
t('This is the quote that explains why the winner won and the loser lost.');
t('Trumped');

return $field_instances;
}
14 changes: 14 additions & 0 deletions sites/all/modules/playbox_trumpit/playbox_trumpit.features.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* @file
* playbox_trumpit.features.inc
*/

/**
* Implements hook_ctools_plugin_api().
*/
function playbox_trumpit_ctools_plugin_api($module = NULL, $api = NULL) {
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}
18 changes: 18 additions & 0 deletions sites/all/modules/playbox_trumpit/playbox_trumpit.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name = Playbox TrumpIt
description = Provides a "Trump It!" button on Battle node forms.
core = 7.x
package = Playbox
version = 7.x-1.0
project = playbox_trumpit
dependencies[] = ctools
dependencies[] = features
dependencies[] = strongarm
dependencies[] = text
configure = admin/config/playbox/trump-it
datestamp = 1340830936
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:2
features[field_base][] = field_playbox_trumped
features[field_instance][] = node-playbox_battle-field_playbox_trumped
features[variable][] = playbox_trumpit_phrases
mtime = 1462354569
Loading