WorldOWeb http://www.worldoweb.co.uk Resources tutorials and inspiration on Linux, Web Design, WordPress, PHP, jQuery and Open Source. Thu, 18 Dec 2014 21:21:40 +0000 en-US hourly 1 Christmas Shopping – Are you Stuck for Ideashttp://www.worldoweb.co.uk/2014/christmas-shopping-stuck-ideas http://www.worldoweb.co.uk/2014/christmas-shopping-stuck-ideas#comments Thu, 18 Dec 2014 21:21:40 +0000 http://www.worldoweb.co.uk/?p=7843 By Tracy Ridge

Stuck for ideas this Christmas or simply saving your money until the New Year to buy something in the sales.  Here are a few tech/media offers that I have picked that might help you out for your last-minute christmas shopping. If you are like me and don’t like doing your shopping on the high street […]

The post Christmas Shopping – Are you Stuck for Ideas appeared first on WorldOWeb.

]]>
By Tracy Ridge

Stuck for ideas this Christmas or simply saving your money until the New Year to buy something in the sales.  Here are a few tech/media offers that I have picked that might help you out for your last-minute christmas shopping.

Online Shopping Image

Image provided by Shutterstock

If you are like me and don’t like doing your shopping on the high street when it’s extremely busy or you seem to be going round in circles on the web because you can’t find what you are looking for then why not visit http://www.vouchersky.com/  where you can find some great deals, from many online retailers, in technology, gifts, jewellery, health & beauty and much more.  Many of the Deals are extended well into the New Year but here are just a few of them.

Novatech Deals

Free Lifetime UK Technical support
Novatech offers deals on high-tech products like PCs, motherboards, laptops and much more.  Having had a great personal experience with Novatech when helping my mum buy a new computer I highly recommend them. Good solid computers at great prices with the added bonus of free lifetime UK technical support.

Buy Z97 Motherboard and get free Cooler Master K350 Case
Get a free Cooler Master K350 Case if you buy GIGABYTE GA-Z97X-GAMING 3 Intel Z97 Motherboard.

Free K10 Gaming Keyboard if you buy Intel Z97 Motherboard
If you buy MSI Z97 Gaming 3 Intel Z97 Socket 1150 Motherboard, you can get free i-Rocks K10 Gaming Keyboard worth £21.99.

Electrical Experience Deal

Free gifts with selected Kef speakers purchase
If you are looking into buying some Kef speakers then this offer may be right up your alley.  The free gifts include Philips 22PFL4208T 22″ Smart LED TV Worth £200, Yamaha BDS477 Blu-Ray Player Worth £160, Yamaha RXV577 Amplifier Worth £500 and more.

Pixmania Deals

Enjoy up to 30% off on tablets
If you are looking for a tablet then you can enjoy up to 30% off.

Massive 60% discount on headphones at Pixmania
Get up to 60% off on high quality headphones from brands like AKG, HTC, JVC, Creative Labs, Philips, Sony and other well-known labels.

Half price on storage products
Grab a 50% discount on storage products like USB Key, SSD, 3.5-inch internal hard drives and more.

Up to 45% off on big screen TVs
Get a big screen TV and enjoy up to 45% off. The TVs are from top brands and well designed providing you a crystal clear image.

Hughes Deals

Free 5 year parts and labour warranty on selected appliances
Purchase selected Samsung appliances and enjoy free 5 year warranty on parts and labour.

Enjoy free 6 months of unlimited music with Deezer
Buy a qualifying Samsung Multiroom Wireless Audio Product and get free 6 months of unlimited music with Deezer. Lots of Samsung Models are involved in this great promotion such as HWH750, HWH751, WAM550, WAM751, WAM750 and WAM551.

4K Ultra HD TVs from £899 at Hughes
4K Ultra HD LG, Panasonic and Samsung TVs are from £899.

Zavvi Deals

2 for £8 DVD Titles at Zavvi
Get 2 DVDs for just £8 at Zavvi. Browse the entire range of DVD Titles and choose from Hansel and Gretel: Witch Hunters, The Perks of Being a Wallflower, The Girl Who Leapt Through Time, The Magdalene Sisters and many more.

2 for £25 Mix and Match Games at Zavvi
Special offer has been presented to you by Zavvi, which is 2 for £25 Mix and Match Games. If you are a game lover, just pay attention to this game range which has Red Dead Redemption Game Of The Year Edition, Professor Layton: and The Miracle Mask, Resident Evil: Revelations, Dragon’s Dogma: Dark Arisen, Fritz Chess 13, L.A. Noire: The Complete Edition and more.

Free Disney Infinity Playset Pack with a Starter Pack purchase
Get Free Disney Infinity Playset Pack when you purchase a Starter Pack for Xbox 360, PS3 or Wii.

The post Christmas Shopping – Are you Stuck for Ideas appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/christmas-shopping-stuck-ideas/feed 0
Preparing for an Upgrade – My Yosemite Experiencehttp://www.worldoweb.co.uk/2014/preparing-upgrade-yosemite-experience http://www.worldoweb.co.uk/2014/preparing-upgrade-yosemite-experience#comments Sun, 14 Dec 2014 20:52:03 +0000 http://www.worldoweb.co.uk/?p=7739 By Tracy Ridge

When a new operating system is released  you question yourself.  Do I really need an upgrade?  How easy is it?  Do I dive in or wait for the mass participation to die down?  Do I research blogs to find the good, bad and ugly, will it put me off? I guess the answer is all […]

The post Preparing for an Upgrade – My Yosemite Experience appeared first on WorldOWeb.

]]>
By Tracy Ridge

