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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

AJAX <strong>and</strong> <strong>Drupal</strong> Web Services<br />

<br />

<br />

http://localhost:8888/drupal/node/5#<strong>com</strong>ments<br />

<br />

Sun, 10 Aug 2008 22:10:48 +0000<br />

mbutcher<br />

<br />

5 at http://localhost:8888/drupal<br />

<br />

<br />

<br />

<br />

An RSS file is <strong>com</strong>posed of a main container (the tags), which<br />

contains a channel (). A channel contains one or more items<br />

().<br />

A channel describes the contents of the feed. Typically, it will include a title, a<br />

description, some language information, <strong>and</strong> a link back to the website that this feed<br />

describes. You can see in the channel definition how , <br />

, , <strong>and</strong> are used<br />

to convey this information.<br />

There are pointers inside of a channel to individual pieces of content from<br />

the website. These are stored in items. An item typically includes a title, link,<br />

description, publication date, <strong>and</strong> a GUID (globally unique identifier).<br />

There are many other possible fields that can go inside of an item. Also, there<br />

are entries for the content creator (), <strong>and</strong> a link to<br />

<strong>com</strong>ment about the item (). More sophisticated feeds<br />

may have enclosures, links to audio files (a podcast), <strong>and</strong> video (a vodcast or video<br />

podcast), or other legal XML content.<br />

When it <strong>com</strong>es down to it, that's all there is to an RSS feed. It's just a container with<br />

a channel that contains a list of items; <strong>and</strong> it's all XML.<br />

The project goals<br />

In this project, we are going to make use of that RSS feed to add a web clips region<br />

to our pages. We will allocate a small portion of the page layout to display a r<strong>and</strong>om<br />

item from our XML feed. This is similar to what Google does in Gmail. By showing a<br />

r<strong>and</strong>om item from our RSS feed on every page, we might entice site visitors to spend<br />

more time clicking around on the site.<br />

[ 206 ]<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!