This is just a little script I wrote up to test out whether or not tabs in facebook could ask for permission. I also wanted to try printing out a graph for users who authorized the application.
The drupal_get_path() function will look up a string (second argument) in Drupal's system table and find a path in the same row.
The login form can easily be found on a drupal installation by appending ?q=user to the end of the drupal installations root url.
The global variable $base_url can be used to retrieve the base url within a drupal installation.
The current theme can be retrieved using the path_to_theme() function. It will return everything after the base url to the current theme.
This is a small template that can be used when creating a brand new CSS file.
Hooks, also called callbacks, can be described as internal Drupal events. Hooks essentially allow Drupal modules to hook into the rest of the Drupal installation.
External stylesheets can be declared between the head tags in an HTML file. The Following snippet shows how to easily call one.
The setTimeout() method executes a function or an expression after a number of milliseconds have passed.
Removing an element using Javascript can easily be done by calling the function getElementById() followed by the function parentNode.removeChild().
Shortcuts are one of the many new features found in Drupal 7. They allow admins, or members with permission to create their own sets of links that can be accessed by other users using a shortcut bar.
A snippet demonstrating how to use PHP iterators in order to pull a list of files from a directory.
This example will create a DOMDocument-Object and load the XML from note.xml into it. It will then use the saveXML() function to put the XML document into a string and output it.
The DOM parser allows for the processing of XML documents in PHP. To work with XML documents, an XML parser is required. The DOM XML parser functions are built into the PHP core.
jQuery is a cross-browser JavaScript library. It simplifies client-side scripting of HTML. Its syntax makes it easier to navigate a document and select DOM elements, handle events, and create Ajax applications.
Ajax stands for Asynchronous JavaScript and XML. It is a collection of methods to create asynchronous web applications. The DOM is accessed with JavaScript. HTML and CSS are used to markup style information. XML is used for the interchange of data.
The DOM is a representation of objects in HTML, XHTML, and XML. It is cross-platform and language-independent. It allows for interaction with those objects.
The trigger module is not the only way to call actions. Separate modules can be written to call actions and prepare parameters. This is typically done using a function called actions_do().
When an action is created, the information that is set in the configuration form is serialized and saved into the parameters field of the actions table. Immediately before the advanced action is executed, the contents of the parameters field are unserialized and included in the $context parameter.
Actions can be called in different contexts. When an action supports multiple triggers, it determines which context it's being used in through the $context variable.