Automatic web listing
You don’t need to display your podcasts on your web pages; you can provide a link to your RSS feed and your visitors will be able to view your podcasts in their favorite podcast reader. But if you want to provide an automatic list on any web page, you can.
The easiest way to display your podcasts on your web page is to include podcast.phpi and use the “podcast” function.
<? include_once('/web/includes/podcasts.phpi'); podcast(); ?>
It will automatically detect the account that owns the current page and display podcasts from that page.
By default the podcast function will show the four most recent items. You can specify different numbers of items as an option to the function:
<? podcast(10) ?>
Advanced use
Sometimes you need more control over which podcasts are displayed. For example, you might want to display some faculty members’ podcasts on a page that isn’t managed by those faculty. For this, you can create a podcast feed “object” and then specify the account you want to display:
<? include_once('/web/includes/podcasts.phpi'); $podcast = new podcast('faculty1'); $podcast->showList(3); $podcast->account('faculty2'); $podcast->showList(); ?>
You must specify how many items you want the first time you call showList, but afterwards it will remember your choice.
If you want to use the default podcasts style sheet, use $podcast->HEAD() in the <head> area of your document.
If you need it, “showList” returns the number of items displayed. You might use this to display a special message if no items were displayed, for example.
You can list the feeds associated with the podcast using $podcast->showFeeds().
Channels
If you need a specific channel, specify it using the channel() method.
$podcast->channel('BIO301');
Styles
You can provide your own custom style sheet in addition to or in replacement of the default style sheet. The podcasts are displayed as a “dl” list of class “podcasts”. The title of the podcast is in the “dt” tag and the rest is in the “dd” tag. The information (size, duration, date published) is in a “span” of class “info”.
Example
- Carnival of HTML
- Create basic web pages with straight HTML code and a pre-existing style sheet.
August 18, 2009, 5.8 MB (download) - JavaScript for Beginners
- JavaScript allows you to create dynamic, interactive web pages: web pages that do things in response to what your readers do, without having a separate page for each possible response.
August 18, 2009, 5.4 MB (download) - Castaway: podcast lectures
- Faculty can use this application to capture lectures in rooms which have streaming microphones such as the instreamer.
November 21, 2008, 653.4 KB (download)
