This file contains hidden or 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
| <form action="" method="post"> | |
| <input type="file" name="file" id="file-input" /> | |
| <input type="submit" value="Submit" id="submit-button" /> | |
| </form> |
This file contains hidden or 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
| $('document').ready(function(){ | |
| // Create a button element, because buttons can be styled however you like. | |
| // Better to do this via JS than server side because we don't want it to show | |
| // up for users with JS disabled, since it wouldn't work at all. | |
| $('#upload-form').prepend('<button id="file-button">Upload a file</button>'); | |
| // Add a click handler to the newly created button element. | |
| $('#file-button').click(function(){ | |
| // Whenever the button is clicked, register a click on the file input, which | |
| // will open the file browser thingy. | |
| $('#file-input').trigger('click'); |
This file contains hidden or 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
| <form action="" method="post" id="upload-form"> | |
| <input type="file" name="file" id="file-input" /> | |
| <input type="submit" value="Submit" id="submit-button" /> | |
| </form> |
This file contains hidden or 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 (user_is_logged_in() && !user_access('registered TGR user')) { | |
| return FALSE; | |
| } | |
| return TRUE; |
This file contains hidden or 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 (receipt_promo_value.length >= 12 && receipt_promo_value.length <= 18 ){ | |
| window.location = base_url + "/greenops/submit_code/receipt/" + receipt_promo_value; | |
| } else { | |
| // Redirect to the parameterized code handler pate | |
| window.location = base_url + "/greenops/submit_code/promo/" + receipt_promo_value; | |
| } |
This file contains hidden or 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 | |
| if (arg(0) == "user" && is_numeric(arg(1)) && arg(2) == "edit") { | |
| // We are on the user's edit page, so include the css to hide the fields: | |
| // Also check to see if this is an admin user | |
| if (!array_key_exists(7, $user->roles)) { | |
| // This is not an admin user, so hide the fields | |
| drupal_add_css(drupal_get_path("module", "greenopolis_user_control_panel") . "/css/hide_edit_form_options.css"); | |
| // Also output some jQuery to change the HTML text of the password labels: |
This file contains hidden or 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
| switch ($delta){ | |
| case 0: | |
| // Add the CSS stylesheet here, so it can get aggregated with other mods css | |
| drupal_add_css(drupal_get_path('module', 'greenopolis_front_page_2010Feb') .'/css/receipt_and_kiosk_block.css'); | |
| drupal_add_js(drupal_get_path('module', 'greenopolis_front_page_2010Feb') .'/js/receipt_and_kiosk_block.js'); | |
| // This include file sets the $block_content variable | |
| include('blocks/receipt_and_kiosk_block.inc'); | |
| break; | |
| case 1: |
This file contains hidden or 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 greenopolis_tgr_invite($op, $args) { | |
| if ($op == 'invite' && arg(0) == 'tgr') { | |
| return; | |
| } elseif ($op == 'escalate' && arg(0) == 'tgr') { | |
| $params = array( | |
| 'uid' => $args['inviter']->uid, | |
| 'points' => 50, | |
| 'operation' => 'TGR Refer Friend', | |
| 'description' => 'Friend Joined!', | |
| 'tid' => 103, |
This file contains hidden or 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
| // give points to recipient | |
| $params = array( | |
| 'uid' => $to->uid, | |
| 'points' => $points, | |
| 'event' => 'From: '. $user->name, | |
| 'description' => 'Points Donation', | |
| 'display' => FALSE, | |
| 'tid' => $tid, | |
| ); | |
| userpoints_userpointsapi($params); |
This file contains hidden or 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
| have_header: checking for ruby.h... -------------------- no | |
| "gcc -E -I. -I/usr/lib/ruby/1.8/i386-linux -I. -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -fno-strict-aliasing -fPIC conftest.c -o conftest.i" | |
| checked program was: | |
| /* begin */ | |
| 1: #include <ruby.h> | |
| /* end */ | |
| -------------------- |