Paintball Headlines Theme

I said I would post the theme for headlines when I thought it was acceptable. There are still problems, but whatever.

Anyways, this theme is based upon this tutorial theme, but changed to have multiple author support, support tags and categories, and be a double right column instead of a column on both sides. There are a few other little changes in there.

Github Repository

I’ll try to update the theme whenever I change anything; I just have to remember to do a svn ci each time.

To run by default and not get errors, you need do need a few plugins, like wp_dtree. There’s also a classifieds plugin that I wrote just for headlines that’s needed, but I don’t plan on releasing that, since it contains db info and it’s pretty much just a MySQL query. In sidebar.php, just comment out the get_classifieds_new(10); code.

Edit: Changed to Github, since DevjaVu went away.

Python Random Show Player

This is a pretty simple little script I coded a while back that will play an n amount of randomly picked shows from a collection of shows.

Like, “randomshow.py 5” will play 5 randomly picked episodes back to back. I usually use this to cue up some shows right before going to sleep. It’s better than flipping through channels trying to find something to watch.

By default, it uses a gui-less mplayer in full screen to play the videos. You can edit the playback command to use a different video player or use different settings.
Note: It expects the video player to exit after finishing playback. Mplayer does this by default (without the gui), but VLC, Xine, etc. don’t.

To use, edit the first part of the file with the location(s) of your video files and the commands if needed. Run python randomshow.py rescan to generate your collection file. Then run python randomshow.py to play a random show.

This was made and used on linux, but it should also be compatible on Windows, though you might need to edit the commands.

I’ll probably edit this to have better control over collections, a playlist option that’ll just generate a playlist so you can use VLC or other video players. If you have any suggestions, let me know.

I’m also making a movie version, that will also support browsing of the collection (probably just via a web interface), and support multiple CD versions and archives. It’ll be more like MythTV, but allowing less overhead.

Download randomshow.txt (rename to randomshow.py) or randomshow.tar

randomshow.py –help

Random Show 1.0 – James Wilson

randomshow.py [option] [count]

For 1 random show
randomshow.py

For n random shows
randomshow.py n

Rescan your collection
randomshow.py rescan

Use different collection and play 1 show. If collection doesn’t exist, it will use default. latenight.txt can be any collection text file.
randomshow.py latenight.txt

Use different collection and play n shows
randomshow.py latenight.txt n

Rescan different collection
randomshow.py rescan latenight.txt

Create new collection
randomshow.py create latenight.txt “/media/tv/”

Example rescan output:

From location(s)
[‘/media/My Book/downloads/tv/’, ‘/media/hdb1/Documents and Settings/User/My Documents/My Videos/tv/Futurama’, ‘/media/hdb1/Documents and Settings/User/My Documents/Fastlane’]
Clearing collection file
Added 113 King of the Ant Hill.avi
Added 110 Keeping Up With Our Joneses.avi
Added 104 Luanne’s Saga.avi
[…]
Added Fastlane – 120 – Asslane.avi
Added Fastlane – 121 – Dosed.avi
Added Fastlane – 122 – Iced.avi
Collection built – 696 files

Example collection file:

Random-Show-Collection-1.0;shows.txt;/media/My Book/downloads/tv/,/media/hdb1/Documents and Settings/User/My Documents/My Videos/tv/Futurama,/media/hdb1/Documents and Settings/User/My Documents/Fastlane
/media/My Book/downloads/tv/koth1/113 King of the Ant Hill.avi
/media/My Book/downloads/tv/koth1/110 Keeping Up With Our Joneses.avi
/media/My Book/downloads/tv/koth1/104 Luanne’s Saga.avi
[…]
/media/hdb1/Documents and Settings/User/My Documents/Fastlane/Season 1/Fastlane – 120 – Asslane.avi
/media/hdb1/Documents and Settings/User/My Documents/Fastlane/Season 1/Fastlane – 121 – Dosed.avi
/media/hdb1/Documents and Settings/User/My Documents/Fastlane/Season 1/Fastlane – 122 – Iced.avi

