Cleaner Google Homepage + Cookie Monster Doodle

November 5, 2009 · Posted in Web Stuff · 2 Comments 

Perhaps I have been slow on the uptake here, but the Google search homepage is elegantly simplified, until you move your mouse.

This morning when I arrived I saw Cookie Monster staring back at me, but also nothing other than the Google search input box:

google homepage less busyWell I say it is less busy but Cookie Monster is certainly getting busy chewing his way through Google. Then once you move your mouse some Javascript fades in the missing clutter on the Google homepage that we have grown used to:

busy google homepage with Cookie MonsterWhat do you think of the cleaner Google homepage? I love it (I am assuming when the monster is gone it will remain like this).

I took a look around and it seems to only give me the cleaner Google homepage in Firefox on google.com and google.co.za but not google.co.uk. Other browsers are displaying as they always have (except of course for Cookie Monster). The code doing the reveal in Firefox is using an event in the <html> tag:
<html onmousemove="google&&google.fade&&google.fade()">

For the Google story on the Week’s Sesame Street Google Doodles, and all the Doodles in one place.

Short PHP IF-Else Statements (Shorthand IF)

November 4, 2009 · Posted in PHP · 1 Comment 

Funny thing is I have been working in PHP for years, but only with the prevalence of CMS’s have I required short code for PHP, I have always just typed things out in full. These shortened PHP conditional statements are called ternary operators, and I find them most useful when popping code into a CMS code block, otherwise I generally code stuff in full for legibility.

If you look at the PHP manual they give you the following alternative syntax which is really not that compact:

<?php
## all examples start with $x having a value of 3 ##
if ($x == 3):
echo "X is equal to 3";
else:
echo "X is not equal to 3";
endif;
?>

And that if and elseif … endif structure is fine, but what about one line alternative code for a PHP if statement:

<?php if ($x == 3): echo "X is equal to 3"; else: echo "X is not equal to 3"; endif; ?>

But still this is not that efficient, the following two versions give nice compact code the first for just printing the value:

<?php echo ($x == 3)? "X is equal to 3" : "X is not equal to 3"; ?>

and the second allocates the string value to $y, dependent on the short if statement, and then prints:

<?php $y = ($x == 3)? "X is equal to 3" : "X is not equal to 3" ; ?>
<?php echo $y ; ?>

And of course if all you want to do is print one thing’s value dependant on its not being blank or zero:

<?php echo ($z)? $z : "" ; ?>

Nice short if statement, have I missed anything?

The PHP manual does have a couple of points if you scroll down on this page. The most notable is “avoid “stacking” ternary expressions”; if you want your code to be readable dont nest ternary conditional statements.

List of ePublishing Services and Platforms

October 22, 2009 · Posted in Book Publishing · Comment 

A while back I had a chat with an ePublishing company about the possibility of doing some eMarketing on their ePublished eBooks (all those e’s sound pretty silly). Anyway the landscape sounded like a nightmare of file formats and platforms which do or don’t work with each other.

This article tries to list these platforms without in depth analysis, I hope to keep this up to date, perhaps add the DRM stuff once I understand it all.

If you are looking for e-Book readers Mobileread has an impressive matrix.

Amazon Digital Text Platform (DTP)

https://dtp.amazon.com

The big thing here is that Amazon is to online retail what Google is to online search. Amazon have rarely missed a trick and their Kindle reader is one of the better known readers out there. But is your content limited if you are publishing to Amazon only? Your Amazon ebook will only be available on Amazon, so is there some way of publishing to Amazon and other platforms too?

Costs / Commission 35% commission on each ebook. You can suggest a retail price, but Amazon can change this.
DRM They retain the right to use DRM, but by their T&Cs they are not obliged to use it.

Lulu Self Publishing

http://www.lulu.com/

I just love Lulu’s name, not sure why, but it is friendly. That asside they also provide an amazing platform with a lot of options. You can make calendars, corporate brochures, CDs, DVDs etc using Lulu, but we are looking only at book publishing here.

