06.05.2013 Views

Drupal 6 JavaScript and jQuery - Ebook-Cours.com

Drupal 6 JavaScript and jQuery - Ebook-Cours.com

Drupal 6 JavaScript and jQuery - Ebook-Cours.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Drupal</strong> <strong>and</strong> <strong>JavaScript</strong><br />

The <strong>and</strong> tags are just you're regular old HTML tags. The part indicates that the enclosed information is PHP code that the server<br />

should execute. Inside that is the line print t("Good Day"), which simply uses the<br />

t() function to translate Good Day into whatever the user's language is. Then using<br />

the print directive, prints the results to the HTML. Assuming my preferred language<br />

is German, the previous code would generate something like this:<br />

Guten Tag<br />

That's the sort of PHP we'll be writing in this book.<br />

<strong>Drupal</strong>'s translation features, which are available in <strong>JavaScript</strong>, will be<br />

covered in Chapter 4.<br />

Towards the very end of the book, we will use a little more PHP to build a <strong>Drupal</strong><br />

module. This might be a little more dem<strong>and</strong>ing, but those are the chapters you can<br />

skim if you don't want to learn PHP. If you're interested in learning more about<br />

PHP development, there are several other great books available, including<br />

(shameless plug) my book Learning <strong>Drupal</strong> 6 Module Development Packt Publishing,<br />

978-1847194442.<br />

SQL<br />

SQL is an acronym for Structured Query Language. What do you query with SQL?<br />

A database! SQL is the industry st<strong>and</strong>ard for writing queries that relational database<br />

systems can then parse <strong>and</strong> execute. But while the language is st<strong>and</strong>ardized, there<br />

are multiple flavors of SQL. Each database program seems to use a slightly different<br />

version of SQL—supporting some subset of the st<strong>and</strong>ardized language while also<br />

adding on additional database-specific features.<br />

Historically, <strong>Drupal</strong> development has targeted the open source MySQL database<br />

(http://mysql.<strong>com</strong>) as the "official" database. Another popular open source<br />

database, PostgreSQL (http://postgresql.org), is also supported by recent<br />

<strong>Drupal</strong> releases (though not all add-on modules currently support it).<br />

While you will need to run a database in order to use <strong>Drupal</strong>, we won't be making<br />

much use of the SQL language in this book. <strong>Drupal</strong> provides built-in tools that we<br />

can use to get the content we need out of the database without having to write our<br />

own queries.<br />

[ 10 ]<br />

This material is copyright <strong>and</strong> is licensed for the sole use by Richard Ostheimer on 18th June 2009<br />

2205 hilda ave., , missoula, , 59801

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!