When a new operating system is released  you question yourself.  Do I really need an upgrade?  How easy is it?  Do I dive in or wait for the mass participation to die down?  Do I research blogs to find the good, bad and ugly, will it put me off? I guess the answer is all of them.  Here is my experience with my recent Yosemite upgrade on my 2-year-old Mac.

Computer Display

Image provided by SGM / Shutterstock.com

Preparing is key

I’m don’t necessarily suffer from OCD but having gone through the process of losing data many years ago.  I have always been an advocate of backing things up especially after my friend once had to pay over £600 to resurrect her personal photos after her hard drive failed. These days there are so many inexpensive and easy ways to backup your data there is no excuse for not doing it.  When I lost my data all those years ago I didn’t have any external drive or network drive (was too expensive),  services like Dropbox didn’t exist and your options were limited to backing up to CD’s, DVD’s or if you were fortunate enough to have a secondary hard drive.  Luckily the data I lost was minimal as I did frequent backups.

Key preparation is identifying what is important to you. It could be software you use daily, important files, collection of graphics or ebooks that you can’t live without.  My key items were Ampps (Web Development Server Software), Mail and being able to connect to my MyBookLive (NAS).  These important key items are always backed up manually by exporting all of my emails from Apple Mail in .mbox format and copying the entire Ampps Folder in Applications then pasting them into my personal folder on my NAS.  If I couldn’t access my Time Machine Backup after upgrade I know I have these files available to work with.  After backing up manually I did a full Time Machine backup.

Research

I kept an eye on Yosemite development since it was made public,  I opted out for testing as my Mac is my primary computer, although my PC with Linux Mint is a very close 2nd, I certainly didn’t want unnecessary risk of vital apps not working.   I was happy to read plenty of articles, both positive and negative on the new features or any reported problems.  The positives outweighed the negatives for me.  I enjoy looking at screenshots but I never judged the book by its cover.  For me it’s the stuff that it’s built on and not the aesthetics.  The real test is when it’s installed!

After my last upgrade (Mountain Lion -> Mavericks) I decided to start afresh and install Yosemite on a clean wiped hard drive.  This is more time-consuming than a normal upgrade but for me after 2 years it was much-needed.

I had looked at several tutorials on the web and came across the mashable one which I decided to follow.  I first downloaded Yosemite and installed DiskMaker X to create my bootable USB.  On reboot I wiped my drive and started the installation which ran rather smoothly and I didn’t encounter any problems.

Installation and Restoring Data/Accounts

On reboot I really liked the look of Yosemite and it’s new polished flatter design, like I said before it’s not all about the looks it how the OS performs.  The first port of call was to add all my accounts. Windows Live, Yahoo, Facebook, Twitter and LinkedIn all worked flawlessly.  Gmail on the other hand kept prompting me for an application specific password, despite creating one.

Google Account Password Screenshot

The 2nd attempt I tried to get access to my account through Safari, which prompted me to add the account.  This was great but unfortunately the apps box appeared directly over the authentication box which required an input (Code from my mobile phone) to go ahead with no option to minimise it.  I had to force quit safari.

Google Safari Bug Screenshot

The 3rd attempt was to try to add the account to Mail app which worked thankfully although I had continuous problems with the outgoing SMTP server which wouldn’t accept my created password, thankfully this was resolved in the 10.10.1 update shortly after.

My computer recognised that I had a NAS on my network so it was time to use the Migration Assistant to migrate some apps and data from my Time Machine Backup.  Migration Assistant recognised that I had a storage device but failed to display any backups.  I had to mount my Time Machine backup manually in finder to restore my apps and data.

New Features

Some of the key features that prompted me to upgrade was the closer interaction with other iOS devices (iPad/iPhone).  The handoff feature which requires being on the same network and bluetooth enabled, lets you start something, like composing an email, on one device and finish it off in Yosemite and vice versa.  Obviously you need handoff compatible apps but as things progress I am sure we will see more of these.

Spotlight which I rarely used in Mavericks has been beefed up, now in the center of the screen displaying far more information, previewing of files, interacting with Wikipedia and displaying map info.  Apple have certainly got spotlight spot on.  Will it convert people from Alfred or Quicksilver, who knows!

The best feature for Mail is now being able to send bigger attachments via iCloud automatically, similar to Dropbox and providing that you have the right amount of space available you will not have any issues with email attachments again.

Conclusion

Despite the few problems initially I am very happy with the performance I get from my Mac and after using Yosemite for a month now I am glad I waited a few weeks before taking the big step.  After reading all the problems with WiFi that people were reporting I haven’t had any such issue.

There are risks associated with any Operating System Upgrade, researching, preparing and always having the mindset to backup and have different methods of doing the same thing can be the difference between getting things done or throwing your computer out of the window.  Patience is definitely a virtue!

The post Preparing for an Upgrade – My Yosemite Experience appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/preparing-upgrade-yosemite-experience/feed 0
WOW Playground – PHP Checkboxes Revisitedhttp://www.worldoweb.co.uk/2014/wow-playground-php-checkboxes-revisited http://www.worldoweb.co.uk/2014/wow-playground-php-checkboxes-revisited#comments Sat, 29 Nov 2014 21:22:29 +0000 http://www.worldoweb.co.uk/?p=7802 By Tracy Ridge

Having checked back at some of my popular PHP and jQuery posts I decided to create WOW playground which unites all of my previous checkboxes and radio button form tutorials into one handy script.  I have updated to newer, modern technologies like HTML5, CSS3 and PDO, to handle the database.  jQuery and jQuery UI have […]

