|
Punkupdates DB Feeds
In here you'll find information on how to use the Punkupdates db feeds.
For your convenience, we've made this process as simple as inserting a simple Javascript line in your page.
Can't get any simpler than that, right?
Read on for instructions...
| Punkupdates Release Calendar |
The Punkupdates.com Release Calendar is the simplest way to intergrate our content in your site. By inserting a simple javascript line, you can
easily have the full list of punk music releases for the past week, or a period of time you specify!
And to make it even better, it's layout is customizable via the use of style sheets. What more could you ask for?
Here's how to use it:
First of all, you'll need to set the stylesheets. These are used to specify font sizes and colors. In order to keep our stylesheets from having
any conflict with your stylesheets, we use classes that have the prefix 'PU'. These classes are used for each element in the releases list, giving you
full control on the looks of the calendar. Here's a sample:
<style>
.PUheader { background-color:#FFFFFF }
.PUtitle { font:bold 15px Tahoma; color:black }
.PUnormal { font:bold 12px Tahoma; color:black }
.PUevenrow { font:11px Tahoma; background-color:#ffffff; color:black }
.PUoddrow { font:11px Tahoma; background-color:#eeeeee; color:black }
.PUband { font:11px Tahoma; color:#000000; }
.PUband a:link { font:bold 11px Tahoma; color:#800000; text-decoration:none }
.PUband a:visited { font:bold 11px Tahoma; color:#800000 }
.PUlabel { font:11px Tahoma; color:#008000; }
.PUlabel a:link { font:bold 11px Tahoma; color:#008000; text-decoration:none }
.PUlabel a:visited { font:bold 11px Tahoma; color:#008000 }
.PUalbum { font:11px Tahoma; color:#323232; }
.PUdate { font:11px Tahoma; color:#19a0ff; }
</style>
What do all these mean? Here's an explanatory list:
.PUheader is a class that's used to set the table header's background color
.PUtitle is used to set the header's font properties
.PUnormal is used to set the font properties for all text that doesn't fall into one of the specified "categories" and doesn't have a stylesheet of its own.
.PUevenrow is used to set the font properties for even rows of the list
.PUoddrow is used to set the font properties for odd rows of the list
.PUband is used to set the font properties for bands
.PUlabel is used to set the font properties for labels
.PUalbum is used to set the font properties for release titles
.PUdate is used to set the font properties for dates in the list
If you want even and odd lines to look the same, just use the same stylesheet for both. The a:link and a:visited selectors are used to set more options
for colouring of links. You don't have to use them if you don't want to.
By changing this simple stylesheet, you can easily have the Punkupdates calendar match your site's layout.
Having covered this, the only thing left for you to do is include the javasript that displays the list. There are two ways for you to utilize the script:
<script src="http://www.punkupdates.com/dbfeeds/releases.js.php"></script>
The easiest way of all - this script will display the releases of the last 7 days.
If you want more control, you may include starting and ending dates for the list. In order to do this you'll need to pass two parameters to the script.
These parameters are from and to. The from parameter is
mandatory - if you omit this one, the script will revert to the default "last 7 days" mode. On the other hand, the to
parameter is not. But if you choose to omit this one, be careful as the script will display everything from your from
date onwards and may result in a huge listing. Also note that all dates are inclusive.
All dates must have the YYYY-MM-DD format. For example, March 1st, 2002 should be entered as: 2002-03-01.
Here's some samples:
<script src="http://www.punkupdates.com/dbfeeds/releases.js.php?from=2002-02-01&to=2002-02-28"></script>
This script will retrieve all releases for February 2002.
<script src="http://www.punkupdates.com/dbfeeds/releases.js.php?from=2002-02-01"></script>
This script will retrieve all releases from February 2002 till the latest one.
<script src="http://www.punkupdates.com/dbfeeds/releases.js.php?from=2002-03-01&to=2002-03-01"></script>
This script will retrieve all releases for March 1st, 2002.
Whichever use you choose, the script just needs to be inserted in your page at the exact point you want the list to appear.
That's all... Have fun using this :)
Punkupdates Releases Calendar sample showing the past 7 days with the stylesheet shown above:
|
|
|
|