Archive for Web Development

Automatic Change of Copyright Year on your Website/Blog

After the new year, hardly anyone remembers to change the copyright year in their website’s footer. It is especially difficult to those people who have a lot of sites. So, I have decided to write this short article showing how to change the copyright © year in the site footer. In general, I have automated this process to make it easier for beginners and multiple website owners…

For you to be able to easily manage the change in the copyright year on your website/blog, you must edit the file footer.php (File of your template) instead of the year, with a simple register php code:

<? Php echo date (‘Y’);?>

For example, the copyright looks like this:

Copyright © 2011 – <? Php echo date (‘Y’);?> eUKhost LTD. All rights reserved.

Doing this work once, you can forget all about changing the year every time on your site!

cPanel Web Hosting

Related Posts:

  • No Related Posts

What is CodeIgniter, and how does it work?

What is CodeIgniter?

ci logo2

CodeIgniter is a free, open-source, easy-to-use, object-oriented PHP web application framework, providing a ready-to-use library to use with your own PHP applications. For example, there is a Database API to make it easier and more convenient to execute SQL queries, such as SELECT, UPDATE, DELETE, INSERT, etc., without having to create a lot of repetitive code yourself. This is how an application framework is useful in application development.

CodeIgniter is object-oriented

Using CodeIgniter requiring knowledge of using the object-oriented programming technique in order to be able to use CodeIgniter effectively, and to understand what happens when you are using certain features in CodeIgniter.

But, what is object-oriented programming?

It’s quite difficult to explain object-oriented programming because from a conceptual point of view, it is difficult to understand. However, the main purpose of object-oriented programming is to make application development easier, especially as applications become bigger, with large structures. Object-oriented programming allows application code and logic to be easier to understand, structured and coherently in place, making it easier to develop and extend your application’s features and functionality. With procedural programming (which is merely standard code executed line-by-line with the use of functions as a container for code that help prevent repetitiveness and “reinventing the wheel”), applications can become a mess if they aren’t developed in a way where everything is well laid out, coherent and structured, and can be more difficult to extend and add new features and functionality to your applications later on. With object-oriented programming, in a way, you are forced to be coherent and have your code structured correctly.

Classes and Methods

What are classes and methods? These are the first concepts you’ll be introduced to if you are learning object-oriented programming from most books or online resources. Say you’re creating a framework. You’ll have different classes for different parts of your framework. One being a “Database Class”, one being an “E-mail Class”, and so forth. Of course, in this case, the Database Class is like the CodeIgniter Database Class, providing a set of ready-made methods for you to use so you don’t have to create them yourself in order to execute certain application logic, such as inserting, updating and removing database records quickly, without having to “reinvent the wheel”.

The methods are what contain the application logic, and the class merely holds many related methods together. And this is exactly how your applications would work with the use of the object-oriented programming techniques.

How does CodeIgniter work?

CodeIgniter has a very extensive user guide, which is much better than documentation on some other frameworks, such as CakePHP (which is another PHP framework).

CodeIgniter has classes and helpers.

Classes

Classes contain a collection of methods and properties (properties are essentially variables in an object-oriented context).

For example, here is an example using the Database library within CodeIgniter:

$this->db->get(‘users’,$data);

In any application you make using CodeIgniter, your own classes inherit (or extends) the CodeIgniter class, and so this is why the $this variable is used, which refers to the current class/object. So to call another method within your class, you would use $this->method_name().

Helpers

Helpers contain ordinary PHP functions. Such as the Form Helper.

Other interesting features of CodeIgniter

While this is by no means unique to CodeIgniter, and other web application frameworks use this approach to application development, CodeIgniter primarily uses the Model, View, Controller (MVC) approach to application design and development. It essentially separates application logic from the application design/view. The application logic is the Controller, whereas the application design/view is the View. The Model is for database interactions. There are more complex scenarios where the MVC approach is used, but for basic to intermediate CodeIgniter applications, the Model would contain database interactivity logic of sorts.

Active Record

When you saw an example of using the Database Class above, that code is actually part of the Active Record Class that is part of the Database library.

Active Record is where your work can be shortened by providing an easy and convenient way to execute certain SQL queries without having to write out the entire SQL query yourself. Active Record essentially allows information to be updated, retrieved, added and removed conveniently.

More information on CodeIgniter

