That can’t be his natural hair colour…
I do enjoy the part where they are jumping on a trampoline with oversized weapons though…
That can’t be his natural hair colour…
I do enjoy the part where they are jumping on a trampoline with oversized weapons though…
Turns out that you can make css arrows (and some other fun shapes) using borders and 0 width elemets (I used divs, but they can be whatever element really).
This is the html:
<div class="css-arrow-container"> <div class="css-arrow-right"> </div> <div class="css-arrow-left"> </div> <div class="css-arrow-up"> </div> <div class="css-arrow-down"> </div> </div>
and the css looks like this:
<style> .css-arrow-right, .css-arrow-left, .css-arrow-up, .css-arrow-down { border-color: white white white red; border-style: solid; border-width: 20px; height: 0; width: 0; } .css-arrow-left{ border-color: white green white white; } .css-arrow-up{ border-color: white white blue white; } .css-arrow-down{ border-color: yellow white white white; } </style>
You can also get fancy and do stuff like this:
By setting 4 different colours and playing with the border style (this one is dotted, which for some reason makes a weird swirl pattern):
<style> .css-dotted-box{ border-color: yellow blue pink green; border-style: dotted; } </style>
I don’t know why drupal doesn’t have this built in… but this will allow you to have users login with their email address or their username. People can usually remember their email address better than the username that they used on some random site. Doubly so if their username was not their usual one because someone keeps taking their normal one (I’m not bitter…).
This is the code as of version 1:
<?php /** * 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 */ function email_login_form_alter(&$form, $form_state, $form_id) { switch ($form_id) { //there are two normal login forms case 'user_login': case 'user_login_block': // Ensure a valid validate array. $form['#validate'] = is_array($form['#validate']) ? $form['#validate'] : array(); // your validation function must run first. array_unshift($form['#validate'],'email_login_user_login_validate'); break; //ignore other stuff default: return; break; } } /** * Capture the username entered, if there is an @ symbol, it will check it against email addresses instead of the username * if multiple_email is installed, check against that table instead * @param array $form The current form (I guess...) * @param array $form_state The state of the form (I guess...) */ function email_login_user_login_validate($form, &$form_state) { if (isset($form_state['values']['name']) && strpos($form_state['values']['name'], '@') !== false) { if(module_exists('multiple_email')){ $name = db_result(db_query("SELECT users.name FROM {users} JOIN multiple_email ON multiple_email.uid = users.uid WHERE (LOWER(multiple_email.email) = LOWER('%s') AND multiple_email.confirmed = TRUE) OR LOWER(users.mail) = LOWER('%s')", $form_state['values']['name'], $form_state['values']['name'])); } else { $name = db_result(db_query("SELECT name FROM {users} WHERE LOWER(mail) = LOWER('%s')", $form_state['values']['name'])); } if ($name) { form_set_value($form['name'], $name, $form_state); } } }
I have made a slight change to the code from that of login toboggan, I added the check to see if it at least looked like an email address (has an @ symbol in it) before doing the extra database call. It probably doesn’t make too much of a difference in the grand scheme of things though. Another thing that it does is when Multiple E-mail Addresses is active, it checks against the multiple email addresses table and matches it up to the user account.
Get the module here: Drupal Email Login.
Turns out that there are a lot of them… Here are some, with samples.
Lorem Ipsum – For the traditionalists. http://lipsum.com
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis suscipit consectetur lorem. Vestibulum scelerisque risus velit. Fusce sed gravida orci. Proin sed sagittis augue. Praesent posuere semper justo at placerat. Nam at metus eu odio hendrerit molestie ornare at ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Baconipsum – For enjoyers of fine meats. http://baconipsum.com/
Bacon ipsum dolor sit amet turkey cow pork chop chuck short ribs, rump bresaola. Pancetta salami hamburger short loin. Swine pastrami hamburger short ribs, pork loin ham hock rump andouille turkey bacon brisket pork chop ribeye. Tri-tip short ribs ribeye bacon, pork belly boudin jerky andouille shank short loin.
Veganipsum – For those of you with vegan powers. http://veganipsum.com/
Phaseolus coccineus stachys affinis! Vigna umbellata malva verticillata – solanum tuberosum. Abelmoschus esculentus canna spp moringa oleifera? Hypochaeris radicata rumex acetosa vigna unguiculata subsp unguiculata. Lens culinaris pachyrhizus erosus; cucurbita pepo – phaseolus acutifolius celosia argentea.
HTMLipsum – Various html elements with dummy text in them. http://html-ipsum.com/
<ul> <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</li> <li>Aliquam tincidunt mauris eu risus.</li> <li>Vestibulum auctor dapibus neque.</li> </ul>
T’Lipsum – A lot of what I can only assume are vulgarities. http://tlipsum.appspot.com/
Aye ipsum cack-handed sit ey up consectetur adipiscing Michael Palin gi’ o’er ultrices nay lad ne’ermind t’foot o’ our stairs amet ornare wacken thi sen up pulvinar dapibus. bobbar that’s champion ah’ll learn thi odio, accumsan volutpat that’s champion Fusce suscipit appens as maybe id mi face like a slapped arse how much?
Fuck Lorem Ipsum – I don’t think he likes lorem ipsum. http://fucklorem.com/
They arrived in fifty mother ships, offering their friendship and advance technology to Earth. Skeptical of the visitors, Mike Donovan and Juliet Parrish infiltrated their ranks and soon discovered some startling secrets. The resistance is all that stands between us… and the visitors.
malevole text generator – developed based on years of careful research. http://www.malevole.com/mv/misc/text/
Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye. He’s got style, a groovy style, and a car that just won’t stop. When the going gets tough, he’s really rough, with a Hong Kong Phooey chop (Hi-Ya!). Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye. Hong Kong Phooey, he’s fan-riffic!