WorldOWeb http://www.worldoweb.co.uk Resources tutorials and inspiration on Linux, Web Design, WordPress, PHP, jQuery and Open Source. Sat, 16 May 2015 20:49:05 +0000 en-US hourly 1 I’m Joining Team Alfie for the Kiltwalk – Please Sponsorhttp://www.worldoweb.co.uk/2015/im-joining-team-alfie-for-the-kiltwalk-please-sponsor http://www.worldoweb.co.uk/2015/im-joining-team-alfie-for-the-kiltwalk-please-sponsor#comments Sun, 10 May 2015 22:19:47 +0000 http://www.worldoweb.co.uk/?p=8030 By Tracy Ridge

On Saturday 7th June  I along with my daughter and many others will be participating in the Kiltwalk to raise money for Alfie’s Trust, which was set up to fund research into a rare incurable disease called Lymphangiomatosis.  The disease causes benign tumours to grow anywhere in the body which cannot be removed or shrunk […]

The post I’m Joining Team Alfie for the Kiltwalk – Please Sponsor appeared first on WorldOWeb.

]]>
By Tracy Ridge

On Saturday 7th June  I along with my daughter and many others will be participating in the Kiltwalk to raise money for Alfie’s Trust, which was set up to fund research into a rare incurable disease called Lymphangiomatosis.  The disease causes benign tumours to grow anywhere in the body which cannot be removed or shrunk using chemotherapy.

Alfie’s Trust was set up in September 2011 by Alfie’s parents to raise awareness of this rare disease and raise funds for research. In May 2012 Alfie’s Trust became a registered charity. We will continue to raise money to help fund research being carried out through the Lymphangiomatosis and Gorham’s Disease Alliance in America (LGDA). There is currently no support network or research based in the UK. Research is vital in order to give sufferers a future.

Watch the Video

This short video, featuring Alfie, details the effects of Lymphangiomatosis and what Alfie’s Trust has done since it was set up.

Sponsor – Aberdeen Kiltwalk

If you want to see me in a kilt (Scary Thought and it’s bound to rain!) then please consider sponsoring Team Alfie at Virgin Money Giving. However small your donation is always appreciated.

Sponsor me on Virgin Money Giving

The post I’m Joining Team Alfie for the Kiltwalk – Please Sponsor appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2015/im-joining-team-alfie-for-the-kiltwalk-please-sponsor/feed 0
Review – Sleep Cycle iPhone Apphttp://www.worldoweb.co.uk/2015/review-sleep-cycle-iphone-app http://www.worldoweb.co.uk/2015/review-sleep-cycle-iphone-app#comments Wed, 06 May 2015 15:11:50 +0000 http://www.worldoweb.co.uk/?p=7994 By Tracy Ridge

Over the years smartphones are more sophisticated and so too are the apps that you can purchase for them. Having had a pretty tough time lately, sleep was one of the things that was affected in a big way. Having barely slept in January and struggling to get back into a pattern of having several hours sleep […]

The post Review – Sleep Cycle iPhone App appeared first on WorldOWeb.

]]>
By Tracy Ridge

Over the years smartphones are more sophisticated and so too are the apps that you can purchase for them. Having had a pretty tough time lately, sleep was one of the things that was affected in a big way. Having barely slept in January and struggling to get back into a pattern of having several hours sleep in one go, waking up groggy and disinterested in life as a result. In the beginning of March I decided to buy an iPhone app to monitor my sleep (or lack of), something that I would say I was quite pessimistic about to start with but would the app have any effect?

I Love Sleep Image

Image provided by Shutterstock

Having searched the Mac App Store I came across Sleep Cycle Alarm (also available on Android) from Northcube and decided to give it a whirl so I took the plunge and downloaded the Sleep Cycle Bundle which also came with Heart Rate and Power Nap for £2.49.

Now like I say I was slightly skeptical at first. My pattern of sleep before my life changing moment was pretty good despite the odd bout insomnia and frequent anaemia. I often went to bed at the same time each night and rudely awoken by my alarm at the same time each morning. I would often wake up groggy after hitting snooze several times and would usually take me a couple of hours to wake up fully.