The CodeIgniter framework works on all of our shared and reseller servers, and can be installed on pretty much any server with PHP installed. As of writing, CodeIgniter requires PHP version 5.1.6 or higher and obviously a database will be required for any database-driven PHP application (as of writing, MySQL 4.1 or higher). CodeIgniter also supports PostgreSQL, Oracle, SQLite and ODBC. For up to date server requirements, see the CodeIgniter user guide.

Visit the CodeIgniter website

Related Posts:

  • No Related Posts

Making your websites mobile-friendly is becoming increasingly more important

For years, mobile phones (on a software and hardware level) were simply inadequate for displaying websites as they were meant to be seen. However, many phones back then displayed websites without images or in a conventional view in order to make it optimised for the software and hardware of the phones at the time.

As time has gone on, however, especially with the invent of the Apple iPhone back in 2007, all smartphones now can show the entire website as it is seen on a desktop PC (albeit shrunk down) because smartphones are more powerful than standard mobile phones or featurephones and the software allows the full website to be rendered within the mobile browser application.

So why is it “more important” to also focus attention on making your websites or blogs mobile-friendly?

euk blog mobile 258x300Well. First, if you use WordPress, it’s incredibly easy. Simply install the WordPress Mobile Edition plugin (you can find and install it directly via the WordPress Administration Panel). It instantly gives your blog a mobile-friendly user interface if a mobile phone or user agent is detected.

However, you may wonder why it is even important at all. Well, foremost, let’s look at usage statistics:

 

 

StatCounter mobile vs desktop GB monthly 201012 201112 300x175With StatCounter, smartphone usage for surfing the web is at 9.39%. That’s a high number. That equates to 1 in 10 connections to a website may well be from a phone. And because smartphones are becoming used more and more for what our computers would usually be used for, many people simply use their smartphone instead of their computer to do basic computing tasks such as searching for something or for the answer to something, browsing the web, reading the news, etc.

Why should I build a mobile user interface? Smartphones are capable of viewing the full website as it is.

That is true, yes. But many websites now have specialist user interfaces specifically made for smartphones such as iPhones, Android Phones, BlackBerry smartphones, etc. For example, the WordPress Mobile Edition plugin transforms your WordPress blogs into a readable, clean format for small-screen devices. With the use of JavaScript, you can detect the user agent of the visitor visiting your website, and if it equates to a mobile browser or operating system, you can choose to provide them with a mobile user interface.

It also equates to a better user experience. Your users don’t want to be scrolling a lot to read the content on your website.

You could also consider making your forums mobile-friendly as well. While there would probably be plugins or add ons for the various popular forum systems out there, such as vBulletin, phpBB, etc., you could also install add your forum to mobile apps such as TapaTalk (Board Express on Windows Phone) which allows your users to access your forum via a mobile-friendly app. And it works for many popular forum systems, including vBulletin, Invision Power Board, MyBB, SMF, phpBB, etc.

However, there are disadvantages to using TapaTalk or Board Express. For a start, I don’t even think you can make any money if all your mobile users end up using TapaTalk or Board Express because your forum is available on it. If this is the case, I wouldn’t be surprised if forum owners have decided not to go this route because there is no way to make money when users are using your forum through a third party solution, in which you cannot make any money.

Inherent advantages to creating a mobile-friendly user interface

The inherent advantages are quite obvious. It makes it easier for your users to navigate your website or blog without having to pan and scroll a lot. It makes it more focused on the content on your website or blog.

Some other sligthly-irrelevant advantages is that it could save you bandwidth. Even though it may to matter to you much, if 9% of your visitors are from mobile devices, you could save yourself a portion of bandwidth if the mobile user interface transfers less data to the visitor when they visit your website.

Inherent disadvantages to creating a mobile-friendly user inteface

Well, if you have a mobile user interface, it would be very difficult to include advertisements unless you are able to fit in mobile-sized advertisements that coherently fit into your mobile user interface. If it does, great, you may make money via your mobile user interface, but often is the case that with a mobile user interface, such as with the WordPress Mobile Edition, while your users would be getting a better user experience, they would also not have the distraction of advertisements you may have installed on the desktop user interface through WordPress plugins such as Awesome Ads. So unless you can find a suitable way to add mobile-friendly advertisements to the mobile user interface part of that WordPress plugin, you would be without advertisements which is something to take into consideration. If a lot of your traffic (say, 9%) comes from mobile phones. That is the potential for up to 9% of loss revenue that may be potentially there if you had mobile ads on the mobile user interface. You may want to take this into consideration.

Some examples of mobile user interfaces that work perfectly on smartphones include:

engadget 283x300neowin 300x294

 