The post WOW Playground – PHP Checkboxes Revisited appeared first on WorldOWeb.

]]>
By Tracy Ridge

Having checked back at some of my popular PHP and jQuery posts I decided to create WOW playground which unites all of my previous checkboxes and radio button form tutorials into one handy script.  I have updated to newer, modern technologies like HTML5, CSS3 and PDO, to handle the database.  jQuery and jQuery UI have been updated to the latest versions with a few new features and the odd tweak here and there.

Image of Web Form

Image provided by Shutterstock

The playground features all the code from these posts in one handy page.

PHP and jQuery checkbox array with a hint of Jquery UI

Getting to grips with PHP Checkboxes

Getting to grips with PHP Radio Buttons

jQuery Disable and Enable Form Elements Using a Checkbox

Prerequisites

PHP MySQL server with PDO extension.  I’ve tested it in PHP 5.3+

Download

Version 1.0 released 29th November 2014

Download WOW Playground

Installation

Simply upload to your server or testing server.  Add your database connection details into class-databasehelpers.php.   Navigate to wow_playground/php/setup.php with your web browser and hit Setup to install the MySQL tables.  You will automatically redirected to the index page.  Please note that setup.php will be renamed automatically.

Features

The PHP code has now been cleaned up from the main page and is in the PHP folder.  fetch.php interacts with the database by fetching the information and process.php, you guessed it, processes the information from the forms and saves it to the database. jQuery and jQuery UI has been updated and as a result some deprecated functions have been removed.  For the design I have integrated CSS from the Kube Web Framework.  As for the new features I have added a button which will add a new checkbox to PHP and jQuery checkbox array demo.  I have also added a save button which will save them to the database. I have added comments throughout the code for clearer understanding.

If you encounter any problems or would like to suggest something to add then please get in touch.

The post WOW Playground – PHP Checkboxes Revisited appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/wow-playground-php-checkboxes-revisited/feed 0
The Knitting Pattern That Caused Me Grief!http://www.worldoweb.co.uk/2014/knitting-pattern-caused-grief http://www.worldoweb.co.uk/2014/knitting-pattern-caused-grief#comments Thu, 13 Nov 2014 23:31:53 +0000 http://www.worldoweb.co.uk/?p=7745 By Tracy Ridge

As bizarre as this title sounds I haven’t taken up knitting as a hobby. Recently I was called by my friend whose Windows Vista computer had shut down on her and refused to restart. Being slightly curious I paid her a visit to be greeted with a computer that had gone into hyper hibernation mode. […]

The post The Knitting Pattern That Caused Me Grief! appeared first on WorldOWeb.

]]>
By Tracy Ridge

As bizarre as this title sounds I haven’t taken up knitting as a hobby. Recently I was called by my friend whose Windows Vista computer had shut down on her and refused to restart. Being slightly curious I paid her a visit to be greeted with a computer that had gone into hyper hibernation mode. A simple long press of the power button turned it off and boy what was I greeted with when I restarted it.

Malware Detected Image

Image provided by Shutterstock

When it first loaded Windows, it appeared OK then I saw a couple of command prompt windows which started and soon went off. Having seen this before on my computer it could have been harmless but I thought I would check it out.

My first port of call was to check the Program Files folder in the main hard drive, usually C: I noticed that there were some programs that had been installed a few days before. I asked my friend if she had installed anything and she replied that she had downloaded some knitting patterns.

I checked out her downloads folder to find the culprit crazyforcrafts.exe. Unfortunately she had installed it thinking it was a knitting pattern generator of some sort.  When it was installed on her computer it disabled her firewall and security center so she didn’t know she had no firewall as there was no warnings as a result. The program ran as a system service so every time she started her computer it ran, probably installing other bad stuff along the way.

Safe Mode to the Rescue

Without any hesitation I booted it into safe mode by pressing and holding F8 on reboot. Did a full system scan with Malwarebytes which found 2000+ items of trojans, malware and potentially unwanted programs (PUP) on her system. Also ran a scan with Spybot and Microsoft Security essentials, which despite being a Microsoft App, had actually caught some of it.

Conclusion

I guess the moral of the story is never trust what you are downloading, unless it’s from an official website or a reputable company. Not everything is what it says it is!

The post The Knitting Pattern That Caused Me Grief! appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/knitting-pattern-caused-grief/feed 0
Adding Google Charts to WordPress Blog Part 2http://www.worldoweb.co.uk/2014/adding-google-charts-wordpress-blog-part-2 http://www.worldoweb.co.uk/2014/adding-google-charts-wordpress-blog-part-2#comments Fri, 10 Oct 2014 11:49:04 +0000 http://www.worldoweb.co.uk/?p=7689 By Tracy Ridge

In this mini-series of Google Visualization tutorials we will be adding a Google chart to a WordPress theme without having to install any plugins but ensuring that we use the correct WordPress functions and recommended safe way of implementing JavaScript. The data we will be pulling will be in JSON format and will be stored […]

The post Adding Google Charts to WordPress Blog Part 2 appeared first on WorldOWeb.

]]>
By Tracy Ridge

In this mini-series of Google Visualization tutorials we will be adding a Google chart to a WordPress theme without having to install any plugins but ensuring that we use the correct WordPress functions and recommended safe way of implementing JavaScript. The data we will be pulling will be in JSON format and will be stored on the same server inside the theme directory.  In this tutorial we will be adding  a stacked column chart.  Want to add a table?  Checkout part 1

Image of Stacked Column Chart

Image provided by Shutterstock

