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 | |
class byoc_seat { | |
public $number; | |
public $name; | |
public $clan; | |
function __construct($number, $name, $clan) { | |
$html_classes = array( | |
'byoc', |
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
name = My Module | |
description = "My module is pretty darn awesome." | |
package = Awesome Modules | |
core = 7.x | |
stylesheets[all][] = my_module.css | |
files[] = MyPackage/ClassName.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 | |
function MYMODULE_example_form($form, &$form_state) { | |
$form = array(); | |
$form['name'] = array( | |
'#type' => 'textfield', | |
'#title' => t("Your Name"), | |
); | |
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 | |
// This is your page function, where your content is rendered. | |
// $id is a 'page argument' (see Drupal hook_menu documentation) | |
function MYMODULE_page_function($id) { | |
$output = ''; | |
// MYMODULE_get_values represents a function for a query that | |
// retrieves values from the database and accepts $id as an | |
// argument to be used as a query condition. |
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 | |
function inputgroup_example_form($form,&$form_state) { | |
$form = array(); | |
$form['i'] = array( | |
'#type' => 'textfield', | |
'#attributes' => array( | |
'placeholder' => 'input-groups in drupal!', | |
), |
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
import irclib | |
import random | |
class quote: | |
def on_pubmsg(self, nick, connection, event): | |
message = event.arguments()[0] | |
source = event.source().split('!')[0] | |
# Retrieve stored quote | |
if message.startswith(".quote"): | |
words = message.split() |
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
import irclib | |
import random | |
import datetime | |
class blazeit: | |
def on_pubmsg(self, nick, connection, event): | |
message = event.arguments()[0] | |
source = event.source().split('!')[0] | |
# Retrieve stored quote |
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
import irclib | |
import random | |
import datetime | |
class blazeit: | |
def on_pubmsg(self, nick, connection, event): | |
message = event.arguments()[0] | |
source = event.source().split('!')[0] | |
# Retrieve stored quote |
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
if number == 420 and source == "g2wolf": | |
response = "Oh look g2wolf has rolled yet another illegitimate 420." | |
elif number == 420: | |
response = u"{0} \u00034ROLLED A \u00038DANK 420 \u00033#SMOK".format(source) | |
elif number != 0: | |
response = source + " rolled " + str(number) |
OlderNewer