Quick Rundown of Sleep Cycle

Sleep Cycle monitors movement during sleep using the accelerometer in your iPhone when positioned on your mattress in a way that it is not blocked by pillows etc.

On setting the alarm Sleep Cycle find the optimal time to wake you up during a 30 minute window. So if you set your alarm to get up at 7.30 at the latest, it monitors at which is your lightest phase of sleep and gently awakens you.

Main Features

  • Detailed sleep statistics and sleep graphs for every night.
  • 15 carefully selected, high quality, alarm melodies.
  • Use iPod music as wake up sound.
  • Snooze by shaking or tapping the phone lightly.
  • Customizable wake up window. From instant (regular alarm clock) up to 90 minutes.
  • Background mode – set your alarm and exit Sleep Cycle – sleep analysis will continue in the background
  • Sleep aid – helps you fall asleep. The intelligent mode detects when you fall asleep and automatically fades the sleep aid sound.
  • Support for the M7 and M8 co-processor – measure your daily physical activity and calculate how it affects your Sleep quality
  • Health app – fully integrated with the Health app introduced in iOS8. Submits sleep analysis and heart rate. Downloads other data such as fitness information to be considered in your nightly Sleep Quality
  • Adaptive design – ready for all screen sizes
  • Heart rate monitor – measure you’re resting heart rate (RHR) every morning using the camera and flash in your device
  • Philips HUE light bulb support – simulate a natural sunrise to give you an even softer wake-up
  • Sleep notes – see how events such as drinking coffee, eating too much or having a stressful day affect your sleep quality
  • Long term graphs – track sleep quality over time, see which days of the week you sleep best and much more
  • Export sleep data to Excel for detailed analysis

So far I have found the sleep cycle app to be really helpful in waking me up in the morning without the groggy feeling.  Over the past few weeks I’ve had anaemia, which have hindered my progress but prior to this I have often woke up even before my alarm was due to go off and when I’ve checked my statistics and the higher the sleep quality the better I feel.

Rating: 9/10

Pros

  • Good value
  • Plenty of statistics and graphs, if you like that sort of thing
  • Can help you establish a good pattern of sleep
  • Works in conjunction with the iOS 8 built-in health app to accurately work out how activity can affect your sleep pattern
  • Weekend mode, so no need to set your alarm to monitor your sleep

Cons/Suggestions

  • Requires the charger – although you are more than likely going to have the phone on charge in any case
  • Would be good to enhance weekend mode to days you specify for people who may not need to get up during the week.

Summary

This is not a cure for sleep disorders but if you wake up feeling like you haven’t slept, even though you have or you are like me and have previously been woken at a time where you are in a deep sleep, resulting in constant snooze bashing, then this app may be of some use. Having some prior use of the Phillips Wake-Up light alarm clock, that my beloved bought me, sleep cycle beats it hands down and at a fraction of the price.

The post Review – Sleep Cycle iPhone App appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2015/review-sleep-cycle-iphone-app/feed 0
iPhone Messages – Block Nuisance Numbershttp://www.worldoweb.co.uk/2015/iphone-messages-block-nuisance-numbers http://www.worldoweb.co.uk/2015/iphone-messages-block-nuisance-numbers#comments Mon, 09 Mar 2015 22:25:59 +0000 http://www.worldoweb.co.uk/?p=7955 By Tracy Ridge

If you are like me and you are fed up of receiving those annoying nuisance text messages to claim for the accident you have never had, PPI, bank refunds then instead of ignoring them, block them easily with this easy to follow picture tutorial and banish the bad boys for good. Let’s Begin Tap on […]

The post iPhone Messages – Block Nuisance Numbers appeared first on WorldOWeb.

]]>
By Tracy Ridge

If you are like me and you are fed up of receiving those annoying nuisance text messages to claim for the accident you have never had, PPI, bank refunds then instead of ignoring them, block them easily with this easy to follow picture tutorial and banish the bad boys for good.

