Monday 30 April 2012

Linking your Google Listings with Your Google+ account

Your probably already aware of the change that's happened to Google listings.  And that's that you can now have your smiling face being listed next to your content when people search using Google search engine.

It's my mission this month to get most of my customers set up on this.

Check this blog Claim Your Content

Here's my notes of what I did to get this working on my Womens Clothing webstie .


1.  I added this code around the title in the footer for Ocean Blue Clothing

< a class="url fn author" rel="author"

href="http://www.oceanblueclothing.com/contact.html" > 

2.   then on the contact.html page .  I added

< a class=“url fn author” rel=“me” href=https://plus.google.com/u/0/b/104045898578696595916/ >

around a link for Google Plus.

3.  Then in your Google Plus page .

>  click on 'edit info'














> click on 'contributer to' in the Google Plus page.

Making a Data Feed for your Virtuemart store

I've been using RedMystic to help get my store items on Ocean Blue Clothing to get listed on Google Shopping.  However recently due to a fault which is I think related to my  'Virtuemart Additional Images not working problem'  it's not been working :(

So I've had to write a hack to list these products until someone spends a little more time making a proper solution.

You can download my hacked code her Virtuemart Data Feed Joomla Hack.  Please let me know if you use and improve on it.

You'll need to add your details where appropriate.  Ie usernames and web Addresses. 

You could probably use on Joomla 2.5 to make a Site Feed for Google too with some small changes.

ONE THING YOU WILL NEED TO DO .


After uploading and going into the index.php page.

Copy and paste this from your browser into your editor and search for '&'  and replace with '\& '

then save it and upload to Google Base

Friday 27 April 2012

Joomla 2.5 Transfer Internal Server Error

I had the following error while transferring a copy or working Joomla 2.5 from one server to another. 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@extendcp.co.uk and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


I've written a blog about something similar before

joomla 1.7 installation A file permissions error has occurred. Please check the permissions on the script and the directory it is in and try again.

However setting the permission to ALL folders to 755 and 644 was not the answer in this case.

The solution was in .htaccess and that the site I was copying over had a password protection set in the .htaccess .   The solution to this was to use the htaccess.txt in the the latest Joomla 2.5 download . and changed it to .htaccess 

Where to place the Workings out in a Payroll MVC Script.

At present we're in the process of creating a script that works out shift details and payments.

Here's what needs to happen. 

>  find all shifts for a user.

>  Calculate each shift total - pay rate x hours = total

>  Then add all the shifts together and take off the insurance amount for the week.


In procedural PHP this is how I've seen it done.

$sql = get list off all users.

$sql = all shifts for that user

while = a loop that calculates each shift and puts the total in an array

array_push = we add together all the shift

total = minus the shift amount and they you have it.


So the common sense would say that in a MVC format the solution would be similar.   However consider this solution. 


on line 39 of components/com_projectfork/models/bacs.php  we have this query

$query1 = "

SELECT
#__time_diff.name,
#__time_diff.user_id, #__time_diff.hourly_rate,
#__time_diff.cb_insurancerate,
#__time_diff.bumber,
sum((#__time_diff.time_diff)*
#__time_diff.hourly_rate)-
#__time_diff.cb_insurancerate as total


FROM #__time_diff ".$filter." GROUP BY #__time_diff.user_id

";

The trick to this is understanding this question.

The workings are done inside the mySQL call, but how are the shifts added together ?

and the answer is in the usage of MySQL sum

Monday 23 April 2012

Adobe Photoshop CS6 Extended could not complete your request because the smart object is not directly editable

it seems there's been a couple of changes to Photoshop since I've used it last.  One of these changes is the use of smart ojects.  After importing an image I was trying to cut and copy part of it and was getting this message.


Extended could not complete your request because the smart object is not directly editable


The solution is pretty simple you can do one of 2 things ; both are options when you right click the layer. 







* Edit the Smart Object - this will open the item in another box

* Rasterise the Smart Object - turing it back into editable pixels.


http://www.youtube.com/watch?v=_Jdv6u4S6Hw

Friday 20 April 2012

Virtuemart get rid of price in child list

It was requested by Ocean Blue Clothing to remove the price in the Child List in their virtuemart installation.

joomla virtuemart List box for child products code

Here's what the pages looked like.





To sort this  then open 

components/com_virtuemart/themes/default/templates/product_details/includes/addtocart_list_single.tpl.php



FIND and DELETE

if( $_SESSION['auth']['show_prices'] && _SHOW_PRICES) {
                ?>
               
                                if( $product['price'] != $product['actual_price'] ) { ?>
                     
                                }
                ?>
               
               

           

then your page will look like this








Monday 16 April 2012

Revitalising an Old Laptop

In a future blog I will be writing about tips, tools and software that can help you run your business without it costing a future. One thing that can save you having to spend out hundreds on new technology is to get more life out of those slow and old computers.

So it was my intention to run Chromium OS on an old computer.  This will should then make this computer a unit that can access the internet and a home cloud. However it seems that you can't do this on a laptop but for a netbook.  What I need to do it install a lightweight OS like Unbuntu. 

If you want to load Chromium on a Netbook, here's some information that might be useful.  If anyone has any useful links or blogs on this subject then I'd be interested in finding out more.

After researching I found this excellent page Beginners Guide to install Chrome OS on Netbook

One thing that wasn't straight forward for me though is that downloading Win Disk Image Source didn't work for me and i needed to download the 'Binary' download underneath. 

After this I then needed to have a larger USB drive disk.  Leaving me to ask

how big a usb flash disc do I need for Chromium OS ? 

According to this pos USB Flash Drive Partitioning then it's 4GB 

And that's where I am at now. waiting for a bigger flash drive to turn up to continue. 

After this I will then be looking at having a home server setup and Media center set up that can be networked together.

joomla development Undefined variable: problem

after some changes to a component this warning was showing.

Notice: Undefined variable: html in /com_projectfork/sections/time/output/_nav.php on line 62 


on line 62 was a variable

$html .= '  blah blah';

by entering this on the line above I got rid of the warning.

$html = '';

Thursday 12 April 2012

Spam in jos_rwf_submitters

Just in the middle of transferring a large database and I've found a load of spam in a table ' jos_rwf_submitters '

What is the table jos_rwf_submitters for ?

Well its part of the Red Components RedForm .  The spam was from before I'd put on their reCaptcha , which works a treat.  So basically if you've got this spam too then delete the information from your mySQL and update your component.

Tuesday 10 April 2012

5 Basic SEO tips to remember when writing a Blog

 5 Top Tips on Things to remember when writing a Blog

These are my notes for my full blog that is available here

How to write great blogs with Search Engines in Mind


1. Select a couple of key phrases that you want this blog to found by.  NO MORE

2.Get your key phrases in title and mentioned in the text but you do not need to mention it again.  You have to careful here because mentioning it too many times will be seen as over SEOing .

3. Make your image titles descriptive and use the Alt tags.  if the images are relevant to your keywords then this will help too.


4.add a decent description.  This is shown on the Google search results page an in he description when linked to from facebook.

5.  Lastly and probably the most important is to have a good title and to have your key phrase at the start of that title.

Thursday 5 April 2012

Changing a Header Button Link in a customnised Wordpress Blog

This probably won't be the same in everyones Wordpress Blog but on a customised version that I've put up at Cornwall Power Tools then I've been hunting around fro where I'd change the Href for a button in the header. The solution was in this mysql table 'wp_options' search for 'openhook_header' in the column 'option_name' in fact many things on this template are controlled in this mysql table.

Monday 2 April 2012

Joomla 2.5 - customising a menu template.

This is a follow on from my recent blog on
Joomla 2.5 make rounded menu
.

A couple of additions that may be useful to others.

1. Adding the Menu Title in your menu template.

You just need to put the following code where you want -> title; ?>

2. Making a new row of links. In the menu I've built I want 4 links in a row. And then make a new row. For this you need to be able to count from within the template.
Examine the following code to open and close a row.
if ($i==0 || $i==4 || $i==8){
echo '';
}

if ($i==3 || $i==7 || $i==11){
echo '';
}