Many Pies

Many Pies

Tuesday, January 27, 2009

Check IT Out

I've previously mentioned our Check IT Out day on 21 February 2009.

The timetable is nearly finalised. I'm giving a talk on "Business Systems - the I in IT". I get the post-lunch slot so I shall have to make it really interesting to keep people awake. The day is being organised by Mark Woodward who is also giving talks about raising support ("What, no salary?") and the IT opportunities in Wycliffe. There are talks from various other people including the Exec Director Eddie Arthur ("Bible Translation and the internet") and the Non-Roman Script Initiative of one of the organisations we work with who do clever stuff to get all sorts of writing systems to work on computers.

More details on the Check IT Out page of the wycliffe.org.uk website.

Monday, January 26, 2009

Using Javascript to modify text on a NetCommunity donation part

(Long heading, but informative for the very few that need to know.)

Update: Later versions of NetCommunity allow you to edit almost all of the text on a donation form so this isn't needed.
There's a better way of getting that magic page prefix in my more recent NetCommunity javascript post.
Later versions of NetCommunity include jquery libraries on the page, so you can use those. They are neater and provide better cross browser support. As this script isn't in current use I'm not rewriting it. However you can replace
 document.getElementById(xyzPrefix + 'something').textContent = GADText;
with
 $('#'+xyzPrefix + 'something').val(GADText);

Assisted by information from Michael Williams and Micah Wittman I have written a bit of Javascript to modify the gift aid declaration text on a Donation part. We need to do this because people can donate directly to some of our workers, and if they are a close relative as defined by the HMRC, this cannot be gift aided. "Close relative" means children, grandchildren, parents, grandparents, siblings or the spouses of these.

Here's the page:
Give to support Bible Translation

Here's the script:

<script type="text/javascript">                        
<!--//--><![cdata[//><!--
function xyzModifyGAD()
{
    var xyzPrefix = '';
    var xyzPrefix1 = 'PC909_'; //prefix of donation fields on the PRIMARY donation form
    var xyzPrefix2 = 'PC1052_';  //prefix of donation fields on SOME OTHER donation form
    var GADText = 'I would like Wycliffe UK to reclaim tax on all donations I have made for this tax year and the six years prior to the year of this declaration, (but no earlier than 6/4/2000) and all donations I make from the date of this declaration until I notify you otherwise, as Gift Aid donations. (Under Gift Aid regulations you are not allowed to give a gift, via a charity, to a close relative. "Close relative" means children, grandchildren, parents, grandparents, siblings or the spouses of any of these.)';
    try{
        //Assume PRIMARY donation form
        xyzPrefix = xyzPrefix1;
        //Set Gift Aid declaration text. It doesn't have a unique id, so we find the checkbox, go up to the parent
        // and then go to the second (0 based) of the children. This will break if Blackbaud change the donation part

        //For Firefox, Safari etc.
        document.getElementById(xyzPrefix + 'chkGiftAid').parentNode.childNodes[1].textContent = GADText;
        //For IE
        document.getElementById(xyzPrefix + 'chkGiftAid').parentNode.childNodes[1].innerText = GADText;
    }catch(e){
        //Caught exception, so assume secondary donation form (doesn't currently exist)
        try{
            xyzPrefix = xyzPrefix2;
            //For Firefox, Safari etc.
            document.getElementById(xyzPrefix + 'chkGiftAid').parentNode.childNodes[1].textContent = GADText;
            //For IE
            document.getElementById(xyzPrefix + 'chkGiftAid').parentNode.childNodes[1].innerText = GADText;
        }catch(e){}
    }
}

function runit(){
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(xyzModifyGAD);
}
runit();
//--><!]]>
</script>


Highlights:
  • This script lives in a Formatted Text and Images part below the donation form.
  • The function at the bottom is used because javascript outside a function sometimes doesn't run. 
  • It registers our update function so that it gets called when the "add to cart" button is clicked.
  • As the comment says, we can't get directly to the text we want, so we find a nearby checkbox and go up and down again in the DOM.
In the course of doing this I developed a
Checklist for debugging Javascript in NetCommunity
  • Use validator.w3.org to check for basic mistakes, though NetCommunity generates lots of its own invalid HTML.
  • Display IE to check for script errors (icon at bottom left indicates invalid script)
  • In firebug, if line number isn't green then it's not valid Javascript.


Script processed by Quick Escape.

Wednesday, January 21, 2009

Blackbaud NetCommunity and creating new subsites

We have two main websites, one, wycliffe.org.uk bears the name of our organisation, and the other vision2025.org, our main campaign. We set up our NetCommunity donation pages with the branding from our vision2025.org site and got a Blackbaud web designer to reproduce the way that site looked in NetCommunity.

We've now created a donations page using the look of our wycliffe.org.uk site. A colleague of mine did most of the work, and because in NetCommunity you can use HTML in the layouts, template, pages and parts, it was mostly a matter of cutting and pasting the HTML. However I did find some snags as I tried to make pages on the two sites look identical. NetCommunity adds some extra HTML to the stuff you create so that it can implement its features, and some of those use tables, hence my previous post on CSS styles in tables. I managed to get the two looking pretty identical, apart from a bit of background colour showing when you first go to the donations page. There are still a couple of differences:
  • Site search doesn't work from NetCommunity, using our existing script. It has its own search facility, but that will only search the Net Community server.
  • The donations "part" is quite wide, so I had to spread into the third (right hand) column to fit it in.
  • The favicon for the pages that look like wycliffe.org.uk is the same as the vision2025.org ones, but I think I can fix that. Update: Because you don't have access to the <head> part of the HTML you can't specify that. However I did find that BBNC automatically puts in references to images/favicon.ico. Some browsers, like Chrome, don't fall back to the sitewide facicon.ico if that isn't there, so to make your icon appear on those browsers, copy your favicon.ico file to the directory \program files\NetCommunity\images.


