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
function mymodule_node_access($node, $op, $account) { | |
$controlled_nids = array( | |
1, | |
2 | |
); | |
if (isset($node->nid) && in_array($node->nid, $controlled_nids)) { | |
$acceptable_users = array( | |
'2', | |
); |
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
h1 { | |
font-size: 2em; | |
font-weight: normal; | |
&.yell { | |
text-decoration: uppercase; | |
font-weight: bold; | |
} | |
} |
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 | |
/** | |
* @file | |
* Tweet block bean plugin. | |
*/ | |
/** | |
* Require the twitteroauth library | |
*/ | |
require_once(drupal_get_path('module','bean_tweets') . '/libraries/twitteroauth/twitteroauth.php'); |
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 | |
/** | |
* @file | |
* Tweet block bean plugin. | |
*/ | |
/** | |
* Require the twitteroauth library | |
*/ | |
require_once(drupal_get_path('module','bean_tweets') . '/libraries/twitteroauth/twitteroauth.php'); |
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 | |
/** | |
* Implements hook_menu(). | |
*/ | |
function bean_tweets_menu() { | |
$items = array(); | |
$items['admin/config/system/bean_tweets'] = array( | |
'title' => t('Bean Tweets OAuth'), | |
'description' => t('Configure OAuth for Bean Tweets module'), | |
'page callback' => 'drupal_get_form', |
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 | |
/** | |
* Implements hook_uninstall(). | |
*/ | |
function bean_tweets_uninstall() { | |
variable_del('twitter_consumer_key'); | |
variable_del('twitter_consumer_secret'); | |
variable_del('twitter_access_token'); | |
variable_del('twitter_token_secret'); |
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 | |
/** | |
* @file | |
* Bean admin page for setting up oAuth | |
*/ | |
/** | |
* Admin form. | |
*/ | |
function bean_tweets_admin($form, &$form_state) { |
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
$conf['twitter_consumer_key'] = [consumer_key_here]; | |
$conf['twitter_consumer_secret'] = [consumer_secret_here]; | |
$conf['twitter_access_token'] = [access_token_here]; | |
$conf['twitter_token_secret'] = [token_secret_here]; |
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 | |
/** | |
* @file | |
* Tweet block bean plugin. | |
*/ | |
/** | |
* Require the twitteroauth library | |
*/ | |
require_once(drupal_get_path('module','bean_tweets') . '/libraries/twitteroauth/twitteroauth.php'); |