So I'm starting to get the impression that I no longer tender for brand new projects competing with time and cost in order to win the bids. Recently, more and more people have been asking if I can take over a project that has been abandoned by its developer.

I've started writing this article because I find myself forgetting to ask something that could have saved an infinite number of man-hours (I exaggerate a little); but seriously, I needed a checklist that works for me.


Most Difficult?
My hardest project was (still is) one created by a PhD student who graduated and left the institution. It was a custom-built site written from scratch, and it's purpose was to manage Staff and Students within the Additional Learning Needs group. These are staff who take lecture notes for people of all disabilities and assist the students for the duration of their course. It had to allow for synchronizing with the official student record system and timetabling system (done via file upload). It included it's own timesheet / session management / invoicing system.

The website was held on a virtual host running PHP and MySQL. There was no documentation, logs, notes, and any code comments were in Hungarian (later found out it was slang or a dialect not understood by most Hungarians). Fellow students and system administrators could not accurately describe what the system was for and what it does. The developer had created the system to only last during one academic year, and the system itself only just about understood academic years (required tweaking twice a year). Then there were the error logs... some 20000 errors per use of a feature over 4 seconds. Do some developers never check the errors log?

By the time, I started maintaining the project, a revamp had been agreed with another web team. This has been delayed somewhat and still after 2 years there is no new site (blamed on the customer for not knowing what their application did in the first place... tut tut. How long have you been a developer? And this is new?).


This is a note to myself but also to anyone out there who's spent as long as I did looking for a solution to this. Maybe it's just me but this is the scenario:
  1. Joomla works fine with international characters
  2. A Module Extension I wrote for Joomla! displayed funny characters.
  3. The Joomla! articles were displaying the correct characters for that language set.
  4. I needed to make my extension read data from a MySQL database and display the caracters as intended with UTF8.

I tried enough extensions and forum solutions, and although these changes would have an effect on the module (such as take away accents and convert to ASCII), they weren't what we were looking for.

The quick solution was to make the script run a MySQL command at the start:
copyraw
SET NAMES 'utf8'
  1.  SET NAMES 'utf8' 
Now I need to run this command from within a Joomla! extension using the mysql Joomla! classes, here's how I've used in this script pulling IDs and titles from the a sample table:
Category: Personal Home Page :: Article: 303