WordPress YouTube Sidebar Video Plugin

This is a plugin based on the YouTube widget. It’ll display a YouTube video, most likely in your sidebar, by calling the youtube function which you can specify the url, width, height, and if it’ll autoplay. It’s not much, at all, but meh.

Download youtube-plugin.zip (youtube-plugin.tar.gz)

This plugin is one function called youtube that will display a YouTube video. It’s pretty much the same as copying the embed code from YouTube, but will allow you to change the width and height much easier.

I’m not going to go too much into this, so here’s the whole calling it premise. You would place this in your template in php tags.

youtube(uri[,width,height[,autoplay]])

Display a video with default width and height (250×165)
youtube("http://www.youtube.com/watch?v=AYxu_MQSTTY")

Display a video with custom width and height (500×330)
youtube("http://www.youtube.com/watch?v=AYxu_MQSTTY",500,330)

Display a video with default width and height (” will cause it to default), but autoplay
youtube("http://www.youtube.com/watch?v=AYxu_MQSTTY","","",TRUE)

Display a video with custom width and height and autoplay
youtube("http://www.youtube.com/watch?v=AYxu_MQSTTY",500,330,TRUE)

Download youtube-plugin.zip (youtube-plugin.tar.gz)

WordPress Reddit Widget

Number 8 in Widget-A-Day is a reddit widget.

It’ll display your latest liked items on reddit.com. You can edit the display, count, and username.

Not much of widget (can be kinda done via the RSS widget), but it’ll be the closer in Widget-A-Day. I might have one on Saturday, but there’s no guarantee. It’s been fun. Hopefully someone has found these useful. I’ll do it again sometime. If you have any problems, suggestions, or whatever, let me know

Download reddit.zip

SVN Checkout
svn co http://svn.wp-plugins.org/reddit-widget/trunk

Default display:
reddit1cropped.png

Admin panel:
reddit2cropped.png

Requirements

Installation

  1. Download reddit.zip
  2. Extract and upload reddit.php to the plugins/ directory
  3. Enable reddit Widget in the Plugin admin panel
  4. In widget admin panel, place reddit in the sidebar, and edit it to enter your username

Features

  • Displays your latest liked items (on reddit.com)
  • Completely customizable display
  • Caching for large traffic sites

Formatting

There are 3 parts needed to format the output.

The first part, called items start in the admin panel, is the first part of the widget after the title. For the default formatting, this is just <ul>.

The second part, called items end, is the ending of the widget. By default, this is:
</ul>
<a href="%profile%" style="float:right;">%username%</a>


The third part is what is called for each item. By default, this is:
<li style="list-style-type: none;"><a href="%link%">%title%</a> (<a href="%more%">more</a>)</li>

The premise of calling each value is this:

  1. start
  2. item
  3. item
  4. item
  5. end

The formatting for items is:

  • %title% – Title of the item
  • %link% – Link to the item
  • %desc% – Description of the item – Just [link] [more] links
  • %date% – Date the item was submitted (ISO)
  • %more% – More link – The link to the comments
  • %number% – The number of the current item

The formatting for start and end is:

  • %username% – Your username
  • %profile% – Link to your profile
  • %rss% – Link to your profile’s RSS feed
  • %count% – Number of items shown

Download reddit.zip

WordPress YouTube Widget

Number 7 in Widget-A-Day is a YouTube widget.

It’ll display a YouTube video in the sidebar. Just enter the URL of the video, and it’ll show in the sidebar. You can change the width and height, and make it autoplay or not.

Download youtube.zip

SVN Checkout
svn co http://svn.wp-plugins.org/youtube-widget/trunk

Default display:
youtbe1cropped.png

Admin panel:
youtube2cropped.png

Requirements

Installation

  1. Download youtube.zip
  2. Extract and upload youtube.php to the plugins/ directory
  3. Enable YouTube Widget in the Plugin admin panel
  4. In widget admin panel, place YouTube in the sidebar, and edit it to enter the YouTube URL, not the embed code