Spot the difference

Monday, January 19, 2009

Learning to train adults

I just wanted to plug the Learning that Lasts course that I wrote about previously: Learning That Lasts.

I can highly recommend it if you are involved in training. It encourages training using a method designed for adults who probably have relevant experience in what they are learning. I've used it a few times since I did the course and it seemed very effective.

Friday, January 16, 2009

Variety and diversity


I'm at the Wycliffe Germany offices at the moment. I'm taking part in some training for our corporate personnel system. In the UK office I'm used to the similar setup - Windows XP pretty much everywhere, PCs from the same supplier. Here we have people from several European countries, as well as some Africa. We have Windows XP and Vista, Mac and Linux, and for browsers: IE, Firefox, Safari and Opera.

In order so that everyone can try out what they've learnt we had to get everyone in the room to connect to the same wireless network connection, start using a VPN connection and get to our training system. With such a mix of hardware and software it took a while! Localised versions of Windows and browsers mean that error messages need translation, but if you've seen the same dialog box in English and can remember what goes where then you can tell someone what to click on without understanding their language.

As with life in general, variety makes things interesting, but I wished this morning wasn't quite so interesting!

Tuesday, January 13, 2009

Large fonts on NetCommunity pages

If you have created a Blackbaud NetCommunity page which for some strange reason is displaying large fonts, even though you have a stylesheet in place which should set the font size, it could be because your template doesn't have DOCTYPE set to XHTML 1.0 Transitional.

And the reason why? No DOCTYPE puts your browser into "quirks" mode which means that fonts inside tables don't inherit font size.

Update: I had a similar problem with styles not working, in this case the colour being ignored. After a while I tracked down the "problem" to the fact that I had 
<font color=#0000ff>
before the text. Doh!

A software engineer's view of the Wii

Thanks to a credit card which gives you vouchers if you put enough money through the card, we got a Wii for Christmas. I read a comment, answering the question why it has been so popular amongst "non-traditional gamers" - "it's the controller, stupid". And it really is. As well as all the directional stuff it does, what I didn't realise was that it does sound and rumble too.

If you've got one, this isn't news, but when you hit the tennis ball there's a "thwack" from your controller. No amount of clever 3d sound can imitate that. I'm also impressed by the detail on the animations of objects, like balls, pucks and other objects. It's obvious that a lot of care has gone into every detail. I particularly like the music that it makes (there's music for everything) when you're downloading updates. Thanks to everyone who got one for Christmas doing it on Christmas afternoon, I heard that music for a long time. It's all a bit like living in a white shiny space station.

There's some very astute cross promotion going of other Nintendo products, like the ability to download demo versions of DS games, but the biggest money for nothing must be the ability to download old console games and pay upwards of £5 for them.

The Bible in an hour


From Eden to Eternity. I haven't seen this at all, but I know Saltmine are very good, so this should be a good event.

Monday, January 12, 2009

Check IT out

Check IT out is an event run at our UK head office for people interested in working with IT for Wycliffe UK. (Check I.T. out, geddit?)

I should be there for part of the day. If you're interested in working in our many IT jobs in encourage you to come along and find out.

It's based on some successful events of the same name run by Wycliffe in the US.

Predictive text and mother tongue

There's a very interesting article in the Wall Street journal, How the Lowly Text Message May Save Languages That Could Otherwise Fade
Can a language stay relevant if it isn't used to send text messages on a cellphone?
Language advocates worry that the answer is no, and they are pushing to make more written languages available on cellphones.

Here's a quote from the end of the article:
Michael Wehrs, Nuance's vice president of industry affairs, says allowing texting in native languages makes it easier for people who don't speak English to conduct business. "The population needs to be able to use the device," he says. "To require them to use English is futile."

Hmmm, the same is true of the Bible. If you substitute "conduct business" with "understand the Bible" and "English" for a language that people understand, but isn't their mother tongue, then the sentence is still true.

Friday, January 09, 2009

Visting Raiser's Edge users

I've just started a project to visit all the Raiser's Edge (RE) users in our organisation. I'm doing it with several purposes:
  • Make sure that people know where the procedure manual is and are following it.
  • Seeing if they have any suggestions about improving it.
  • Seeing if they have any questions about RE that they wouldn't normally bother me with, but while I'm there, they could ask me.
  • Seeing if they need any training in specific areas of RE.
  • Seeing if they need IT training generally.
One of the things I'm wrestling with, and I hope to get clearer on, is how to impart information about something as complex as RE. I touched on this on my post on skills in procedures. Off the top of my head I can think of various skills that you need:
  • adding things to a list in a grid
  • deleting lines from a grid
  • adding things to a list which isn't a grid (add button at the top)
  • switching between records using the arrow at the top, or the menu, or the arrow at the top with a dropdown
I think the trouble with teaching these is that people don't want to learn how to do things, they want to learn to do things. If they want to add information to people's records and I start teaching them to flick around then they are going to get frustrated.

One of the things I'm going to revive is the sending of weekly tips to impart this sort of information. I'll post them here too.

Wednesday, January 07, 2009

New E-cards

I can't take any credit for this, but we now have some new e-cards for our Vision 2025 website. They are tasteful flash animations IMHO.