neowin ads 300x86If you noticed on the Engadget blog, they have mobile ads. It is definitely possible to implement mobile ads, Neowin’s blog (second image above) also has mobile advertisements at the top, too. There are many mobile ad firms you can use as well, in order to generate revenue through visitors on mobile devices.

Concluding…

ebuyer mobile 300x238So, there are many resources online to help you make your website mobile-friendly. This article is to help introduce you to as to why making your website mobile-friendly is indeed a good idea, because based on ever updating mobile data, it is becoming very important – even for businesses such as e-commerce stores, as more people may wish to shop on their phones. Of course, many e-commerce stores may opt to create an actual app for smartphones which provides rich user experiences with a mobile-centric app user interface, but others decide e-commerce stores decide to create mobile-friendly versions of their e-commerce store.

Related Posts:

  • No Related Posts

Web alternatives to desktop applications for web development, blogging, e-mail and more

Google is really pushing the “web-centric” future in regards to web applications that can essentially replace the need for any sort of desktop applications, considering a lot of our time on our computers is used being on the Web. Let’s face it, a lot of the time without Internet access your computer is useless.

There are many web “apps” that can replace our trusty desktop applications; some you may have heard of before, others probably not so.

Productivity and Web Development

Office

google docs 300x187For Office, there’s the trusty Google Docs service. It allows you to create and edit documents via the web app. As well as standard word documents, you can also create presentation documents and spreadsheet documents.

It’s a great alternative than having to purchase Microsoft Office, and of course, it is completely free to use and is part of Google’s overall ecosystem of services.

It supports Microsoft Office documents pretty well and will export to Microsoft Office format, alongside PDF and the OpenDocument Text format, which is used by OpenOffice (now defunct – which has been forked to the LibreOffice project led by the The Document Foundation).

Features include:

  • Headings and other basic features such as colours, fonts, font sizes, etc etc (such as subscript text, superscript text, strike-through/line-through text);
  • Table of Contents;
  • Page numbers and page count;
  • Bookmarks, headers and footers;
  • Page breaks;
  • Non-professional translation of document to other languages (presumably using Google Translate service);
  • Tables;
  • Insertion of images, comments, links, drawings and horizontal lines

Microsoft Office Web Apps

Microsoft also introduced their Office Web Apps, which are basic substitutions for the Office desktop productivity suite that they sell for Windows and Mac OS X systems.

However, the Web Apps are very limited, and you can tell it is because Microsoft does not want it to be an adequate replacement to the Office productivity software for Windows and Mac OS X. There is Microsoft’s Office 365 service, but it appears they are advertising it as for professionals, small businesses, enterprises and education customers. However, it starts at £4 a month. Over a year, however, that is nearly the cost of a Office license that you can use essentially indefinitely.

That said, the Office Web Apps have purposely a lack of important features so I would recommend Google Docs for productivity office work.

E-mail

An e-mail client on the web?! As the Apple saying goes, there’s an app for that. Web app at least. Smampi is a free web e-mail client. You can add multiple e-mail accounts to your Smampi account. However, since your e-mails are going to be kept in the cloud, I do recommend (as I have) to look over their Terms and Conditions and especially their Privacy Policy. It takes 5 minutes of your time, yes, but it makes sure you know what they are doing with anything they store in the cloud (or more to the point, on their servers). This is the main issue people have with embracing cloud-based computing; the fact that a lot of your data and information will be kept in the cloud. Documents, files, e-mail, you name it.

Web Development and FTP

There’s a web app called ShiftEdit that is essentially a text editor and FTP client in one. It’s really cool, and works surprisingly well. It also has syntax highlighting for  various languages, including:

editor 300x187

  • HTML
  • CSS
  • JavaScript
  • PHP
  • Python
  • Perl
  • Ruby
  • Java

 

And more, including JSON!

It’s free. There are some limitations for the free version, including up to one website being added and edited at once. So you have to delete your site from your ShiftEdit account in order to be able to add a new site to edit. Overall, very good editor!

Picnik

Want to be able to make basic adjustments to your photos, screenshots or images? Use Picnik. It requires Flash, however, so it won’t work on an iPad or any other device that does not have Flash installed. That said, it’s free and works incredibly well. Definitely recommend you try it out.

my qr code

QR Creator

Want to be able to create QR codes? There’s a web app for that. QR codes are used primarily on mobile devices to scan a QR code. It may take you to an app within a smartphone store such as the App Store on iOS or the Marketplace on Android, or may simply contain text or even a URL to a web page.

Social and Chatting

IRC Chat Clients