Prerequisites

Access to your WordPress theme folder.
A little knowledge of PHP and WordPress functions is useful but not required.

Download

Download

Let’s get started

In the Download above there is an example  of a correctly formatted JSON file (Purely fictional of course) which we will use to populate our data to create our chart. Upload the js and data folder to your WordPress theme folder.  If using a Child Theme upload to that folder rather than the parent.

Ajax in the head

Before we start to enable our ajax event to fire when non-admin users look at the page.  Open up header.php and check to see if ajaxurl is defined.  If not add the following  just above the wp_head() function.

<?php if (!is_admin()){?>
   		<script type="text/javascript">
    		var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
		</script>
	<?php }?>

Add the Chart container to the Blog Post/Page

Naturally you can’t have a chart without a container!  In your blog post or page add the following

<div id="chart_div" class="chart"></div>

Enqueue Our scripts

To add the JavaScript to our WordPress blog we need to officially enqueue our scripts so that they are present for the chart to load.  Open up functions.php and add the following and save (Don’t close yet).   Please note the comments at the top.

/*
*Enqueue Scripts for our chart
* 
*Optional:  
****1. Limit our table to display on a single page  - http://codex.wordpress.org/Function_Reference/is_page
****2. If you are WORKING with a child theme replace all instances of get_template_directory_uri()
****	with get_stylesheet_directory_uri()
***/

function fundraising_chart(){

	
//if (is_page('page_name')){
	wp_enqueue_script('chart', 'https://www.google.com/jsapi');
	wp_enqueue_script('chart_main', get_template_directory_uri() . ' /js/fundraising.min.js', array('jquery'));
//}
	
}

/*Add Javascript Action and our ajax actions that will be used in the fundraising chart script  */
	add_action( 'wp_enqueue_scripts', 'fundraising_chart' );

The Google Visualization library is quite heavy and unnecessary to load on each individual page or post.  Simply uncomment Lines 13 & 16 to only load the JavaScript on a specific page, replacing page_name with the Page ID, Page Title or Page Slug.  If you are displaying  your chart in a blog post replace is_page() with  is_single()   See is_page() and is_single() on the WP Codex for further details.

Build Table Action

With the JavaScript files added we now need to add the following to functions.php which is the ajax action that is called from the JavaScript file.  The build_graph function works a little differently to the build_table function in Part 1.  After we have retrieved the JSON file we decode it and add all the values together for each category ie; school and our events.  We then re-encode it to be parsed by JavaScript.  This can also be done with JavaScript if required.

add_action( 'wp_ajax_build_graph', 'build_graph' );//admin
	add_action('wp_ajax_nopriv_build_graph', 'build_graph');//frontend

function build_graph() {
	
	$url = get_template_directory_uri() .'/data/donations.json';

	$request =   wp_remote_post($url);
	// Get the body of the response
	$response = wp_remote_retrieve_body( $request );
		
		/*function get_sum will add all the amounts together and return the sum*/
		function get_sum($json){
			$keys = array();// Creates a new variable as an array
				foreach( $json as $key){//loops through the sections
  					$sum[] = $key['amount'];//finds all amount values  and adds them to an array
				}
			return array_sum($sum);//adds the all the values together
		
		}
	
		$myJson= json_decode($response, true);//decode file as an array
	
		$company = get_sum($myJson['Company']);
		$ct = get_sum($myJson['Collection Tins']);
		$ourevents = get_sum($myJson['Our Events']);
		$individual = get_sum($myJson['Individual']);
		$misc = get_sum($myJson['Miscellaneous']);
		$school = get_sum($myJson['School']);
		
/*echo json encoded array*/
echo json_encode(
	array(	'company'=>$company,
			'ct'=>$ct,
		  	'ourevents'=>$ourevents,
		  	'individual'=>$individual,
		  	'misc'=>$misc,
		  	'school'=>$school));

die();//required for ajax
	
}?>

Fundraising.js

When your page or post loads the action build_graph is fired in functions.php. If successful it will load the contents of the JSON file and add them to the row (line 37)

var $j = jQuery;

// Load the Visualization API and the chart package.
google.load("visualization", "1", {packages:["corechart"]});

// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);


/*Create our Chart through an Ajax request by passing the build_graph action which will be parsed with the build_gaph function in functions.php*/

function drawChart() {
	$j.ajax({
		url: ajaxurl,
		data: {
			"action": "build_graph" //run build_graph function in functions.php
		},
		dataType: "json",
		success: function (data) {
			/*data[''] represents the json data */
			var company = data.company;
			var ct = data.ct;
			var ourevents = data.ourevents;
			var individual = data.individual;
			var misc = data.misc;
			var school = data.school;

			// Create the data table.
			var data = new google.visualization.DataTable();
			data.addColumn('string', 'Name');
			data.addColumn('number', 'Our Events');
			data.addColumn('number', 'Individual');
			data.addColumn('number', 'Company');
			data.addColumn('number', 'School');
			data.addColumn('number', 'Miscellaneous');
			data.addColumn('number', 'Collection Tins');
			data.addRow([null, ourevents, individual, company, school, misc, ct]);
			// Set chart options
			var options = {
				//'width':600, //unhighlited width to allow for responsive graph - see CSS file in source
				'height': 600,
				'allowHtml': true,
				'is3D': true,
				hAxis: {
					title: 'Types of Donations'
				},
				vAxis: {
					format: 'u00A3'
				},
				'isStacked': true
			};
			var formatter = new google.visualization.NumberFormat({
				prefix: "u00A3"
			});
			formatter.format(data, 1);
			formatter.format(data, 2);
			formatter.format(data, 3);
			formatter.format(data, 4);
			formatter.format(data, 5);
			formatter.format(data, 6);

			// Instantiate and draw our chart, passing in some options.
			var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
			chart.draw(data, options);

		}
	});
}