Download youtube.zip

WordPress Digg Widget

Sorry for the lateness. Went out, and it wasn’t working by the time I left.

Anyways, number 6 in Widget-A-Day is a Digg widget. It’ll display your latest dugg stories and the number of diggs the story has. It can be customized to include just about all the information the RSS feeds gives. Check out formatting for more information.

Update: If you downloaded this before 6 CST on May 31, the caching system wouldn’t work. Just redownload the file, and it’ll work or just remove AND FALSE on line 39.

Download digg.zip (digg.tar.gz)

Default display:
digg1cropped.png

Admin panel:
digg2cropped.png

Requirements

Installation

  1. Download digg.zip (gz)
  2. Extract and upload digg.php to the plugins/ directory
  3. Enable Digg Widget in the Plugin admin panel
  4. In widget admin panel, place digg in the sidebar, and edit it to enter your username

Features

  • Displays your latest dugg items from Digg
  • Completely customizable display
  • Caching for large traffic sites

Formatting

There are 3 parts needed to format the output.

The first part, called items start in the admin panel, is the first part of the widget after the title. For the default formatting, this is just <ul>.

The second part, called items end, is the ending of the widget. By default, this is:
</ul>
<a href="%profilelink%" style="float:right;">%username%</a>


The third part is what is called for each item. By default, this is:
<li style="list-style-type: none;"><a href="%link%">%title% (%diggs%)</a></li>

The premise of calling each value is this:

  1. start
  2. item
  3. item
  4. item
  5. end

The formatting for items is:

  • %title% – Title of the item
  • %link% – Link to the item
  • %desc% – Description of the item
  • %date% – Date the item was submitted (in GMT)
  • %category% – Category of the item
  • %diggs% – Number of diggs the item has
  • %comments% – Number of comments the item has
  • %user% – User name of the submitter
  • %userimage% – Link to the submitter’s icon
  • %number% – The number of the current item

The formatting for start and end is:

  • %username% – Your username
  • %profile% – Link to your profile
  • %rss% – Link to your profile’s RSS feed
  • %count% – Number of items shown

Download digg.zip (digg.tar.gz)

WordPress Weather Widget

Number 5 in Widget-A-Day is a Weather widget.

It isn’t too fanciful. It displays the current condition, temperature, and the feels like temperature. It uses weather.com‘s xoap api to retrieve the information. I’ll probably come back to this and make it better.

Download weather.zip

SVN Checkout
svn co http://svn.wp-plugins.org/weather-widget/trunk

Default display:
weather1cropped.png

Admin panel:
weather2cropped.png

Requirements

Installation

  1. Download weather.zip
  2. Extract and upload weather.php to the plugins/ directory
  3. Enable Weather Widget in the Plugin admin panel
  4. In widget admin panel, place Weather in the sidebar, and edit it to enter your location

Location

The location can either be a zip code for US users or the locid. To find the locid, you can do a search using http://xoap.weather.com/search/search?where=[search parameters].This will return an XML file with search results and their corresponding locid’s.

You can also find it out by the Weather.com website. After searching for and selecting you city, you will be sent to a url that will look something like, http://www.weather.com/outlook/driving/interstate/local/USTX0617?from=search_city, where USTX0617 is the locid.

Image Hosting

I’ve provided the images used and provided by weather.com here. If you want to host your own images, extract and upload the files, then, in the admin panel, edit the ‘Image Location’ field to point to your directory of images. Make sure to have the trailing slash.

If you don’t use your own images, you are free to use the ones that I’ve hosted, which are located at http://ja.meswilson.com/blog/weatherimages/

Editting display

You can edit ‘Widget Formatting’ to change how the info is displayed. To access the variables, use this formatting:

  • %loc% – Location
  • %temp% – Current temperature
  • %feels% – Feels like temperature
  • %icon% – The icon referring to the current weather. This is just a number
  • %iconhref% – The location of the image with your set image location at the front
  • %attribution% – The link supposedly required to be displayed. Weather data provided by weather.com®

The default formatting is:

<img src="%iconhref%" alt="%cond%" style="float:right;" />
%loc%<br />
<span style="font-size: 150%;">%temp% °F</span>
(%feels% °F)<br />
<span style="font-size: 65%; float: right;">%attribution%</a>

Download weather.zip

WordPress Countdown Widget

Today is my birthday. Woo! So that means, I’m not doing anything fancy, so without further ado

Number 4 in Widget-A-Day is a countdown widget.

It’ll display the amount of time until a certain event, or if it passed, how long ago it was. Lame? Yes. Do I care? Not really. Is there Javascript? No. Was there supposed to be? Yes. Why not? Because I’m lazy.

Update: By request, added a new version

Download countdown.zip (countdown.tar.gz)

Default display:
countdown1cropped.png

Admin panel:
countdown2cropped.png

Requirements

Installation

  1. Download countdown.zip (gz)
  2. Extract and upload countdown.php to the plugins/ directory
  3. Enable Countdown Widget in the Plugin admin panel
  4. In widget admin panel, place Countdown in the sidebar, and edit it to enter your the time and name

Download countdown.zip (countdown.tar.gz)

WordPress Google Reader Widget

Number 3 in Widget-A-Day is a Google Reader widget.

This widget will display your latest shared stories. You can change the amount of stories to display and how to display them.

Download googlereader.zip

Default display:
googreader1cropped.png

Admin panel:
googreader2cropped.png

Download googlereader.zip

SVN Checkout
svn co http://svn.wp-plugins.org/google-reader-widget/trunk

Requirements

Installation

  1. Download googlereader.zip
  2. Extract and upload googlereader.php to the plugins/ directory
  3. Enable Google Reader in the Plugin admin panel
  4. In widget admin panel, place Google Reader in the sidebar, and edit it to enter your user id

Features

  • Displays your latest shared items from Google Reader
  • Completely customizable display
  • Caching for large traffic sites

User ID

In order to get your shares, you need to know your user id according to Google Reader. This can be found by going to the ‘Shared Items’ link, and copying the 20 digit number at the end of your shared items link.

So something like:
http://www.google.com/reader/shared/02774557510273097991
Where 02774557510273097991 would be my user id.

Formatting

There are 3 parts needed to format the output.

The first part, called items start in the admin panel, is the first part of the widget after the title. For the default formatting, this is just <ul>.

The second part, called items end, is the ending of the widget. By default, this is:
</ul>
<a href="%googlereader%" style="float:right;">Shared Items</a>

The third part is what is called for each item. By default, this is:
<li style="list-style-type: none;"><a href="%link%">%title%</a></li>

The premise of calling each value is this:

  1. start
  2. item
  3. item
  4. item
  5. end

The formatting for items is:

  • %link% – Link to the item
  • %title% – Title of the item
  • %site% – The title of the site the item is from
  • %sitelink% – The link to the site the item is from
  • %number% – The number of the current item
  • %comment% – The comment (note) made when sharing an item

The formatting for start and end is:

  • %googlereader% – Link to your Google Reader shared page
  • %count% – Number of items shown

Download googlereader.zip

WordPress Last.fm Widget Widget

Number 2 in Widget-A-Day is a widget for the last.fm widgets.

It can show the chart of your recent tracks, top tracks, and top artists (weekly tracks and artists don’t work currently since the value varies throughout). You can also choose between red, blue, black, and green.

Download lastfm.zip (lastfm.tar.gz)

Here is the default view:
lastfm1cropped.png

Here is the admin panel:
lastfm2cropped.png

Requirements

Installation

  1. Download lastfm.zip (gz)
  2. Extract and upload lastfm.php to the plugins/ directory
  3. Enable Last.fm Widget – New Style in the Plugin admin panel
  4. In widget admin panel, place Last.fm in the sidebar, and edit it to enter your username

Download lastfm.zip (lastfm.tar.gz)