Yes, there are web-based IRC chat clients.

irc 300x165

Mibbit

Nothing really to say. Works well, and allows you to select from a predefined list of IRC channels, or connect to a server manually with any relevant authentication information, such as NickServ, Server Pass, etc etc.

 

 

 

Send Files

Using web instant messaging clients, or can’t transfer files via your IM client? Use Just Beam It. It allows you to upload files and send a URL to your recipient in order to download the file in question. Works well.

URL Droplet

Can’t download something to upload to your Dropbox folder? Use URL Droplet. It will download the file and subsequently upload it to your Dropbox account.

Good browsers for web apps

Of course, web apps aren’t  useful on older or less-supported browsers with the latest web standards, such as CSS3 which, as of yet, hasn’t really gone that far as of now. But that’s to be expected with a large organisation like the W3c, probably working with many, many organisations and bodies to come up with the best specifications for the upcoming CSS3 and HTML5 standards.

Some good browsers include:

Google Chrome

Chrome is a great browser, supports HTML5 video and quite a bunch of HTML5 spec so works great with HTML5/JS games you may find around the web you may want to try out. Chrome is also the browser used with Google’s somewhat experimental Chrome Operating System. It’s quite experimental not from a technical perspective but from an implementation perspective; it’s a big shift in the way you do things on your computer, as everything is web-based (Chrome OS is just a Chrome browser, essentially).

Mozilla Firefox

Another great browser, widely used as well. Now has great features such as Firefox Sync for synchronisation of bookmarks, history, passwords, etc and Pinned Tabs, etc.

Internet Explorer 9

Microsoft is really having to play catch up in the browser space, and they have (mostly), with Internet Explorer 9. A huge improvement on standards support, supporting quite a bit of the HTML5 and CSS3 spec as well as a better and more up to date, modern and appealing user interface. IE8′s UI looked very clunky compared to every other modern browser out there.

Opera

Another great browser that needn’t be forgotten. Very standards compliant and a modern user interface. It has a very low market share compared to every other major browser listed above, but it is still one to recommend.

Related Posts:

Muse and Edge – Adobe’s Tools for Web Designers

A designer and a developer is not often the same person… and yes, unfortunately it is too often the same person on the web. As it stands today, the web designer needs to learn at least HTML and CSS to get by. However, now it is something that Adobe would resolve very easily with the help of two different tools “Muse” and “Edge”. These are the two new products developed by Adobe Systems.

Muse – Design and publish HTML websites without writing code

Adobe Muse

Unlike the Dreamweaver, Muse is a tool which designers do not have to worry about a single line of code, and it comes out to be compatible with all the popular browsers, while taking advantage of CSS3 and HTML5 where possible.

Currently, Muse is already in a Free beta version which can be downloaded from Adobe Labs, so you can test drive for free right up to the crisp version is released in early 2012 as predicted by Adobe.

Adobe Muse Interface

In the short time, you can try out Muse, it is said that the interface of Muse is very pleasant to work with and you are used to work with Adobe design applications, it goes pretty fast to get into the workflow. In addition, you can use all the regular tools such as working with templates and style sheets in a manner similar to the “Indesign” product.

Edge – A Flash Killer by Adobe

Adobe Edge

In addition to Muse, Adobe has developed a “Flash killer” tool known as “Adobe Edge” as they themselves say that Flash and Edge are complementary. The main goal of developing such an enhanced tool is to allow designers to produce animated content in websites, web games, animated banner ads in a manner similar to Flash, but based on HTML5, CSS3 and Javascript.

Edge is an ideal tool for visual, web and interaction designers who wish to stimulate their content for the web with various movement and transitions. Basically, Edge is developed primarily by focusing on animation and motion. Adobe Edge Preview is allows you to add the graphics that are produced using the Adobe Illustrator, Adobe Fireworks and Adobe Photoshop to form new and appealing graphics. It also allows you to open the HTML documents created using the CSS.

Adobe Edge Interface

Technologies such as JavaScript, JSON, HTML, HTML5, CSS, web graphics including SVG, jQuery-based animation framework are supported in Adobe Edge Preview. Just as Muse, Adobe Edge is also free to download until the crisp version is released.

For people who wish to build professional looking websites having animation and motion, Adobe has made it much easier by developing such wonderful products known as “Muse” and “Edge”. UK Web Hosting services offered by eUKhost are ideal for hosting such flash and animation based websites that are created using the Adobe’s designing tools.

Related Posts:

« Previous entries Next Page » Next Page »