These sentences should not work: the girl gave to the dog a bone, the dog was given by the girl a bone. That is, you need to make sure that the NPs and PPs appear in the right order.
Be sure to add all of the sentences to your (growing) testsuite. Mark the ones that should not work with a 0!. See the part on Test Files and Tree Banks in the XLE user documentation for more information.
The file grammar3.lfg already contains a lexical rule for the passive. Use this as a basis for building a lexical rule for the English Dative Shift. See the part on templates and lexical rules in the XLE documentation for more information.
This lexical rule should interact with the lexical rule for the passive so that one can also parse passives of ditransitive verbs.
Your grammar should contain (at least) the following: