Posts Tagged wordpress

And we’re back!

There were a couple of outages, but it looks like I’ve got things back to normal. Or what passes for normal.

I’ve changed the theme to fusion.

I’ve gone with the Akismet Plugin for handling spam comments, so I apologize in advance if any of your comments get flagged as spam. I’ll do my best to go through the spam folder over the next few weeks to check for mis-classified comments.

I’ve also installed the WP-CodeBox plugin, which lets me do things like this:

=item B<new>
 
Create a new instance of an C<Astro::Flux> object.
 
  $flux = new Astro::Flux( $quantity, $type, $waveband );
 
The first three parameters must be defined. They are:
 
  quantity - numerical value for the flux, my be a primitive, or a
             C<Number::Uncertainty> object.
  type - type of flux. Can be any string.
  waveband - waveband for the given flux. Must be an C<Astro::WaveBand> object.
 
If any of the parameters are undefined, the constructor will throw
an error. If the waveband parameter is not an C<Astro::WaveBand> object,
the constructor will throw an error.
 
The type is case-insensitive for lookups using the C<quantity> method.
 
A fourth optional argument may be passed; this is a hash containing
the following optional keys:
 
  quality - an C<Misc::Quality> object denoting quality flags for the
    C<Astro::Flux> object.
  reference_waveband - an C<Astro::WaveBand> object denoting a reference
    waveband for the C<Astro::Flux> object. This is used for determining
    magnitudes when deriving them from C<Astro::FluxColor> objects. See
    C<Astro::Fluxes>.
  datetime - an C<DateTime> object which is the datetime of observation for the
    measurement in the C<Astro::Flux> object.
  obsid - An array reference to a list of observation identifiers. Can be
    used to identify the observation(s) from which this measurement was
    taken (e.g. from a filename).
 
=cut
 
sub new {
  my $proto = shift;
  my $class = ref( $proto ) || $proto;
 
  my $quantity = shift;
  my $type = shift;
  my $waveband = shift;
 
  my %args = @_;
 
  croak "Quantity must be defined"
    unless defined $quantity;
 
  unless ( UNIVERSAL::isa($quantity, "Number::Uncertainty" ) ) {
     $quantity = new Number::Uncertainty( Value => $quantity );
  }
 
  croak "Type must be defined"
    unless defined $type;
 
  croak "Waveband must be defined"
    unless defined $waveband;
 
  unless ( UNIVERSAL::isa($waveband, "Astro::WaveBand") ) {
     $waveband = new Astro::WaveBand( Filter => $waveband );
  }
 
  my $flux = {};
 
  $flux->{QUANTITY} = { uc($type) => $quantity };
  $flux->{WAVEBAND} = $waveband;
  $flux->{TYPE} = uc( $type );
 
  if( defined( $args{'quality'} ) &&
      UNIVERSAL::isa( $args{'quality'}, "Misc::Quality" ) ) {
    $flux->{QUALITY} = $args{'quality'};
  }
  if( defined( $args{'reference_waveband'} ) &&
      UNIVERSAL::isa( $args{'reference_waveband'}, "Astro::WaveBand" ) ) {
    $flux->{REFERENCE_WAVEBAND} = $args{'reference_waveband'};
  }
 
  if( defined( $args{'datetime'} ) &&
      UNIVERSAL::isa( $args{'datetime'}, "DateTime" ) ) {
    $flux->{TIME} = $args{'datetime'};
  }
 
  if( defined( $args{'obsid'} ) ) {
    $flux->{OBSID} = $args{'obsid'};
  }
 
  bless( $flux, $class );
  return $flux;
 
}

As always, let me know if you notice any problems.

2 Comments

Possible canspice.org outages

I’m going to be switching around my WordPress installation in a few minutes. I know not many of you read this, and an outage of a few minutes will probably go unnoticed, but I thought I’d throw up a warning anyhow.

For those who care, I’m switching from tarballs / standard installation to using Subversion. Thus I’ll be able to update easier in the future (I hope).

,

6 Comments

Now improved on mobile devices!

Visitors to canspice.org on mobile devices will now see a completely new interface, designed especially for those mobile devices. This was done with the WPtouch plugin. Let me know what you think!

,

2 Comments

A new look at canspice.org

If you’re one of the few people who visit canspice.org instead of reading posts through my RSS feed, you’ve probably already noticed that things look a little different. That’s right, I’m now using the arclite theme by Digital Nature. I think it looks better than the previous theme I was using.

Currently the only page that doesn’t seem to work is the archives page. That’ll be fixed sometime in the future.

What do you think? Keep the colour or go back to the stark black & white of yesterday?

, ,

4 Comments

Changes afoot

Astute readers may have noticed that last night I switched themes here on canspice.org. The new theme is named iNove. This theme allows me to put in a sidebar, which is something I’ve been meaning to do for a while but haven’t got around to it.

I have since discovered that commenting appears to be slightly broken in that most legitimate comments are ending up classified as spam. I’m working on fixing this, and have approved the four comments that I’ve found so far. If your comment hasn’t come through, email me.

I’ve also trimmed up my blogroll. If you think you should be on it, let me know!

And just to keep things current, I’ve updated to WordPress 2.7!

, , ,

No Comments