/*The following will resize the chart in the browser*/
$j(window).resize(function () {
	drawChart();
});

Add a little CSS Spice

Open up your theme’s stylesheet and add the following to make your chart responsive.

.chart {
	width: 100%;
}

 Conclusion

If you have followed all steps correctly you should now have a fully functioning Google Chart.  If you have any problems with the code or don’t quite understand something please feel free to use the comment section below.

Example of Google Charts

 

 Further Reading

The post Adding Google Charts to WordPress Blog Part 2 appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/adding-google-charts-wordpress-blog-part-2/feed 0
Adding Google Charts to WordPress Blog Part 1http://www.worldoweb.co.uk/2014/adding-google-charts-wordpress-blog-part-1 http://www.worldoweb.co.uk/2014/adding-google-charts-wordpress-blog-part-1#comments Fri, 10 Oct 2014 11:39:32 +0000 http://www.worldoweb.co.uk/?p=7610 By Tracy Ridge

In this mini-series of Google Visualization tutorials we will be adding a Google chart to a WordPress theme without having to install any plugins but ensuring that we use the correct WordPress functions and recommended safe way of implementing JavaScript. The data we will be pulling will be in JSON format and will be stored […]

The post Adding Google Charts to WordPress Blog Part 1 appeared first on WorldOWeb.

]]>
By Tracy Ridge

In this mini-series of Google Visualization tutorials we will be adding a Google chart to a WordPress theme without having to install any plugins but ensuring that we use the correct WordPress functions and recommended safe way of implementing JavaScript. The data we will be pulling will be in JSON format and will be stored on the same server inside the theme directory.  In this tutorial we will be adding a table. Want to add a chart?  Checkout part 2

JSON - Creating a Google Chart

Image provided by Shutterstock

Prerequisites

Access to your WordPress theme folder.
A little knowledge of PHP and WordPress functions is useful but not required.

Download

Download

Let’s get started

In the Download above there is an example  of a correctly formatted JSON file (Purely fictional of course) which we will use to populate our data to create our table. Upload the js and data folder to your WordPress theme folder.  If using a Child Theme upload to that folder rather than the parent.

Ajax in the head

Before we start to enable our ajax event to fire when non-admin users look at the page.  Open up header.php and check to see if ajaxurl is defined.  If not add the following  just above the wp_head() function.

<?php if (!is_admin()){?>
   		<script type="text/javascript">
    		var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
		</script>
	<?php }?>

Add the Chart container to the Blog Post/Page

Naturally you can’t have a chart without a container!  In your blog post or page add the following

<div id="table_div" class="chart"></div>

Enqueue Our scripts

To add the JavaScript to our WordPress blog we need to officially enqueue our scripts so that they are present for the table to load.  Open up functions.php and add the following and save (Don’t close yet).   Please note the comments at the top.

/*
*Enqueue Scripts for our chart
* 
*Optional:  
****1. Limit our table to display on a single page  - http://codex.wordpress.org/Function_Reference/is_page
****2. If you are WORKING with a child theme replace all instances of get_template_directory_uri()
****	with get_stylesheet_directory_uri()
***/

function fundraising_chart(){

	
//if (is_page('page_name')){
	wp_enqueue_script('chart', 'https://www.google.com/jsapi');
	wp_enqueue_script('chart_main', get_template_directory_uri() . ' /js/fundraising.min.js', array('jquery'));
//}
	
}

/*Add Javascript Action and our ajax actions that will be used in the fundraising chart script  */
	add_action( 'wp_enqueue_scripts', 'fundraising_chart' );

The Google Visualization library is quite heavy and unnecessary to load on each individual page or post.  Simply uncomment Lines 13 & 16 to only load the JavaScript on a specific page, replacing page_name with the Page ID, Page Title or Page Slug.  If you are displaying  your chart in a blog post replace is_page() with  is_single()   See is_page() and is_single() on the WP Codex for further details.

Build Table Action

With the JavaScript files added we now need to add the following to functions.php which is the ajax action that is called from the JavaScript file.

add_action( 'wp_ajax_build_table', 'build_table' );//admin
	add_action('wp_ajax_nopriv_build_table', 'build_table');//frontend




function build_table() {
	
	//Our json file in data folder
	$url = get_template_directory_uri() .'/data/donations.json';
	
	//Retrieve json file
	$request =   wp_remote_post($url);
	
	// Get the body of the response
	$response = wp_remote_retrieve_body( $request );
	
	echo $response;
	die();
}
?>

Fundraising.js

When your page or post loads the action build_table is fired in functions.php. If successful it will load the contents of the JSON file and add them to the row (line 28)

var $j = jQuery;

// Load the Visualization API and the piechart package.

google.load("visualization", "1", {packages:["table"]});

// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawTable);