Picture of iPhone with nuisance caller phoning

Image provided by Shutterstock

Let’s Begin

iPhone - Home Screen

Tap on Messages


 

iPhone - Messages Screen

Tap anywhere on the message where you want to block the sender


iPhone - Nuiscance Message

Tap Details

Even though this message gives you an option to opt-out I would always be hesitant in clicking it as this may increase the number of calls or messages you get from them or other companies as they may sell your number on.  Be aware that these companies will do anything to get you to show an interest and will not stop!


iPhone - Information Screen

Tap on information (i)


iPhone - Click Block

Tap Block this Caller


iPhone - Block Confirmation

Tap Block Contact


iPhone - Contact Now Blocked

The sender is now blocked and you won’t be pestered again.  Repeat this for every other nuisance number until hopefully you will stop receiving them.


 Receiving Nuisance Phone Calls?

If you receive a phone call the process is the same just go to Phone ->Recents and tap on the (i) to bring up the info screen.

The post iPhone Messages – Block Nuisance Numbers appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2015/iphone-messages-block-nuisance-numbers/feed 0
100th Post in a 1000 Words-A Story of Love, Life and Griefhttp://www.worldoweb.co.uk/2015/100th-post-1000-words-story-love-life-grief http://www.worldoweb.co.uk/2015/100th-post-1000-words-story-love-life-grief#comments Tue, 10 Feb 2015 23:11:52 +0000 http://www.worldoweb.co.uk/?p=7912 By Tracy Ridge

I had plans that my 100th post would be special so I am dedicating it to the life of my fiance Shaun, of 16 years, who was suddenly taken away from me on the 1st January at the age of 35.  Here is our story of love, life and grief. Early Days We first met […]

The post 100th Post in a 1000 Words-A Story of Love, Life and Grief appeared first on WorldOWeb.

]]>
By Tracy Ridge

I had plans that my 100th post would be special so I am dedicating it to the life of my fiance Shaun, of 16 years, who was suddenly taken away from me on the 1st January at the age of 35.  Here is our story of love, life and grief.

Early Days

We first met in 1998 whilst Shaun was celebrating his 19th birthday on Friday 29th May and I was out celebrating my 18th Birthday, which was the day before. Our relationship was steady at first but the more I got to know him the more I liked. He was warm, kind, funny, generous and loving.  In 2000, after 2 years we moved into my family home together for 6 months when he was offered promotion with his job, in Aberdeen, Scotland. He felt like he had to take up the chance and when he first went he loved it and then 3 months later I followed him.

Robert Burns Poem

Very fitting poem by Robbie Burns used in Shaun’s ‘Celebration of life’ service

It was a difficult move to make, leaving our families behind but we knew that if it didn’t work out we could go back.  In October 2001 I was dealt a cruel blow being diagnosed with Hodgkin’s Lymphoma, I faced 6 months of intensive chemotherapy. Within 3 months of finishing chemo I found out that I was pregnant with our daughter Caitlin who, after a difficult pregnancy, was born in March 2003.  Being able to have children was a dream come true for both of us.

Our family was complete in April 2006 when our son Cameron was born but in September of that year we were dealt another bitter blow.  Shaun had a freak near-fatal motorcycle accident.  He spent 9 weeks in hospital averaging 2 operations a week on his shattered leg.  He spent 4 more years of agonising operations and intensive physiotherapy going from a wheelchair to crutches and eventually a walking stick. Despite the excruciating pain he never moaned or felt sorry for himself.

In 2012 he decided that he was going to start his own Handyman business.  The walking stick went, he built up his confidence and his business, which relied on very little advertising, grew stronger and stronger.  Despite the pain and his diagnosis of arthritis and curvature of the spine in January 2014, life was good, business was good.  We finally planned to get married and consider moving home in 2015, it would be our time.