Costs / Commission At the time of writing Lulu charges a 25% commission on each ebook download.
DRM Lulu does not offer DRM, copy protection is up to you. Puts DRM out of reach of the average Jo.

An additional consideration with Lulu is that they handle both book and eBook publishing through one interface, and adding ePublishing on an already published book is a breeze.

Smashwords – Ebooks from Independent Authors and Publishers

http://www.smashwords.com/

Smashwords has a really appealing offering with broad distribution. On the standard feed level you get Stanza on the iPhone and Aldiko on Google Android phone, but what you really want is their premium list. Having a premium listing is good as it will filter a lot of rubbish out, you have to comply with a reasonable list of requirements to attain premium listing.

What comes with premium listing? The online stores of Barnes and Noble (B&N) and Sony, with others to follow. You also have the option to remove your books from specific stores if you like.

Costs / Commission At the time of writing Smashwords charges a 15% commission. But purchases through a third party platform like B&N will incur that storefront’s commission in addition.

There is also a billing fee of 3-6% (higher price this fee falls to 3%)

Additionally any sales from visitors who clicked on affiliate links, you lose a further 11% to the affiliate.

DRM No DRM, but puts forward a strong argument against DRM.

So the costs in the table above are meant to be simple, but essentially for a $1 book you keep 58% (48% if an affiliate sold it), and for a $10 book you get 80% (66% if an affiliate sold it). You can opt out of the affiliate program, or if you like it you can juice your affiliate rates so they get a higher %.

Scribd Store

http://www.scribd.com/store/

The Scribd Store is only available to people in the US, which is a loss for them as the rest of the world is quite capable of getting used to another platform in the mean time. On the other hand a friend of mine set up a partnership with a friend of his in New York just so that he could publish in the Scribd Store.

I would really appreciate any comments you might have on the above article, as it is really in its infancy.

WordPress: Webform / Contact form Plugins Compared

October 12, 2009 · Posted in Content Management System · 2 Comments 

As with most WordPress plugins, it is a bit of a nightmare trying to find the right one. Something I really struggled with is getting a form plugin that works. First prize would be if the core of WP contained form handling as is now happening with Drupal 7, but…

Contact Form 7

I started off here after reading extensive review of various plugins in the WP directory I thought this was the best one.

http://wordpress.org/extend/plugins/contact-form-7/

On the plus side; it is pretty simple and easy to configure, you define your form on the back-end and then call your form using some comment text.

Where I ran into issues was the following:

  • It is built as a contact us form and that is all
  • No saving to database
  • No way of inserting custom variables

My last point was the straw that broke the camel’s back; I needed a select dropdown which I wanted to select the user’s country. To be clever I was determining their country using their IP number (More Here). But there was no way to A. dynamically populate the field or B. dynamically preselect a value.

cForms II

This plugin is GPL but for some reason it is not in the WP repository, but it is EXCELLENT!

http://www.deliciousdays.com/cforms-plugin/

Not only could I achieve the above things I could not using CF7, but there are some awesome features in addition, which I have since started using. It really is a forms plugin rather than just a contact us form.

  • Can enhance the standard comments fields
  • Allows you to define a cForms form in PHP by setting arrays and calling a function.
  • Still simple to configure a simple form if that is all you need.
  • Refer a friend form field types.
  • Form fill in autoresponders with an optional attachment (HTML and Text)

What really sold it to me? I asked a question on the forum and I got help the next day. (search the forum first else he might bite your head off for asking silly questions :-) )

Any other experiences folks is there a better WP forms plugin out there?

Waiting for Drupal 7

September 21, 2009 · Posted in Content Management System · Comment 

This may be a silly move, but I have been hesitating over establishing a WordPress MU website, in favor of waiting for Drupal 7 to launch. Just looking at the D7UX website (Drupal 7 User Experience) I might be right to wait. I am installing and testing D7 as we speak.