function drawTable() {
	$j.ajax({
		url: ajaxurl,
		data: {
			"action": "build_table" //this is the function called in functions.php
		},
		dataType: "json",
		success: function (json) {

			var data = new google.visualization.DataTable();
			data.addColumn('string', 'Name');
			data.addColumn('string', 'Type');
			data.addColumn('number', 'Amount');

			/*loop through json and add rows of content */
			for (var x in json) {
				for (var i = 0; i < json[x].length; i++) {
					data.addRow([json[x][i].name, x, json[x][i].amount, ]);
				}
			}

			var options = {
				'sortColumn': 2,
				'sortAscending': false,
				'allowHtml': true,
				'pageSize': 10,
				'page': 'enable'
			};
			var formatter = new google.visualization.NumberFormat({
				prefix: "u00A3"
			});
			formatter.format(data, 2);
			var table = new google.visualization.Table(document.getElementById('table_div'));
			table.draw(data, options);

		}
	});


}
/*The following will resize the table in the browser*/
$j(window).resize(function () {
	drawTable();
});

Add a little CSS spice

Open up your theme’s stylesheet and add the following to make your table responsive.

.chart {
	width: 100%;
}

 Conclusion

If you have followed all steps correctly you should now have a fully functioning Google Chart table.  If you have any problems with the code or don’t quite understand something please feel free to use the comment section below.

Example of Google Chart Table

 Further Reading

The post Adding Google Charts to WordPress Blog Part 1 appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/adding-google-charts-wordpress-blog-part-1/feed 0
MultCloud – Access all of Your Cloud Driveshttp://www.worldoweb.co.uk/2014/multcloud-access-cloud-drives http://www.worldoweb.co.uk/2014/multcloud-access-cloud-drives#comments Thu, 04 Sep 2014 21:39:47 +0000 http://www.worldoweb.co.uk/?p=7540 By Tracy Ridge

Multcloud is a convenient way of accessing multiple online cloud drives through the web, with no software installations neccessary, MultCloud can be convenient when travelling from office to home or have several computers in which you work from. With support for services like Dropbox, Box, Amazon S3, Google Drive, OneDrive, SugarSync, Copy, Bitcasa, CloudMe, Cubby, […]

The post MultCloud – Access all of Your Cloud Drives appeared first on WorldOWeb.

]]>
By Tracy Ridge

Multcloud is a convenient way of accessing multiple online cloud drives through the web, with no software installations neccessary, MultCloud can be convenient when travelling from office to home or have several computers in which you work from. With support for services like Dropbox, Box, Amazon S3, Google Drive, OneDrive, SugarSync, Copy, Bitcasa, CloudMe, Cubby, MyDrive, WEB.de, Yandex, HiDrive, Baidu as well as support for FTP and WebDav you can copy, move, preview, download files from one drive to another with ease.

The Cloud

Image provided by Shutterstock

What Multcloud Has To Offer

MultCloud and is 100% free with no traffic restrictions. With multiple accounts supported there is no limit on how many drives from the same provider you can add so you are able to add multiple Google Drives etc.  If you are conscious about security all connections and transfers are encrypted for SSL using 256-bit AES and Multcloud does not cache your data or files on their servers. Cloud drives are accessed using OAuth authorisation and does not save your passwords.

On Test

MultCloud has a very simple registration process. Simply go to https://www.multcloud.com/ and fill out your email, username and password, complete the verification box and click create account. After you hit create account you should receive an email to verify your account. Once verified you can sign in and start adding your accounts immediately.  Simply click Add Cloud Drives then this will bring up a list of services available.

MultCloud Add Drive

After selecting the service of your choice hit Next which will bring you to a screen where you enter your email, password etc for that service (All services differ). After entering the required data, accept the permissions and you will see your newly added drive in the file manager on the left. Follow this process for the rest of your accounts. Within 5 minutes I had signed up and added 5 accounts so this process is really quick.

The interface, similar to any other file browser is very clean and simple with a handy right-click menu. I previewed some of my images in OneDrive, which decided to work unlike transferring files, and the image loaded pretty quickly on my 5MB internet connection.

MultCloud Preview

Files can be transferred quite easily by either dragging and dropping or by right clicking on the file/folder then selecting Copy To which enables you to select your target destination/folder.

Now for the real test. I transferred a small video, just over 132MB, from Google Drive to Dropbox which took less than 2 minutes, that is considerably quicker than if I uploaded it from my computer or copied it from Google’s own software.  I attempted to transfer the video to OneDrive too but came up with an error and failed to transfer, whether this is a problem with OneDrive itself, or just relative to the day of test, it certainly wouldn’t deter me from using the service.

Rating: 9/10

Pros

  • Fast
  • Easy to use
  • Drag & Drop
  • Useful context-menu
  • Extremely accessible through any web browser and an internet connection of course
  • Good Layout

Cons

  • Transfers to OneDrive, worked occasionally but not large files

Summary

If you want a 100% free service to get access to multiple cloud drives then MultCloud will do the trick. With the added protection of 256-bit AES encryption you are free to move your files around without having to install multiple file synchronisation software. People will no doubt be saying “What’s the Catch?”

The post MultCloud – Access all of Your Cloud Drives appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/multcloud-access-cloud-drives/feed 1
Mazwai – HD Video Resources for Web Designershttp://www.worldoweb.co.uk/2014/mazwai-hd-video-resources-web-designers http://www.worldoweb.co.uk/2014/mazwai-hd-video-resources-web-designers#comments Fri, 22 Aug 2014 11:43:05 +0000 http://www.worldoweb.co.uk/?p=7526 By Tracy Ridge

Mazwai is a new stock video website which only selects the very best of free HD videos online. The purpose of Mazwai is to help every web designer, blogger, creative and artist to find great video resources for their professional and personal projects. All the video clips, footage, and mini-film are available in HD under […]

The post Mazwai – HD Video Resources for Web Designers appeared first on WorldOWeb.

]]>
By Tracy Ridge

Mazwai is a new stock video website which only selects the very best of free HD videos online. The purpose of Mazwai is to help every web designer, blogger, creative and artist to find great video resources for their professional and personal projects.


