David-Clark.net
Welcome to my random musings about web development, php, html, the codeigniter framework, and anything else that comes to mind.

The Value Of Online Support

Having a small web design and web hosting business I am very aware of the value of a strong support network for online hosting, software products, and design issues. I have always supplied support to clients hosted on one of my servers at no direct cost, figuring it into the base cost of their hosting package, and I also support any web design or application I have created for at least a year after it is deployed and do not charge extra unless the issue is outside of the realm of the original proposal. I would like to think that I supply a reasonable level of service and support with response times generally within two hours of the request and never longer than 4 hours. After all, how long does it take the cable company to come out and repair your internet connection? Under 4 hours? Most unlikely in my experience, I usually hope it will be under 4 days. I write this post more out of amazement of how far some are willing to take support, both for the better and for the worse.

Today I think I have come across the most blatant and excessive overcharging for services that I have seen to date. The offender? Ellis Lab (ellislab.com) and the structure they have placed around their Expression Engine product. I had just started exploring this product for possible use for future client needs as I have always had a strong like of and have built a number of sites and applications with the Codeigniter Framework, which was derived from the Expression Engine product. I was dumbfounded today when I saw the new Ellis Lab site with their new pricing structure. The product license itself has gone up to $299.00 per site license, which is a 300% increase from what it was, yet this is not what took my breath away. Ellis Lab support for THEIR product, has gone off into a land I have never heard of. The support menu;

Silver Support -> $49.00/month – includes 1 urgent ticket a month plus unlimited standard support tickets covering unlimited sites each month, AND you get a guaranteed first response to your ticket within 2 business days.

Gold Support -> $299.00/month – includes 2 urgent tickets a month plus unlimited standard support tickets covering unlimited sites each month, AND you get a guaranteed first response to your ticket within 1 business day.

Platinum Support -> $1,999.00/month – includes 8 urgent tickets a month plus unlimited standard support tickets covering unlimited sites each month, with a guaranteed first response to your ticket within 4 business hours.

Extra urgent tickets over your allotment for your service level will run you to the tune of $249.00 each…..

Support Costs

So, if I want a reasonable response time (within 4 hours) I am going to have to shell out $2k a month? That’s nuts. The client base they have, or I would believe that they have, is probably 95%+ web developers. With this, I would think that most support tickets would be of an urgent nature and a true issue versus a request for a tutorial on how to do something. Of course this gets my mind going, can I charge this kind of price to support my products? Are any of my clients going to pay that kind of money to me to support a product I am supplying? I don’t think so.

Now, I would be remiss in not mentioning that I have also found what I have experienced as the best support for any online product I have used. The host I work with, HostDime (hostdime.com), offers consistent support supplied in a reasonable time frame, they have even diplomatically worked with me when I have gone off the deep end and become that client that no one wants, and yes, I think we can all be that person if the situation is right. Their business hours are 24/7, not 10am to 2pm on Tim Buk Too time. The cost? Included with all their fully managed packages! Are the package prices out of line? No, they are very competitive with the market. They seem to be surviving and actually prospering in today’s marketplace without charging an outrageous fee to support their product, so they are doing something right, and I believe that it is the fact that they have listened to and supported their clients in a reasonable manner.

Kudos to you HostDime, others (hint, Ellis Lab) should take a lesson from your group. I know I have, and I try to extend the same level of support to my own clients. More companies need to follow the lost tradition of taking care of the client, not just taking from the client.

End of my rant for today…..

Posted in Online Services | Leave a comment

phpVMS Individual Aircraft Stats

Users of the phpVMS virtual airline system may want to display individual aircraft stats. An addition to the system follows to add this feature to your site.

Create a file named Airframestatsdata.php in your /core/common/ folder and insert the following code.

<?php

//simpilotgroup addon for phpVMS virtual airline system
//
//simpilotgroup addons are licenced under the following license:
//Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
//To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/
//
//@author David Clark (simpilot)
//@copyright Copyright (c) 2012, David Clark
//@license http://creativecommons.org/licenses/by-nc-sa/3.0/

class Airframestatsdata extends CodonData   {
    
