Related Content
Drupal 10: Adding Extra User Account Protection
One of Drupal's strengths is its ability to create communities of users who contribute towards the content of the site. Whether you have an open forum, where users can create their own accounts, or a closed magazine with just a few editors your need to take the security of your users seriously.
Recreating Spotify Wrapped In PHP
I quite like the end of the year report from Spotify that they call "Wrapped". This is a little application in which they tell you what your favorite artist was and what sort of genres you listened to the most during the year.
Should A Constructor Throw An Exception?
Let's say you had a class that you wanted to use, but there was some sort of error in creating the object. This might be that the wrong parameters were passed, or the third party service (eg. a database) wasn't available at the time of creation.
Drupal 10: Opening An Ajax Dialog On Page Load
Drupal has a quick and convenient way of creating ajax dialogs that gives users the ability to embed links in content that open up dialog boxes when clicked. This is a useful way of presenting a bit of content to a user without them navigating away from the page.
Drupal 10: Creating Custom Paths With Path Processors
Routes in Drupal can be altered as they are created, or even changed on the fly as the page request is being processed.
PHP Question: Variable Reference
Question
What does the following code print out?
function arrayPrint($array)
{
echo implode(' ', $array);
}
$arrayA = [1, 2, 3];
$arrayB = $arrayA;
$arrayB[1] = 0;
arrayPrint($arrayA);
Comments
You could possibly do it via a hook_form_alter on the form and include the drupal_add_js() call in a form #after_build callback.
See http://api.drupal.org/api/drupal/developer--topics--forms_api_reference…
Submitted by budda on Thu, 11/03/2011 - 23:40
PermalinkAdd new comment