Insert view: embed a view into a node

The Insert view module allows you to embed the result of a particular view into a node by means of a tag.

Station: Radio station schedule, programs, playlists and webstream archive

Station is a group of modules designed to run a radio station's website. It was originally designed for KPSU, a college radio station in Portland, Oregon.

The component modules of station are:

  • station.module - the core of the station module. Required by all the other modules.
  • station_program.module - provides a content type for program nodes.
  • station_schedule.module - allows a weekly schedule of programs and a block that displays the currently playing program, and adds a list of DJs to program nodes. Requires the views module.
  • station_catalog.module - track albums in a radio station's library.
  • station_playlist.module - provides a program playlist node type..
  • station_archive.module - provides a script to rip hour long mp3s and then imports the files as audio nodes. Requires the audio module, views module, and StreamRipper executable.

Station Schedule Module

The station schedule module provides:

  • A weekly schedule of timeslots for a radio station. Slots can be 1 hour, 30 minutes, or 15 minutes.

Creating a module configuration (settings) page

Main topic described: Module settings
Drupal hook used: hook_menu

Now that we have a working module, we'd like to make it better. If we have a site that has been around for a while, content from a week ago might not be as interesting as content from a year ago. Similarly, if we have a busy site, we might not want to display all the links to content created last week. So, let's create a configuration page for the administrator to adjust this information.

System Information: information about the Drupal installation and system environment

The System Information module displays information about the current state of the Drupal installation and system environment.

Add 'Print-friendly' support for a calendar

Required
Print Module > http://drupal.org/project/print
Event Module > http://drupal.org/project/event

The excellent Print Friendly Pages module
http://drupal.org/project/print
does an excellent job on producing nicely formatted output suitable for printing.

However, as the 'Month-view' calendar produced by the events module
http://drupal.org/project/event
isn't actually a node, no 'printer friendly version' link appears.

Here's how to achieve this:

First thing, create a page using this code

<?php

print event_page($year = NULL, $month = NULL, $day = NULL, $view = NULL, $types = NULL, $tids = NULL, $duration = NULL)

?>

Make sure to use PHP as the input type.

This should output the calendar within a node, with the requisite 'printer friendly version' link appearing at the bottom.

Advanced Usage

Create a new menu item, that links directly to the 'print-friendly version'. EG http://example.com/node/123/print.
Create a new menu, and place this menu item as the sole item within in.
Go to 'administer > blocks'.
Enable the block for the new menu.
Configure the 'block visibilty', and set it only to appear on the Event page.

Slightly More Advanced Usage
Place the block in the 'content' region [This does not exist in all themes!]

FTP uploads and file permissions using Transmit

Transmit has the capability to change the permissions of a file as it uploads it to your server. Make sure the check-box "Auto-set my permissions" is unchecked. Typically, Drupal (all versions) like to have most of their files at octal 755 or 775. If you accidentally have Transmit set to change things to 644 or something similar, your newly-uploaded Drupal site will not work.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 6.x