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 | |
| //"stolen" and modified from code in login toboggan | |
| /** | |
| * Capture the form stubmit and check the form_id if it matches a login form, then | |
| * it will check it as an email using an extra validation step | |
| * @param array $form The current form (I guess...) | |
| * @param array $form_state The state of the current form (I guess...) | |
| * @param string $form_id The unique identifier for this form | |
| * @see hook_form_alter |
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
| --- node.module 2011-08-09 10:36:01.000000000 -0300 | |
| +++ node.module 2011-08-09 12:25:13.000000000 -0300 | |
| @@ -803,9 +803,10 @@ | |
| // are dealing with an anonymous user we set the user ID to 0. | |
| form_set_error('name', t('The username %name does not exist.', array('%name' => $node->name))); | |
| } | |
| - | |
| + $strtotime = strtotime($node->date); | |
| // Validate the "authored on" field. As of PHP 5.1.0, strtotime returns FALSE instead of -1 upon failure. | |
| - if (!empty($node->date) && strtotime($node->date) <= 0) { |
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 | |
| /** | |
| * get cron job descriptions out of your custom modules from elysia_cron | |
| * @param string $op | |
| */ | |
| function something_cronapi($op){ | |
| switch($op){ | |
| case "list": | |
| return array('something_cron'=>'This is my cron function'); | |
| break; |
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
| //select everything based on the target href | |
| //if js is turned off, focus on the correct input | |
| $('a.select-all').click(function(e){ | |
| e.preventDefault(); | |
| var target_input = $(this).attr('href'); | |
| $(target_input).select(); | |
| }); |
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
| <!-- for the love of god... stop doing this! --> | |
| <!-- the alternating order pattern is aesthetically pleasing though... --> | |
| <img src="/images/spacer.gif" width="575" height="3" /><br /> | |
| <img src="/images/bn_btm.gif" height="3" width="575" /><br /> | |
| <img src="/images/bn_btm.gif" height="3" width="575" /><br /> | |
| <img src="/images/spacer.gif" width="575" height="3" /><br /> |
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 | |
| /** | |
| * Starting with an answer, generate a math question to get the result | |
| * @param int $answer Your desired answer | |
| * @return string The equation to arrive at that answer | |
| */ | |
| function generate_simple_math($answer){ | |
| $operations = 2; | |
| $min_number = 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
| <?php | |
| class Fibonacci_Sequence implements Iterator { | |
| private $start; | |
| public function __construct($start=0){ | |
| $this->start = $start; | |
| } | |
| public function current() { | |
| return round( | |
| (pow(((1 + sqrt(5)) / 2), $this->key) - pow((-1 / (1 + sqrt(5)) / 2), $this->key)) / sqrt(5) |
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 | |
| /** | |
| * @property int $id An identifier | |
| * @property string $name A name | |
| */ | |
| class parent_class{ | |
| protected $_data = array(); | |
| /** | |
| * magic function __get |
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
| //-- Action Script 2 version: | |
| //this is the click tag action | |
| //that should be attached to your button | |
| on (release){ | |
| getURL (_root.clickTAG, "_blank"); | |
| } | |
| //-- Action Script 3 version: |
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
| @font-face{ | |
| font-family:'CodenameCoderFree4FBold'; | |
| src:url('/fonts/codenamecoderfree4f-bold-webfont.eot'); | |
| src:url('/fonts/codenamecoderfree4f-bold-webfont.eot?iefix') format('eot'), | |
| url('/fonts/codenamecoderfree4f-bold-webfont.woff') format('woff'), | |
| url('/fonts/codenamecoderfree4f-bold-webfont.ttf') format('truetype'), | |
| url('/fonts/codenamecoderfree4f-bold-webfont.svg#webfont9UM32sTt') format('svg'); | |
| font-weight:normal; | |
| font-style:normal; | |
| } |