Mazwai

All the video clips, footage, and mini-film are available in HD under the public domain or the Attribution license (CC 3.0) which means that you can do everything with the video (transform, adapt, cut, share) as long as you do not forget to credit the original author in some way. There is no subscription and no download limitation.

How to use Mazwai

  • Simply click on the preview you like
  • Watch the video on the embed player
  • Simply download the video. You will receive a .zip including a .mp4 and .webm version.

If the video isn’t what you’re looking for, just simply close the player and browse the many other previews on offer. New videos added regularly to expand the choice.

The post Mazwai – HD Video Resources for Web Designers appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/mazwai-hd-video-resources-web-designers/feed 0
Top 20 WordPress Development Blogs to Followhttp://www.worldoweb.co.uk/2014/top-20-wordpress-development-blogs-follow http://www.worldoweb.co.uk/2014/top-20-wordpress-development-blogs-follow#comments Mon, 11 Aug 2014 19:44:10 +0000 http://www.worldoweb.co.uk/?p=7363 By Tracy Ridge

I haven’t posted anything about WordPress for a while so I thought I would start off with my Top 20 WordPress Development blogs. If you can’t find what you are looking for on the ever-expanding WP Codex or you simply just don’t understand it then you will find loads of hints, tips and resources in […]

The post Top 20 WordPress Development Blogs to Follow appeared first on WorldOWeb.

]]>
By Tracy Ridge

I haven’t posted anything about WordPress for a while so I thought I would start off with my Top 20 WordPress Development blogs. If you can’t find what you are looking for on the ever-expanding WP Codex or you simply just don’t understand it then you will find loads of hints, tips and resources in the following sites to cover all aspects of your WordPress life. If I have not mentioned your favourite then feel free to add it to the comments section or fire me a tweet @ridgey28.

WordPress

Image provided by 360b / Shutterstock.com

Manage WP

Manage WP has been around a few years. They have a premium WordPress plugin that manage multiple WordPress sites.  They also have a blog which have loads of resources and tutorials from developing plugins and themes to their hot picks of the month.
Manage WP Blog

WP Engineer

WP Engineer is a dedicated WordPress Blog which was created by 3 WP Super Fans. The dedicated WordPress blog is loaded with tips, tutorials and resources.
WP Engineer

WP Shout

Started in 2009 bu Fred and David,  WP Shout have lots of  WordPress tutorials and resources.
WP Shout

WP Tavern

WordPress Tavern, established in 2009, is a warm and inviting community site that is focused on all things WordPress, BuddyPress and bbPress
WP Tavern

Digging into WordPress

Digging into WordPress was created by Chris Coyier and Jeff Starr, the authors of Digging into WordPress book, who eat and breathe WordPress.
Digging Into WordPress

WP Explorer

WP Explorer is a haven of all things WordPress. Featuring Premium WordPress Themes and Plugins and a blog with news, tutorials, tips, snippets, SEO and security.
WP Explorer

WP Hacks

WP Hacks covers a variety of WordPress topics including themes, plugins, SEO and yes you guessed it hacks.
WordPress Hacks

WP Lover

WP Lover hasn’t posted anything for a while but you can still access tips and tutorials that cover a vast array of topics.
WP Lover

WP Arena

WordPress Arena is a place for WordPress Developers and Designers, providing Tips, tricks, tools and resources to build a website or blog on WordPress. They also feature a WordPress Showcase for all kind of WordPress Powered Websites.
WP Arena

WP Hub

WPHub review high quality premium plugins and themes. They also strive to create high quality and innovative WordPress tutorials.
WordPress Hub

WP Mayor

WP Mayor was founded in 2010 by Jean Galea, a WordPress developer. WP Mayor offers premium review services and has a community of content contributors posting tutorials covering many different WP topics.
WP Mayor

Pippins Plugins

Pippin covers only WordPress plugin development. His tutorials are very clear and precise and is an excellent alternative to the official codex.
Pippins Plugins

Winning WP

Winning WP covers every category you can possibly think of. It’s loaded with helpful resources from blogging, tutorials, marketing, design, security and much more.
Winning WP

WPLift

WPLift was founded in September 2010 by Oliver Dale, the founder of Kooc Media, to help people with WordPress by providing tutorials, theme roundups, plugin guides and general WordPress news.
WP Lift

WP Business Tips

WP Business Tips, sister to WP Shout, is designed to deliver quick, non-technical tutorials on the parts of WordPress you can really use for your business.
WP Business Tips

WP Beginner

WPBeginner is a WordPress resource site which was founded by Syed Balkhi in July 2009. The main goal of this site is to provide quality tips, tricks, hacks, and other resources for the WordPress community but in a helpful and clear format for beginners to understand.
WP Beginner

WPMU Dev

The WPMU DEV Blog provides news, tips, tutorials, and reviews on WordPress, BuddyPress and Multisite.
WPMU DEV

Paulund

Paul Underwood from Bristol, UK, created Paulund to collect all the resources and snippets to use in the future. He developed these into tutorials, describing how they work to help people learn. He mainly focuses on theme and plugin development but his resources are definitely worth checking out.
Paulund

Theme Lab

ThemeLab is a company that specializes in building easy to use premium WordPress themes to help you create a website as unique as you are without any code knowledge.
Theme Lab

Tom McFarlin

Tom is a WordPress developer who has published WordPress plugins. His personal blog is where he shares articles, notes, tips, and resources related to WordPress development.
Tom McFarlin