    function airframe_stats($id)    {
        $query = "SELECT aircraft,
                COUNT(*) AS total_flights,
                SUM(distance) AS total_distance,
                SUM(flighttime) AS total_flighttime,
                SUM(fuelused) AS total_fuelused,
                SUM(revenue) AS total_revenue,
                ".TABLE_PREFIX."aircraft.*
                FROM ".TABLE_PREFIX."pireps
                JOIN ".TABLE_PREFIX."aircraft ON ".TABLE_PREFIX."pireps.aircraft = ".TABLE_PREFIX."aircraft.id
                WHERE ".TABLE_PREFIX."pireps.aircraft='$id'";
        
        $stats = DB::get_row($query);
        
        if($stats->aircraft != null)
        {
            $stats->average_distance = round($stats->total_distance/$stats->total_flights);
            $stats->average_flighttime = round($stats->total_flighttime/$stats->total_flights, 2);
        }
        else
        {
            $stats = null;
        }
        return $stats;
    }    
}

Then in the module function that you want to display the stats assign them to a variable ($aircraft_id is the database id of the aircraft you want to show)

function aircraft_view($aircraft_id)    {
    $this->set('stats', Airframestatsdata::airframe_stats($aircraftid);
    $this->show('my_template');
}

In your view (template file) you then have an object named $stats that should include the following information

object(stdClass)[13]
  public 'aircraft' => string '1' (length=1)
  public 'total_flights' => string '7' (length=1)
  public 'total_distance' => string '3895' (length=4)
  public 'total_flighttime' => string '10.47' (length=5)
  public 'total_fuelused' => string '68114.6000976563' (length=16)
  public 'total_revenue' => string '39751.0457420349' (length=16)
  public 'id' => string '1' (length=1)
  public 'icao' => string 'B737' (length=4)
  public 'name' => string 'BOEING 737' (length=10)
  public 'fullname' => string 'Boeing 737-700' (length=14)
  public 'registration' => string 'AVEB21' (length=6)
  public 'downloadlink' => string '' (length=0)
  public 'imagelink' => string '' (length=0)
  public 'range' => string '0' (length=1)
  public 'weight' => string '0' (length=1)
  public 'cruise' => string '0' (length=1)
  public 'maxpax' => string '120' (length=3)
  public 'maxcargo' => string '1000' (length=4)
  public 'minrank' => string '0' (length=1)
  public 'ranklevel' => string '0' (length=1)
  public 'enabled' => string '1' (length=1)
  public 'average_distance' => float 556
  public 'average_flighttime' => float 1.5

You can then display the data however you would like in your template using an echo command

<?php echo $stats->name; ?>
Posted in phpVMS | Leave a comment

phpVMS Content Module

Some users of phpVMS often look for a way to add pages within the system without using the pages editor as sometimes it will break php code you are trying to use in the page. It can be done easily by creating a quick module to show the pages.

For this example we will create a module named “Content” to display our custom pages for our phpVMS system.

First create a new folder in your /core/modules folder named Content (case sensitive) and inside of that folder create a blank php file named Content.php 

Extend the core codon structure to start the module file,

<?php
class Content extends CodonModule {

}

Next create the index function within the class that the module will default to if there is no method declared in the url call.

function index()     {

}

Within the index function create a call to show your custom template (view) for your site.

$this->show('customfile');

Your Custom.php module (controller) file should look similar to this now,

<?php

class Content extends CodonModule     {

  function index()     {

     $this->show('customfile');

  }

}

Next, create your custom template (view) by creating a file in your skin folder named customfile.tpl . This file should contain everything that you want shown on the page you are creating. This file is the part of your webpage that is contained in between the <body> and the </body> tags. The header and footer as well as all the css and js calls made in your template will also be included within this page, so no need to create new links to any of those items. You can use html or php or a combination of both within this file. An example might be;

<h1>My Custom Content Page</h1>
<ul>
  <li>List Item 1</li>
  <li>List Item 2</li>
  <li>List Item 3</li>
</ul>

To view this page create a link on your site pointing to the module;


http://www.mysite.com/index.php/content

If you would like to add more pages to the module it can be done by using additional methods within the module(class). For example you could add a page for staff members;

<?php

class Content extends CodonModule     {

  function index()     {

     $this->show('customfile');

  }

 function staff()     {

     $this->show('staff');

  }

}

Then, create a file in your skin folder named staff.tpl and once again include the html and/or php code you want included in the page. To reach this page on your web site, add the method name to the end of the url we used earlier,


http://www.mysite.com/index.php/content/staff

You can pass data in variables from the core system using these methods if it is required and also add access controls if needed.

Posted in phpVMS | 1 Comment