The Adhere Creative
Check All for Checkboxes in a Drupal Table
So you’ve got a Drupal table that consists of checkboxes and you want to have a ‘Check All’ feature?
Simply add the following line into the first array item of the $header array:
theme(‘table_select_header_cell’)
And that’s all there is to it!
Codeigniter developer wanted
We are looking for a full-time CodeIgniter developer to join our web and software development team at Adhere.
Applicants should demonstrate good skills and experience using the CodeIgniter PHP framework.
Knowledge of any of the following would also be an advantage: JavaScript, jQuery, Backbone.js, CSS, server administration, Drupal, Magento.
Please send your CV and cover letter explaining why you are perfect for our team to info@theadherecreative.com.
For more information or an informal conversation about this opportunity, call us on 0121 224 7361 and ask for Wayne or Ed.
Suitably-qualified undergraduate or graduate students seeking short-term placements or internships are also welcome to call us about this role.
We are always open to offering permanent/full-time roles to students who impress during placements.
Vacancy at Adhere – Junior PHP / Drupal / Magento developer
We are looking for a new full-time team member to join our development team at Adhere.
Strong PHP skills and good spelling are essential, as is experience in at least one (preferably two) of the following:
- Drupal v.6
- Magento
- CodeIgniter
- MySQL
- WordPress
Knowledge of any of the following would also be an advantage: JavaScript, jQuery, Backbone.js, CSS, server administration.
We offer an attractive working environment, the chance to work as part of a dynamic and well-motivated team, the opportunity to learn and develop new skills.
The most important thing is you need to be passionate, excited and eager to learn and work within our team.
Salary £18 – £24k per annum depending on skills and experience.
Interest applicants please send a CV and cover letter explaining why you are perfect for our team to info@theadherecreative.com
The Emperor’s New Social Media Network
Hype around Pinterest has grown out of all proportion, I’ve wanted to look at some actual numbers for a while and Shopify helpfully released some a few days ago. Shopify are an ecommerce provider so their figures relate specifically to how Pinterest is effecting ecommerce stores. Social media experts have been falling over themselves telling online retailers to get on pinterest; do Shopify’s figures back what they are saying?
Have a look at this: http://www.shopify.com/infographics/pinterest
It’s a very nice infographic, and if you take the messages at face value and don’t think too hard about the numbers you’d be forgiven for thinking that Pinterest was on the verge of single-handedly revolutionising ecommerce:
“Third most popular social network in the world!”
“Sales from pinterest have QUADRUPLED!”
“Userbase has risen by 145%!”
All true enough, but is it really worth your average business devoting any real effort to Pinterest?
Let’s dig in to those numbers a bit further shall we?
From Shopify’s own April data, 3,879 ecommerce stores had some content pinned on Pinterest, this generated 262,943 visits, so on average each store that was pinned received 68 visits. Not 68 uniques mind, 68 visits. Wow. I can hardly contain my apathy.
Still, that’s 68 free visits, right? Well maybe, if you’ve got lucky and people are pinning your content spontaneously then great, but if you’ve put in any time pushing Pinterest or creating Pinterest specific content then you’ve paid for those 68 visits.
But, I hear you say, is it good quality traffic? For any ecommerce store the measure of traffic quality is conversion rate.
262,943 visits generated 320 sales, so the conversion rate from Pinterest across Shopify stores is a whopping 0.12%
We don’t know what the conversion rate from other traffic sources on Shopify stores is to make a fair comparison, but I have an online store that converts organic traffic at about 4% and PPC traffic at just over 9%. At a conversion rate of 0.12% you need a hell of a lot of Pinterest traffic to stand a reasonable chance of making a sale.
Don’t get me wrong, this isn’t an attack on Pinterest, I quite like it, it’s a cool idea, but it’s of very limited use for directly driving sales. It may have it’s place in branding but if you want sales don’t spend any time or money on it.
Adding a body class to Drupal based on a variable in the URL in template.php
I wanted to add a custom class to the body of a Drupal page IF there was a variable in the URL. In this case I was passing a hidden variabel called ‘window’ in the url with the value ‘popup’, so I wanted to add the class ‘popup’ to the body.
Here is the code you need to add to template.php
<?php
function phptemplate_preprocess_page($vars, $hook) {
// node-edit class
if ($_GET["window"] == ‘popup’){
$vars['body_classes'] = $vars['body_classes'] .’ popup’;
}
}
?>
This enabled me to style the body of the page (and any subsequent styles) specifically for pages with the GET variable window=popup.
Can Google index javascript-generated content? Results
Last week we set up an experiment to see what kind of Javascript-generated content Google would index.
We created a test page with three kinds of content:
- Content loaded by simple inline javascript using document.write().
- Content loaded automatically through an Ajax call.
- Content loaded through an Ajax call in response to user action.
Our findings are as follows:
1. Inline Javascript using document.write(): YES – Google can (and does) find and index this content.
2 & 3. Content loaded through Ajax: NO – Google does not index this content.
Conclusions:
Content that is written to your document using Javascript’s document.write function will be indexed by Google.
But content that is loaded asynchronously, for example via an Ajax call, is not indexed.
If you have important content that you need to get the search engines to find, don’t use Ajax – or at least don’t rely on Ajax alone. If you’re going to use Ajax in your website or application, Google provides some guidelines for getting your Ajax content crawled.
Can Google follow Javascript links?
Last week we set up some experiments to try to answer the question “Can Google find (and index) pages with no inbound links?“
The results are now in and they’re quite surprising.
In short, Google is much smarter than we thought. It knows that <a> tags are not the only way to create a link. It can (and does) find and index content linked only through Javascript.
Click here to view the results in full.
Can Google find pages with no inbound links?
Generally, Google and other search engines find new pages to add to their indices by following links from one web page to another.
Some search engines, including Bing and Google, also allow webmasters to submit URLs directly, meaning that your site may get indexed even if there are no links pointing to it from the “outside world”. (Links like these are called “inbound links” in the trade.)
But we wanted to know: can Google ever find and index pages that have no inbound links, and that are never sent directly to Google via its site submission form?
We set up an experiment to find out.
In fact, the page you are reading right now is part of that experiment.
We wanted to test the following scenarios:
- A page with no inbound links, but whose URL is to be found in plain text. Here is just such an example:
http://www.adherewebdesign.com/experiment/orphans/url-only-no-link.php
- A page with exactly one inbound link, but which has the rel=”nofollow” attribute added. In theory such links are not followed or indexed by Google. But in practice? Let’s see. Here is our case-study:
http://www.adherewebdesign.com/experiment/orphans/link-nofollowed.php - A page with no conventional inbound links, but which can be accessed by clicking what you might call a JavaScript pseudo-link, like this: <a href=”javascript:document.location=’http://www.example.com/example.html’”>a javascript pseudo-link</a>.
Here it is in action: a javascript pseudo-link - Identical to number 3, but with the pseudo-link attached to something other than an html <a> tag.
Here it is in action, using a <span> tag: a clickable javascript pseudo-link - A page with no inbound links in pure html, but with an inbound link that is javascript generated, rather like document.write('this one here');.
- Finally, we wanted to test whether Google follows links from PDFs. So here is the PDF, which contains exactly one link to a page with no other inbound links.
Check back here in a couple of weeks to see the results of these experiments.
Does Google index content generated by JavaScript?
We were curious to find out: does Google read and index javascript-generated content?
Driven in part by the rise of the smartphone, websites are becoming more “appy”, with data and content loading asynchronously through Ajax calls.
So it’s becoming more important to find out whether your jQuery / Javascript / Ajax-loaded content gets indexed by the search engines.
We couldn’t find a definitive answer online.
So we thought: there’s one way to find out for certain: do an experiment. We’re interested in three different kinds of content, really:
- Content loaded by simple inline javascript using document.write().
- Content loaded automatically through an Ajax call.
- Content loaded through an Ajax call in response to user action.
document.write('So, this paragraph is outputted by inline JavaSc'+'ript using docume'+'nt.wr'+'ite('+'). Check the page source and you will see that these words do not appear in the HTML. To help us check whether this text is indexed by Google (and Bing, for that matter), here are a couple of words you might not expect to find here: pterodactyl abstraction.');
We’ll post again in a few days’ time with the results.