Bonus Websites – The Best of the Rest

Obviously there are more blogs out there than the above so here are the best of the rest

Other Resources worth checking out

Some of these blogs are dedicated to the world of Web Development in general but feature WordPress tutorials so they are definitely worth checking out.

The post Top 20 WordPress Development Blogs to Follow appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/top-20-wordpress-development-blogs-follow/feed 0
Smartphones – How To Find The Right OS For Youhttp://www.worldoweb.co.uk/2014/smartphones-find-right-os http://www.worldoweb.co.uk/2014/smartphones-find-right-os#comments Sun, 29 Jun 2014 22:14:28 +0000 http://www.worldoweb.co.uk/?p=7168 By Tracy Ridge

A few years ago I published why I would never buy an iPhone. Since then I have owned a HTC and Samsung Smartphone both using the Android OS. Do you think my opinion has changed? What has changed? The problems with Android  is that the majority of phones in the UK, no doubt same in other […]

The post Smartphones – How To Find The Right OS For You appeared first on WorldOWeb.

]]>
By Tracy Ridge

A few years ago I published why I would never buy an iPhone. Since then I have owned a HTC and Samsung Smartphone both using the Android OS. Do you think my opinion has changed?

Smartphone - Android OS

Image provided by Twin Design / Shutterstock.com

What has changed?

The problems with Android  is that the majority of phones in the UK, no doubt same in other countries too, come with a 2 year contract. In that 2 years you would expect to get security updates, possible even major upgrades from JellyBean (4.3) to KitKat (4.4) especially if it’s announced that your phone will receive an update.

My Experience

My first smartphone was a HTC Desire HD which came with Android 2.2 (Froyo) and was eventually upgraded to Android 2.3 (Gingerbread). As HTC didn’t plan on upgrading the phone to 2.4 (Ice Cream Sandwich) I did just that and installed a custom rom. My daughter now uses the phone and the battery life has improved dramatically after removing all the crap that both HTC and Vodafone had bundled in with it. I have owned a Samsung Galaxy Note 2 for the past 18 months, running Android 4.3 (Jelly Bean) after the initial update from 4.2. The phone was reported to be updated to 4.4 (Kit Kat) last October and so far I am still stuck on 4.3. On that note (pardon the pun) the so-called Smartphone still doesn’t work correctly. I am unable to answer calls 90% of the time, the screen comes on by itself which makes it extremely hot and drains the battery. The touch screen is unresponsive at times, leaving me to switch it off and back on again to get it to work.

What Frustrates Me

In a cut-throat society manufacturers are quick to add new models to their line, which is understandable. The only downsides to this is that your phone becomes discontinued when you have only had it for 2 months, you are forgotten about. The software is no better, how many phones are running software that is no longer being developed? Software that can be targeted by malware, viruses and hacking! Think of your Android software being similar to Windows XP now that Microsoft no longer supports it.

Smartphone - iPhone

Image provided by Pedro II / Shutterstock.com

Now I know that Apple are far from being perfect but at least their update process is more pleasing, they will support the phone long after it has been discontinued. When they release iOS 8, this year, they will support the iPhone 4S which was released back in 2011.

As Always There Are Alternatives

Install a custom rom – As Android is Open Source developers are free to use the source code to build and develop there own custom versions. There are lots of custom roms available, depending on which phone you now have, although Cyanogen and MIUI are quite popular.

There are downsides to installing Custom roms. It invalidates your warranty is probably the biggest problem to deal with however if you install one correctly you can achieve a better user experience, remove bloatware, improve battery life and much more. I do recommend that if you wish to choose this pathway then please don’t ignore any steps in the instructions or otherwise your phone may become as useful as a house brick!

Firefox OS Firefox, one of the oldest and most popular browsers have released an OS which is available on several phones. Firefox OS is an adaptive phone, it has all the basic functionality of any other smartphone, for instance a camera, music player, messaging etc but it also comes with a adaptive search feature which makes it easy to access what you want. Although I haven’t tested one out yet I reckon Firefox would be good with the older generation (like my mum, don’t tell her that) that find Android far too confusing.

Windows Phones – Currently you will find them mainly on Nokia Lumia smartphones (no surprises as Microsoft own Nokia) although there are HTC, Samsung and Huawei models. If you are familiar with the tiled appearance in a Microsoft Windows 8 OS then this may be the smartphone for you. Fingers crossed that security has improved over the years.

Ubuntu Phones – With Ubuntu becoming ever more popular, especially after the demise of Windows XP, they have decided to branch out in the smartphone and tablet department. At the time of writing this canonical are working with several mobile phone carriers so no doubt we can look forward to a new arrival soon.

Blackberry
BlackBerries were more commonly used in the business sector until a few years ago when the BlackBery Curve, with its distinct keyboard, became popular among your average Joe. Unfortunately things started to go a little pear shaped as Android and Apple dominated. Thankfully Blackberry fought back and gave users what they always wanted, a smartphone. They only have a small percentage in the market share but if you are looking for a secure phone then look no further.

Conclusion

No doubt Android and Apple control the market share of all smartphones out there. If you need lots of choices in the games and applications department then they will be suitable. However if you want to use the same phone for 2 years + and have all the updates then Apple iPhone may be more suitable. If you are a ‘Just want a bloody phone person’ without all the hassle of thousands of applications then one of the alternatives may be more useful. In my opinion after having an Android phone for nearly 4 years I’m leaning towards an iPhone at this current time as I would rather have a break than a KitKat!

The post Smartphones – How To Find The Right OS For You appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2014/smartphones-find-right-os/feed 1