Quick tip or note to self: How to get yesterday's date irrespective of date format or daylight savings time.
copyraw
$today=date("Y-m-d");
$yesterday = date('Y-m-d', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")));
  1.  $today=date("Y-m-d")
  2.  $yesterday = date('Y-m-d', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")))
Category: Personal Home Page :: Article: 299

I don't usually write an article on another site but I came across it and rather than just add it to my weblinks section, I thought I'd give it a little more credit.

"Motive is a web design and development agency based in Wellington, New Zealand providing consultation, website design, development and usability evaluation services."

Their website has initiated a Web Definition Glossary (there are others but this one's got that "kiwi" approach)


Source: http://en.wikipedia.org/wiki/Comparison_of_web_browsers

 

Year Web Browsers Internet
Users (in millions)
1991 WorldWideWeb  
1992 ViolaWWW, Erwise, MidasWWW, MacWWW  
1993 Mosaic, Cello, Lynx 2.0, Arena, AMosaic 1.0  
1994 IBM WebExplorer, Netscape Navigator, SlipKnot 1.0, MacWeb, IBrowse, Argo, Minuet  
1995 Internet Explorer 1, Netscape Navigator 2.0, OmniWeb, UdiWWW, WebRouser, Internet Explorer 2, Grail 16
1996 Arachne 1.0, Internet Explorer 3.0, Netscape Navigator 3.0, Opera 2.0, PowerBrowser 1.5, Cyberdog, Amaya 0.9, AWeb, Voyager 36
1997 Internet Explorer 4.0, Netscape Navigator 4.0, Netscape Communicator 4.0, Opera 3.0, Amaya 1.0 70
1998 Internet Explorer 5.0 Beta 1, iCab, Mozilla 147
1999 Amaya 2.0, Mozilla M3, Internet Explorer 5.0 248
2000 Konqueror, Netscape 6, Opera 4, Opera 5, K-Meleon 0.2, Amaya 3.0, Amaya 4.0 361
2001 Internet Explorer 6, Galeon 1.0, Opera 6, Amaya 5.0 513
2002 Netscape 7, Mozilla 1.0, Phoenix 0.1, Links 2.0, Amaya 6.0, Amaya 7.0 587
2003 Opera 7, Safari 1.0, Epiphany 1.0, Amaya 8.0 719
2004 Firefox 1.0, Netscape Browser, OmniWeb 5.0 817
2005 Safari 2.0, Netscape Browser 8.0, Opera 8., Epiphany1.8, Amaya 9.0, AOL Explorer1.0, Maxthon 1.0, Shiira 1.0 1018
2006 SeaMonkey 1.0, K-Meleon 1.0, Galeon 2.0, Camino 1.0, Firefox 2.0, Avant 11, iCab 3, Opera 9, Internet Explorer 7, Sputnik 1093
2007 Maxthon 2.0, Netscape Navigator 9, NetSurf 1.0, Flock 1.0, Safari 3.0, Conkeror 1262
2008 Konqueror 4, Safari 3.1, Opera 9.5, Firefox 3, Amaya 10.0, Flock 2, Chrome 1, Amaya 11.0 1565
2009 Internet Explorer 8, Chrome 2, Safari 4, Opera 10, Chrome 3, SeaMonkey 2, Camino 2, Firefox 3.5 1734
2010 Firefox 3.6, Chrome 4, Opera 10.50  


  1. The concept - typically drawings, words, models, code and basic prototypes that describe the nature, objectives and features of the website.
  2. Design document - a detailed plan of the website’s features and how it will display are generated from the concept and presented to potential publishers.
  3. Technology demo – a prototype that demonstrates the website’s technology, illustrating for example the presentation and registration services. This is produced for review so as to decide if concept is marketable.
  4. Browsable prototype or Vertical slice – normally a few sections of the website are produced with many of the website features in and working, this allows reviewers to get a feel for the site, the level of usability, the saleability of the product and technical risk involved in fully developing the website.
  5. ALPHA/BETA – these are the next major milestones that represent near completed websites, these are subject to extensive testing, compatibility and QA by both the developer and the publisher.
  6. Master – a completed, bug-free website approved by the customer and available online.

This is if  you have an FLV file and you don't want any fancy management system, you just want your FLV to play on your webpage.

The following example is a demonstration of how to do this without installing anything on your webserver.

 I like to use flowplayer for this example but my own systems can't use a solution as crude as this.

  1. Copy the below code (beginning and ending with object tags)
  2. Paste it into your HTML page
  3. Replace both instances of the text "http://my.video.com/myVideo.flv" with the full url of your own FLV.
  4. Save the HTML page and publish

The Code:


I could apply the PRINCE2 (Projects in a controlled environment) methodology to website projects  but most people find this overwhelming.  It's in business techno babble and I get asked what does this mean in stage 1?  And this in stage 2?  (There are over 100 stages)...  

Below is my template project initiation plan (project mandate?) for my freelance website development process.  It may look clean, clear, obvious... it's just an outline of what I picture as a perfect project; unfortunately the first 2 pages tend to be completed in just over a day and the rest of the time is spent faffing around with design and functionality. We use the ProjectFork extension to manage projects, it helps during times when we can't see face-to-face with colleagues or clients.


I've decided to put something in here as it took me an age to find out how I could do it.

This is when using a MySQL query within a PHP script.  The process is used often to do a statistics table or top ten chart of your data (eg. movies, music, etc).

My aim is to do the following:

  1. retrieve data from a table,
  2. count the number of times each data exists,
  3. sort it in reverse order so that the most frequent is at the top of the list
  4. print out each row with the number of times that particular data appeared in a row

My old method was to:


 I'm beginning a list as I've just spent an age trying to get PHP output to create a text file.  Then my client showed me how she then opens the text file in Excel, so I said we could get the script to do that instead.

PHP to TXT

copyraw
header('Content-Type: text/plain; charset=utf-8');
header('Content-Disposition: attachment; filename=foo.txt');
echo 'contents of file';
  1.  header('Content-Type: text/plain; charset=utf-8')
  2.  header('Content-Disposition: attachment; filename=foo.txt')
  3.  echo 'contents of file'

 

PHP to XLS

copyraw
$export_file = "my_name.xls"; 
ob_end_clean(); 
ini_set('zlib.output_compression','Off'); 
header('Pragma: public'); 
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); 
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT'); 
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: pre-check=0, post-check=0, max-age=0');
header ("Pragma: no-cache"); 
header("Expires: 0"); 
header('Content-Transfer-Encoding: none'); 
header('Content-Type: application/vnd.ms-excel;'); 
header("Content-type: application/x-msexcel");  
header('Content-Disposition: attachment; filename="'.basename($export_file).'"');
  1.  $export_file = "my_name.xls"; 
  2.  ob_end_clean()
  3.  ini_set('zlib.output_compression','Off')
  4.  header('Pragma: public')
  5.  header("Expires: Sat, 26 Jul 1997 05:00:00 GMT")
  6.  header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT')
  7.  header('Cache-Control: no-store, no-cache, must-revalidate')
  8.  header('Cache-Control: pre-check=0, post-check=0, max-age=0')
  9.  header ("Pragma: no-cache")
  10.  header("Expires: 0")
  11.  header('Content-Transfer-Encoding: none')
  12.  header('Content-Type: application/vnd.ms-excel;')
  13.  header("Content-type: application/x-msexcel")
  14.  header('Content-Disposition: attachment; filename="'.basename($export_file).'"')
Category: Personal Home Page :: Article: 240

The Error: This file contains HTML or script code that may be erroneously interpreted by a web browser

This is a common error when uploading files that the MediaWiki system does not allow.  By making some minor changes to the MediaWiki LocalSettings.php file, we can fix this.

For demo purposes, I'm going to make our system recognize SWF files (by default these are disallowed):


The Issue

If you've ever made PHP scripts to process data within a LAMP environment (Linux, Apache, MySQL, PHP) then this happens a lot.  In the following example, our HTML form will allow the user to specify a date (so excludes hours, minutes and seconds).  For demonstration purposes, I'm going to be using the European date format so DD/MM/YYYY.

The Solution

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

server   website   client   table   note   name   license   work   create   data   report   case   added   database   where   value   file   need   files   function   user   zoho   time   date   system   following   mysql   form   first   order   joomla   field   list   script   parameter   code   source   display   creator   uploaded   using   find   version   error   deluge   would   windows   google   page   used   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.