We had a fantastic Christmas and we celebrated the New Year coming in with our friends as we did every year.  New Years Day celebrations got off to a good start after having our annual family dinner with our friends we settled down to watch a movie when Shaun suddenly collapsed.  Myself and a friend desperately tried to resuscitate him with the paramedics taking over when they arrived.  Within an hour they announced that they were unable to resuscitate him and he was gone.

Although I was calm, my heart was pounding with shock, I said my goodbyes and had to face the agonising task of telling our children (Aged 11 & 8), who had been taken away by friends when he collapsed, and our families back in England.

Week 1

The first week went by with many questions unanswered Why? How? Have I done something wrong? I had little sleep, little food yet I had 2 children to look after who are also grieving.  Friends came round in droves to offer condolences, support, wash the dishes, clean and encourage.  This support got me through the day, prevented me from going into hibernation.

Weeks 2 & 3

Weeks 2 & 3 were spent planning his funeral even though at this stage I hadn’t found out the cause. The questions were still unanswered, I felt like I was the one that was being blamed until the dreaded phone call came.  Shaun had died from an undiagnosed genetic heart condition called Cardiomyopathy and there is a 50% chance that your children may also have it!

It felt like I had been repeatedly punched in the face.  Grieving for Shaun and now face the prospect of my children having the same condition.  I was still angry at life at this stage.  Shaun battled the stress of all those operations and nothing ever flagged up!  Trying to think of positives; Did Shaun spare his life to save our children?

Week 4

Week 4 came, the funeral was 4 weeks to the day.  A constant flow of family and friends arrived from across the UK to attend.  I was reunited with Shaun for the first time since and all I remember is walking in/out, comforting the kids and thanking people at the end.  The flow of visitors slowly dispersed to continue with normality although I was thankful that they travelled half way up the country to say their goodbyes.  The funeral is meant to bring closure, does it?

Week 5

Spent the week  phoning banks, insurance companies, changing names, cancelling stuff I don’t need and by this time I hadn’t had an income for 5 weeks, living off savings with a funeral to pay for and 2 children to support.  I  just wanted to grieve but knew I had to this.  I sit here, alone at night whilst the kids are asleep, still expecting him to walk through the door,  I can’t accept that he’s gone quite yet.  If someone was to tell me on the morning of New Years Day that in 5 weeks Shaun would be in a plastic container, in the form of ashes, in my cupboard I would have probably laughed.

Future

I take each day as it comes,  some days are better than others. I’m in a vicious circle of feeling guilty for having a laugh, frustrated when I spend hours on the phone trying to speak to a human being and not a computer (for once), utterly heartbroken that he’s gone and won’t see his kids grow up and yet thankful for the memories we shared.  The last 16 years we had a fair share of problems but in the last 2 years we had plenty of family time and those times were precious!

 

Shaun’s choice of funeral song

 

 

The post 100th Post in a 1000 Words-A Story of Love, Life and Grief appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2015/100th-post-1000-words-story-love-life-grief/feed 0
With The Deepest Sadnesshttp://www.worldoweb.co.uk/2015/deepest-sadness http://www.worldoweb.co.uk/2015/deepest-sadness#comments Sat, 03 Jan 2015 23:10:54 +0000 http://www.worldoweb.co.uk/?p=7897 By Tracy Ridge

It is with the deepest sadness my Fiance and soulmate for the past 16 years was suddenly taken away from me on New Years Day at the tender age of 35.  Shaun was a dedicated father and hard working man with a heart of gold.  We spent the last 2 weeks together as a family, having […]

The post With The Deepest Sadness appeared first on WorldOWeb.

]]>
By Tracy Ridge

It is with the deepest sadness my Fiance and soulmate for the past 16 years was suddenly taken away from me on New Years Day at the tender age of 35.  Shaun was a dedicated father and hard working man with a heart of gold.  We spent the last 2 weeks together as a family, having fun and doing what families should do.  Time is precious!

 

Me and Shaun

RIP Shaun 01-01-2015

 

 

The post With The Deepest Sadness appeared first on WorldOWeb.

]]>
http://www.worldoweb.co.uk/2015/deepest-sadness/feed 1
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 2