Category Archives: Development

AJAX in WordPress: A template

To implement AJAX in wordpress themes, use the following template:

Javascript

var data = array();
data['action'] = ‘FUNCTION_NAME’;
new Request.HTML({
url: ‘/wp-admin/admin-ajax.php’,
update: $(‘results’)
}).post(data);

PHP

add_action(‘wp_ajax_FUNCTION_NAME’, ‘FUNCTION_NAME’);
add_action(‘wp_ajax_nopriv_FUNCTION_NAME’, ‘FUNCTION_NAME’);

function FUNCTION_NAME() {
…logic…
exit;
}

 

MooTools’ Garbage Collection and IE’s ‘Stop this script running?’ error

I wrote a post before the weekend about some performance issues with MooTools, DHTML and AJAX, but having found the solution to a related problem this morning, I wanted to post a followup.

I’ve been working with a large, dynamically generated and AJAX populated table that features sorting, filtering and row highlighting, and was finding that my table took a long time to render, and was also very slow to close – that is, when I tried to close the window or refresh the page, there would be a delay when the browser would first hang for a few seconds. IE often (but not always) popped up the error/prompt Stop this script running?, and Firefox less often threw it’s Unresponsive Script warning.

Troubleshooting your FORMSOF & INFLECTIONAL searches not working, SQL Server 2005

For the life of me, I couldn’t figure out why I didn’t get different results, using SQL Server 2005, for a simple Full-Text Search query and a Full-Text Search query using the FORMSOF and INFLECTIONAL keywords.

What I stumbled across eventually was that when creating and configuring my SQL Full-Text Indexes, I had left the language parameter as the default selection. When I changed this to English, voila!, my FORMSOF (INFLECTIONAL, @query) queries started to produces fantastic search results!

Also, an example query showing how to parameterize the the search term, and how to rank your results:

SQL Server 2005 Express Full-Text Search Setup Tutorial

I recently had to setup a search facility on a website driven by SQL Server 2005 Express. My natural choice was SQL Server’s Full-Text Search feature, but setup was not entirely intuitive, and the web was full of misinformation. I’ve put together a tutorial to save you time.

If you’re not sure if your have Full-Text installed, read my post on installing SQL Server 2005 Express Full-Text Search.

Once, Full-Text is installed, you need to create your index:

CREATE FULLTEXT CATALOG MyFullTextCatalog

Managing your index is then actually very simple:

  • Browse to the tables of your database, right click and select ‘Design’

SQL Server 2005 Express with the Full-Text option greyed out

I’ve just been struggling to enable full-text search on my installation of SQL Server 2005 Express Edition, and so want to share the solution.

If, like me, the ‘Use full-text indexing’ checkbox was greyed out under Database > Properties > Files, you first need to test whether Full-Text Indexing is installed or not. To do this, execute the query.

use [dbname]
select fulltextserviceproperty(‘isfulltextinstalled’)

If this returns 0, you need to install Full-Text Search.

Firstly, did you install SQL Server 2005 Express Edition Advanced Series? Only the Advanced Series contains full-text. If not, you may need to reinstall.

Webmaster Jam Sessions

From the same conference, Andy Budd summarises and presents links to several other presentations from industry spokespeople.

Web Design Experts

A critical part of being a web design expert and consultant in Glasgow is actively participating in communities of other web design experts. To get an idea of the expertise we are drawing on and contributing to, the following is a list of those sites we consider key to our success – the best of the best, you might say.

Search Engine Optimisation

Design and Development

"The site has consistently attracted praise and admiration from around the world"

Alan McCaffery
Chairman IRAC

Think we may be able to help you? Why not start a conversation - chances are, you'll go away with some new ideas and knowledge.