Finally the CMS I like the most (flexibility, features, community, non-commercial licences), and hate the most,(tough to update, not-pretty…) is getting an interface that is well thought out. Feature-wise it has been well ahead of the others, but really a pain to use.

How many plugins does it take to get a working site?

July 29, 2009 · Posted in Content Management System · 1 Comment 

Well I know that my most recent post was going on about the problems with WordPress plugins, and there being 10 versions of any one plugin rather than the dev community working together to make one good plugin.

Well this post is to gripe about the number of Drupal plugins it takes to get a workable website. honestly on my WordPress site I have 7 plugins, each addressing a specific need. On Drupal, a site with a blog and pages? 18 plugins, and I am not counting core or even core optional modules. Really if you are just wanting a CMS use WordPress or Joomla or something simpler.

Why use Drupal? Couple of killer plugins, and FLEXIBILITY.

WordPress: plugin hell

July 22, 2009 · Posted in Content Management System · Comment 

So I am pretty new to WordPress, but my first impressions chronologically were:

  1. “wow this is really simple to use” – WYSIWYG editor, image insertion all there (I do a lot of Drupal)
  2. “Pages can not get categorised!!??!!??” – Bump into limitations
  3. there are multiple of each plugin, why can’t these people work together?

My last one is pretty important, and affects Joomla too; if all the plugin builders working on Amazon plugins worked together there would be an amazing plugin, except all these people are in it for personal gain and adulation? so it looks like a bunch of kids fighting over a toy and all saying mine, mine mine. (I see this every day, my daughter is 2yrs old :-)

WordPress – IP to Nation or Country Plugin

July 22, 2009 · Posted in Content Management System · Comment 

I love getting something right and it is really satisfying when someone provides their code GPL’d. I just use the IP to Nation WordPress Plugin to do the following on a client’s site:

  1. Display a country flag of the visitor’s detected country
  2. Display a link to country specific information if the user is from one of the focus countries.
  3. Prepopulate the country dropdown of the contact us form.

And I really do not need to explain how I did this because the documentation here is pretty good.

Sometimes I am not moaning
:)

Web Analytics for Social Media

July 20, 2009 · Posted in Website Analytics · Comment 

So if you have a social application vs informational vs retail, you are clearly going to look at your data differently, which is basically what the ClickZ article is saying: Web Analytics for Social Media – ClickZ. But what is perhaps pertinent is understanding your application and your user interaction model, and your data is subjective more than ever before. you can compare one retail store with another, and work on benchmarks, but can you compare one Facebook application with another, and apply benchmarks on one to the other?

Social media analytics interpretation comes down to understanding your application, and so often a social application’s lack of offline parallel is what makes this difficult:
Online retail – Offline retail
Online search – Yellow pages? (Took a while for this to resolve itself into not being a closed directory, but some search still is directory based)
Microblogging – ?
(Social) Bookmarking – ?
Social within social, Facebook applications – ?

Drupal: Define a new block area in your theme

July 9, 2009 · Posted in Content Management System · Comment 

I really struggled to get info on this one, and drupal.org’s search keeps turning off due to being overloaded. I find the Drupal template or theme I am using generally does not have blocks where I want them for inserting ad slots or just block elements.

I am using Drupal 6 and wanted to define a new block area at the top of the page for banner ads, how is it done?

1. In the theme folder in the theme definition file my_theme_name.info add the following (usually at sites/all/themes/theme_name/my_theme_name.info):

regions[banner_top] = banner top

2. In the file page.tpl.php (in the same folder most likely sites/all/themes/theme_name/):

<?php print $banner_top; ?>

3. And this is the thing that catches everyone, in the admin area:

Go to admin/settings/performance and at the bottom click on the “Clear cached data” button.

If you now navigate to admin/build/block and you should see your new block highted. You can edit page.tpl.php to get your positioning, and there is no need to flush the cache again.

« Previous PageNext Page »